File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ pub(super) async fn parse_input(
2929 if matches ! (
3030 event. action,
3131 IssuesAction :: Opened
32+ | IssuesAction :: Closed
33+ | IssuesAction :: Reopened
3234 | IssuesAction :: Synchronize
3335 | IssuesAction :: ReadyForReview
3436 | IssuesAction :: ConvertedToDraft
@@ -87,16 +89,22 @@ pub(super) async fn parse_input(
8789 // 1) New PRs opened as non-draft
8890 // 2) PRs opened as draft that are marked as "ready for review".
8991 let is_new_non_draft_pr =
90- event. action == IssuesAction :: Opened && !event. issue . draft ;
92+ matches ! ( event. action, IssuesAction :: Opened | IssuesAction :: Reopened )
93+ && !event. issue . draft ;
9194 let is_ready_for_review = event. action == IssuesAction :: ReadyForReview ;
9295 if cfg. new_pr && ( is_new_non_draft_pr || is_ready_for_review) {
9396 autolabels. push ( Label {
9497 name : label. to_owned ( ) ,
9598 } ) ;
9699 }
97100
98- // If a PR is converted to draft remove all the "new PR" labels
99- if cfg. new_pr && event. action == IssuesAction :: ConvertedToDraft {
101+ // If a PR is converted to draft or closed, remove all the "new PR" labels
102+ if cfg. new_pr
103+ && matches ! (
104+ event. action,
105+ IssuesAction :: ConvertedToDraft | IssuesAction :: Closed
106+ )
107+ {
100108 to_remove. push ( Label {
101109 name : label. to_owned ( ) ,
102110 } ) ;
You can’t perform that action at this time.
0 commit comments