Преглед на файлове

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.
Mark Rousskov преди 2 години
родител
ревизия
fef2551778
променени са 1 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 8 1
      src/github.rs

+ 8 - 1
src/github.rs

@@ -1928,10 +1928,17 @@ impl GithubClient {
 #[derive(Debug, serde::Deserialize)]
 pub struct GithubCommit {
     pub sha: String,
-    pub commit: GitCommit,
+    pub commit: GithubCommitCommitField,
     pub parents: Vec<Parent>,
 }
 
+#[derive(Debug, serde::Deserialize)]
+pub struct GithubCommitCommitField {
+    pub author: GitUser,
+    pub message: String,
+    pub tree: GitCommitTree,
+}
+
 #[derive(Debug, serde::Deserialize)]
 pub struct GitCommit {
     pub sha: String,