A commit represents a set of code changes stored in git.
The Commits API returns raw commit data that does not match exactly with the aggregated and filtered commit data represented in reports. Use best practices for filtering in the Commits API to have your data more closely match what is returned in reports.
This endpoint has the following methods:
-
GET https://flow.pluralsight.com/v3/customer/core/commits
: Get a list of commits and their associated details and commit-level metrics. -
GET https://flow.pluralsight.com/v3/customer/core/commits/{id}
: Get commit details by commit ID.
Parameters
Note: For a full list of parameters, refer to the interactive API documentation (opens in new tab).
Name | Type | Description |
---|---|---|
id | double | Commit ID (not the SHA) |
hexsha | string | Unique identifier for the commit |
user_alias | double | Filter-traversable object |
user_alias_id | double | Unique identifier assigned to an user alias |
user_alias_id__in | string | Multiple user_alias_ids in comma separated list |
apex_user_id | double | Unique identifier for the main user record for multiple user aliases that is associated with a commit |
apex_user_id__in | string | Multiple apex_user_id in a comma separated list |
repo_id | double | Unique identifier for a repository |
author_date | string | Commit author date |
author_tzoffset | double | The time zone offset from UTC+0 for an author (in seconds) |
author_local_date | string | Author date adjusted to the author’s local time based on the author_tzoffset |
committer_date | string | Date and time of the commit |
committer_tzoffset | string | The time zone offset from UTC+0 for the commit (in seconds) |
ignore_hash | string | A hash of the "Ignored Files" text when a commit was last updated |
is_merge | boolean | Returns true to indicate the commit is merged |
is_pr_orphan | boolean | Returns true to indicate the commit is for a pull request that does not have a parent |
message | string | Commit message |
extracted_tags | string | Commit tags |
external_commit_url | string | External commit URL |
haloc | double | Hunk Aware Lines of Code (total lines of code) |
new_work | double | Number of new lines of code |
legacy_refactor | double | Number of lines of edited code replacing code older than 30 days |
help_others | double | Number of lines of edited code replacing code authored by a different author fewer than 30 days previously |
churn | double | Number of lines of edited code (rework) replacing code authored fewer than 30 days ago by the same author |
files | double | Number of files |
hunks | double | Number of hunks (blocks of code in a file) |
insertions | double | Number of insertions |
deletions | double | Number of deletions |
levenshtein | double | The total edit distance per line, over the total line length for each hunk represented as a percentage |
risk | double | Number representing how likely it is the commit will cause problems |
impact | double | Number of impact for the commit |
is_trivial | string | Returns true to indicate the commit is trivial |
ins_del_ratio | double | Ratio of inserts to deletions |
is_outlier | boolean | Returns true if the commit has been marked as an outlier |
outlier_reason | string | Reason why the commit is an outlier |
logical_code | double | Number of lines of code that are not comments or whitespace, configurable in the advanced outlier detection settings |
multi_line_comments | double | Number of comments that span across multiple lines |
single_line_comments | double | Number of comments that are single line comments |
whitespace_and_punctuation | double | Number of lines that included only whitespace or punctuation |
smart_dedupe | string | Removes duplicate commits from the response |
Example response
{
"id": 1723068782,
"aliases": [
9016910
],
"apex_users": [
8249536
],
"hexsha": "7d0ca69d8a0d32f422dda477a6be45da72ff62ec",
"is_group_commit": false,
"repo_id": 2936711,
"author_date": "2023-04-20T16:55:32",
"author_tzoffset": 21600,
"author_local_date": "2023-04-20T10:55:32",
"committer_date": "2023-04-20T16:55:32",
"committer_tzoffset": 21600,
"committer_local_date": "2023-04-20T10:55:32",
"ignore_hash": null,
"is_merge": false,
"is_pr_orphan": false,
"message": "training with surya",
"extracted_tags": [],
"external_commit_url": "https://github.com/examplelink",
"haloc": 12,
"new_work": 12,
"legacy_refactor": 0,
"help_others": 0,
"churn": 0,
"files": 2,
"hunks": 2,
"insertions": 12,
"deletions": 0,
"levenshtein": 100,
"risk": 10.924951,
"impact": 5.462476,
"is_trivial": false,
"ins_del_ratio": 1,
"is_outlier": false,
"outlier_reason": 9,
"logical_code": 12,
"multi_line_comments": 0,
"single_line_comments": 0,
"whitespace_and_punctuation": 1,
"technology_labels": [
{
"id": 6,
"name": "language:python",
"display_name": "Python"
}
],
"user_alias_id": 9016910,
"apex_user_id": 8249536
}