Skip to content

Commit fef2551

Browse files
Do not expect sha field in API response
We should eventually add in-CI testing for this kind of oops (it's fairly common when we change these) or move to auto-generated GitHub API code -- but for now this fixes commit fetching.
1 parent 1091541 commit fef2551

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/github.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,10 +1928,17 @@ impl GithubClient {
19281928
#[derive(Debug, serde::Deserialize)]
19291929
pub struct GithubCommit {
19301930
pub sha: String,
1931-
pub commit: GitCommit,
1931+
pub commit: GithubCommitCommitField,
19321932
pub parents: Vec<Parent>,
19331933
}
19341934

1935+
#[derive(Debug, serde::Deserialize)]
1936+
pub struct GithubCommitCommitField {
1937+
pub author: GitUser,
1938+
pub message: String,
1939+
pub tree: GitCommitTree,
1940+
}
1941+
19351942
#[derive(Debug, serde::Deserialize)]
19361943
pub struct GitCommit {
19371944
pub sha: String,

0 commit comments

Comments
 (0)