From eb6ab00be48f425f8616caaea1bceb60f09b1d62 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sat, 18 Dec 2021 20:10:21 -0500 Subject: [PATCH] added deserialization fields for pull requests --- src/pr.rs | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 451 insertions(+) diff --git a/src/pr.rs b/src/pr.rs index e69de29..132e300 100644 --- a/src/pr.rs +++ b/src/pr.rs @@ -0,0 +1,451 @@ +use serde_derive::{Deserialize, Serialize}; + +pub struct PullRequest; + +#[derive(Serialize, Deserialize)] +pub struct MultiplePullRequests { + pub data: Vec, + pub ok: bool, +} + +#[derive(Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PR { + pub assignee: Assignee, + pub assignees: Vec, + pub base: Base, + pub body: String, + #[serde(rename = "closed_at")] + pub closed_at: String, + pub comments: i64, + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "diff_url")] + pub diff_url: String, + #[serde(rename = "due_date")] + pub due_date: String, + pub head: Head, + #[serde(rename = "html_url")] + pub html_url: String, + pub id: i64, + #[serde(rename = "is_locked")] + pub is_locked: bool, + pub labels: Vec