Skip to content

Commit fa0aa32

Browse files
[octocrab] Make some fields optional...
It looks like the CommitComparison's base_commit object uses Commit for its type, which as of recently(ish), requires repository and score. These however are not returned in the commit object from github (https://docs.github.com/en/rest/commits/commits?apiVersion=2026-03-10 seems to not have a repository object, even an optional one, in the base_commit). Just make those fields optional for now.
1 parent a27e4b2 commit fa0aa32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/models/commits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ pub struct Commit {
142142
pub node_id: String,
143143
pub parents: Vec<CommitParent>,
144144
/// Minimal Repository
145-
pub repository: MinimalRepository,
146-
pub score: f64,
145+
pub repository: Option<MinimalRepository>,
146+
pub score: Option<f64>,
147147
pub sha: String,
148148
pub text_matches: Option<Vec<SearchResultTextMatch>>,
149149
pub url: Url,

0 commit comments

Comments
 (0)