From 918218d6a55335b3a631167f4c8a0eda4340c320 Mon Sep 17 00:00:00 2001 From: 0xb10c Date: Wed, 31 May 2023 16:36:43 +0200 Subject: [PATCH] add some of the missing fields to PullRequest This adds some of the fields that are missing from the PullRequest model but are present in the GitHub API response. However, I haven't checked if all fields from the API are present in the model now. The docs can be found here https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request --- src/models/pulls.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/models/pulls.rs b/src/models/pulls.rs index bb51d248..16a791ea 100644 --- a/src/models/pulls.rs +++ b/src/models/pulls.rs @@ -83,6 +83,18 @@ pub struct PullRequest { pub draft: Option, #[serde(skip_serializing_if = "Option::is_none")] pub repo: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub additions: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub deletions: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub changed_files: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub commits: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub review_comments: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub comments: Option, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]