@@ -79,11 +79,7 @@ fn update_proposal_review_status(repo: &str, proposal_id: i32) -> DashResult<()>
79
79
reviewed,
80
80
l) ;
81
81
82
- if reviewed {
83
- Some ( username)
84
- } else {
85
- None
86
- }
82
+ if reviewed { Some ( username) } else { None }
87
83
} else {
88
84
None
89
85
}
@@ -154,28 +150,32 @@ fn evaluate_nags() -> DashResult<()> {
154
150
155
151
// attempt to add the final-comment-period label
156
152
// TODO only add label if FCP > 1 day
157
- let label_res = GH . add_label ( & issue. repository , issue. number , "final-comment-period" ) ;
158
-
159
- let added_label = match label_res {
160
- Ok ( ( ) ) => true ,
161
- Err ( why) => {
162
- error ! ( "Unable to add FCP label to {}#{}: {:?}" ,
163
- & issue. repository,
164
- issue. number,
165
- why) ;
166
- false
167
- }
168
- } ;
153
+ use config:: CONFIG ;
154
+ if CONFIG . post_comments {
155
+ let label_res =
156
+ GH . add_label ( & issue. repository , issue. number , "final-comment-period" ) ;
157
+
158
+ let added_label = match label_res {
159
+ Ok ( ( ) ) => true ,
160
+ Err ( why) => {
161
+ error ! ( "Unable to add FCP label to {}#{}: {:?}" ,
162
+ & issue. repository,
163
+ issue. number,
164
+ why) ;
165
+ false
166
+ }
167
+ } ;
169
168
170
- let comment_type = CommentType :: FcpAllReviewedNoConcerns {
171
- added_label : added_label,
172
- author : & initiator,
173
- status_comment_id : proposal. fk_bot_tracking_comment ,
174
- } ;
169
+ let comment_type = CommentType :: FcpAllReviewedNoConcerns {
170
+ added_label : added_label,
171
+ author : & initiator,
172
+ status_comment_id : proposal. fk_bot_tracking_comment ,
173
+ } ;
175
174
176
- // leave a comment for FCP start
177
- let fcp_start_comment = RfcBotComment :: new ( & issue, comment_type) ;
178
- fcp_start_comment. post ( None ) ?;
175
+ // leave a comment for FCP start
176
+ let fcp_start_comment = RfcBotComment :: new ( & issue, comment_type) ;
177
+ fcp_start_comment. post ( None ) ?;
178
+ }
179
179
}
180
180
}
181
181
@@ -747,8 +747,6 @@ impl<'a> RfcBotComment<'a> {
747
747
fn post ( & self , existing_comment : Option < i32 > ) -> DashResult < CommentFromJson > {
748
748
use config:: CONFIG ;
749
749
750
- // TODO don't do this if the issue is closed
751
-
752
750
if CONFIG . post_comments {
753
751
754
752
if self . issue . open {
0 commit comments