Skip to content

Commit

Permalink
add some of the missing fields to PullRequest (#386)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
0xB10C authored Jun 1, 2023
1 parent 92d1ca9 commit 34bb086
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/models/pulls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ pub struct PullRequest {
pub draft: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub repo: Option<Box<Repository>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub additions: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub deletions: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub changed_files: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub commits: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub review_comments: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub comments: Option<u64>,
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand Down

0 comments on commit 34bb086

Please sign in to comment.