@@ -13,6 +13,8 @@ pub struct ExistingGithubIssue {
13
13
/// Just github username, no `@`
14
14
pub assignees : BTreeSet < String > ,
15
15
pub comments : Vec < ExistingGithubComment > ,
16
+ pub body : String ,
17
+ pub state : ExistingIssueState ,
16
18
}
17
19
18
20
#[ derive( Debug , Serialize , Deserialize , PartialEq , Eq , PartialOrd , Ord ) ]
@@ -28,6 +30,8 @@ struct ExistingGithubIssueJson {
28
30
number : u64 ,
29
31
assignees : Vec < ExistingGithubAssigneeJson > ,
30
32
comments : Vec < ExistingGithubCommentJson > ,
33
+ body : String ,
34
+ state : ExistingIssueState ,
31
35
}
32
36
33
37
#[ derive( Debug , Serialize , Deserialize , PartialEq , Eq , PartialOrd , Ord ) ]
@@ -47,6 +51,13 @@ struct ExistingGithubAuthorJson {
47
51
login : String ,
48
52
}
49
53
54
+ #[ derive( Debug , Serialize , Deserialize , PartialEq , Eq , PartialOrd , Ord ) ]
55
+ #[ serde( rename_all = "UPPERCASE" ) ]
56
+ pub enum ExistingIssueState {
57
+ Open ,
58
+ Closed ,
59
+ }
60
+
50
61
pub fn list_issue_titles_in_milestone (
51
62
repository : & str ,
52
63
timeframe : & str ,
@@ -61,7 +72,7 @@ pub fn list_issue_titles_in_milestone(
61
72
. arg ( "-s" )
62
73
. arg ( "all" )
63
74
. arg ( "--json" )
64
- . arg ( "title,assignees,number,comments" )
75
+ . arg ( "title,assignees,number,comments,body,state " )
65
76
. output ( ) ?;
66
77
67
78
let existing_issues: Vec < ExistingGithubIssueJson > = serde_json:: from_slice ( & output. stdout ) ?;
@@ -82,6 +93,8 @@ pub fn list_issue_titles_in_milestone(
82
93
body : c. body ,
83
94
} )
84
95
. collect ( ) ,
96
+ body : e_i. body ,
97
+ state : e_i. state ,
85
98
} ,
86
99
)
87
100
} )
0 commit comments