From 34bb08621f0f2c446a71568421beb32c926d7db7 Mon Sep 17 00:00:00 2001 From: 0xB10C <19157360+0xB10C@users.noreply.github.com> Date: Thu, 1 Jun 2023 07:54:12 +0200 Subject: [PATCH] add some of the missing fields to PullRequest (#386) 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 2c539ace..2734407a 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)]