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(
29
29
if matches ! (
30
30
event. action,
31
31
IssuesAction :: Opened
32
+ | IssuesAction :: Closed
33
+ | IssuesAction :: Reopened
32
34
| IssuesAction :: Synchronize
33
35
| IssuesAction :: ReadyForReview
34
36
| IssuesAction :: ConvertedToDraft
@@ -87,16 +89,22 @@ pub(super) async fn parse_input(
87
89
// 1) New PRs opened as non-draft
88
90
// 2) PRs opened as draft that are marked as "ready for review".
89
91
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 ;
91
94
let is_ready_for_review = event. action == IssuesAction :: ReadyForReview ;
92
95
if cfg. new_pr && ( is_new_non_draft_pr || is_ready_for_review) {
93
96
autolabels. push ( Label {
94
97
name : label. to_owned ( ) ,
95
98
} ) ;
96
99
}
97
100
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
+ {
100
108
to_remove. push ( Label {
101
109
name : label. to_owned ( ) ,
102
110
} ) ;
You can’t perform that action at this time.
0 commit comments