pub struct FullCommit {
pub sha: String,
pub node_id: String,
pub commit: CommitDetails,
pub author: Option<IssueUser>,
pub committer: Option<IssueUser>,
pub parents: Vec<CommitReference>,
pub url: String,
pub html_url: String,
pub comment_count: u32,
}Expand description
A complete GitHub commit with all metadata.
Named FullCommit to distinguish it from the minimal [Commit] struct in
repository.rs which only carries a sha and url.
§Examples
let commit = client.get_commit("owner", "repo", "main").await?;
println!("Latest commit: {} by {}",
commit.sha,
commit.commit.author.name);Fields§
§sha: StringCommit SHA (40-character hexadecimal hash).
node_id: StringNode ID for GraphQL API.
commit: CommitDetailsGit-level commit details (message, author, tree, etc.).
GitHub user who authored the commit.
None when the author email does not match any GitHub account.
committer: Option<IssueUser>GitHub user who committed the change.
None when the committer email does not match any GitHub account.
parents: Vec<CommitReference>Parent commits. Empty for the initial commit; two entries for merge commits.
url: StringAPI URL for this commit.
html_url: StringWeb interface URL for this commit.
comment_count: u32Number of comments on this commit (GitHub-level, at the commit envelope).
The GitHub API returns this field at both the FullCommit level and inside
CommitDetails. Both values are preserved here because the API response
contains the count at each level of the object.
Trait Implementations§
Source§impl Clone for FullCommit
impl Clone for FullCommit
Source§fn clone(&self) -> FullCommit
fn clone(&self) -> FullCommit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more