@@ -272,18 +272,14 @@ def _fcp_proposal_with_disposition(self, disposition: str):
272
272
"cancel the current one first." )
273
273
return
274
274
275
- # Remove finished FCP label if present
276
- if self .config .github_fcp_finished_label in self .proposal_labels_str :
277
- self .proposal_labels_str .remove (self .config .github_fcp_finished_label )
278
-
279
275
# Post new status comment
280
276
self ._post_or_update_status_comment (
281
277
voted_members = [self .comment ["sender" ]["login" ]],
282
278
concerns = [],
283
279
disposition = disposition ,
284
280
)
285
281
286
- # Add the relevant label
282
+ # Add the relevant disposition label
287
283
if disposition == "merge" :
288
284
self .proposal_labels_str .append (self .config .github_disposition_merge_label )
289
285
elif disposition == "postpone" :
@@ -294,6 +290,14 @@ def _fcp_proposal_with_disposition(self, disposition: str):
294
290
# Add the proposal label
295
291
self .proposal_labels_str .append (self .config .github_fcp_proposed_label )
296
292
293
+ # Remove proposal in review label if present
294
+ if self .config .github_fcp_proposal_in_review_label in self .proposal_labels_str :
295
+ self .proposal_labels_str .remove (self .config .github_fcp_proposal_in_review_label )
296
+
297
+ # Remove finished FCP label if present
298
+ if self .config .github_fcp_finished_label in self .proposal_labels_str :
299
+ self .proposal_labels_str .remove (self .config .github_fcp_finished_label )
300
+
297
301
def _process_status_comment_update_with_body (self , status_comment_body : str ):
298
302
"""Process an edit on a status comment. Checks to see if the required
299
303
threshold of voters have been met for an FCP proposal.
@@ -531,6 +535,17 @@ def _cancel_fcp(self):
531
535
else :
532
536
self ._post_comment ("This proposal is not in FCP nor has had FCP proposed." )
533
537
538
+ # Remove any disposition labels if present
539
+ if self .config .github_disposition_close_label in self .proposal_labels_str :
540
+ self .proposal_labels_str .remove (self .config .github_disposition_close_label )
541
+ if self .config .github_disposition_merge_label in self .proposal_labels_str :
542
+ self .proposal_labels_str .remove (self .config .github_disposition_merge_label )
543
+ if self .config .github_disposition_postpone_label in self .proposal_labels_str :
544
+ self .proposal_labels_str .remove (self .config .github_disposition_postpone_label )
545
+
546
+ # Add the proposal in review label back again
547
+ self .proposal_labels_str .append (self .config .github_fcp_proposal_in_review_label )
548
+
534
549
def _post_or_update_status_comment (
535
550
self ,
536
551
voted_members : List [str ] = None ,
@@ -552,8 +567,8 @@ def _post_or_update_status_comment(
552
567
"Team member @... has proposed ..."
553
568
"""
554
569
if (
555
- (voted_members is None or concerns is None or disposition is None ) and
556
- existing_status_comment is None
570
+ (voted_members is None or concerns is None or disposition is None ) and
571
+ existing_status_comment is None
557
572
):
558
573
log .error ("Attempted to auto-retrieve status comment values without providing"
559
574
"a status comment. Proposal num: #%d" , self .proposal .number )
0 commit comments