Commit Object
Represents a Git commit.
Fields
#
associatedPullRequests
The merged Pull Request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open Pull Requests associated with the commit
authors
The list of authors for this commit based on the git author and the Co-authored-by message trailer. The git author will always be first.
changedFiles
We recommend using the changedFilesIfAvailable field instead of
changedFiles , as changedFiles will cause your request to return an error
if GitHub is unable to calculate the number of changed files.
changedFilesIfAvailable
The number of changed files in this commit. If GitHub is unable to calculate
the number of changed files (for example due to a timeout), this will return
null . We recommend using this field instead of changedFiles .
history
The linear commit history starting from (and including) this commit, in the same order as git log .
pushedDate
The datetime when this commit was pushed.
submodules
Returns a list of all submodules in this repository as of this Commit parsed from the .gitmodules file.
tarballUrl
Returns a URL to download a tarball archive for a repository. Note: For private repositories, these links are temporary and expire after five minutes.
viewerCanSubscribe
Check if the viewer is able to change their subscription status for the repository.
viewerSubscription
Identifies if the viewer is watching, not watching, or ignoring the subscribable entity.
zipballUrl
Returns a URL to download a zipball archive for a repository. Note: For private repositories, these links are temporary and expire after five minutes.
Interfaces
#
Also implements GitObject , Node , Subscribable , UniformResourceLocatable .
Usages
#
References
#
- Field afterCommit from BaseRefForcePushedEvent
- Field beforeCommit from BaseRefForcePushedEvent
- Field commit from BlameRange
CommentDeletedEvent
CommitAuthor
