1use serde::Deserialize;
4use serde::Serialize;
5
6#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
7pub struct Issue {
8 pub id: i64,
9 pub node_id: String,
10 pub url: String,
11 pub repository_url: String,
12 pub labels_url: String,
13 pub comments_url: String,
14 pub events_url: String,
15 pub html_url: String,
16 pub number: i64,
17 pub state: String,
18 pub title: String,
19 pub body: Option<String>,
20 pub user: User,
21 pub labels: Vec<Label>,
22 pub assignee: Option<User>,
23 pub assignees: Vec<User>,
24 pub milestone: Option<Milestone>,
25 pub locked: bool,
26 pub active_lock_reason: Option<String>,
27 pub comments: i64,
28 pub pull_request: Option<PullRequest>,
29 pub closed_at: Option<String>,
30 pub created_at: String,
31 pub updated_at: String,
32 pub closed_by: Option<User>,
33 pub author_association: String,
34 pub state_reason: Option<String>,
35}
36
37#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
38pub struct User {
39 pub login: String,
40 pub id: i64,
41 pub node_id: String,
42 pub avatar_url: String,
43 pub gravatar_id: String,
44 pub url: String,
45 pub html_url: String,
46 pub followers_url: String,
47 pub following_url: String,
48 pub gists_url: String,
49 pub starred_url: String,
50 pub subscriptions_url: String,
51 pub organizations_url: String,
52 pub repos_url: String,
53 pub events_url: String,
54 pub received_events_url: String,
55 pub type_field: Option<String>,
56 pub site_admin: bool,
57}
58
59#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
60pub struct Label {
61 pub id: i64,
62 pub node_id: String,
63 pub url: String,
64 pub name: String,
65 pub description: String,
66 pub color: String,
67 pub default: bool,
68}
69
70#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
71pub struct Milestone {
72 pub url: String,
73 pub html_url: String,
74 pub labels_url: Option<String>,
75 pub id: i64,
76 pub node_id: String,
77 pub number: i64,
78 pub state: String,
79 pub title: String,
80 pub description: Option<String>,
81 pub open_issues: Option<i64>,
82 pub closed_issues: Option<i64>,
83 pub created_at: String,
84 pub updated_at: Option<String>,
85 pub closed_at: Option<String>,
86 pub due_on: Option<String>,
87}
88
89#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
90pub struct PullRequest {
91 pub url: String,
92 pub html_url: String,
93 pub diff_url: String,
94 pub patch_url: String,
95}