@@ -80,6 +80,9 @@ pub(super) async fn parse_input(
80
80
}
81
81
82
82
if let Some ( files) = & files {
83
+ // This a PR.
84
+
85
+ // Add the matching labels for the modified files paths
83
86
if cfg
84
87
. trigger_files
85
88
. iter ( )
@@ -89,19 +92,20 @@ pub(super) async fn parse_input(
89
92
name : label. to_owned ( ) ,
90
93
} ) ;
91
94
}
92
- }
93
95
94
- // Treat the following situations as a "new PR":
95
- // 1) New PRs opened as non-draft
96
- // 2) PRs opened as draft that are marked as "ready for review" for the first time.
97
- let is_new_non_draft_pr = event. action == IssuesAction :: Opened && !event. issue . draft ;
98
- let is_first_time_ready_for_review =
99
- event. action == IssuesAction :: ReadyForReview && !state. data . new_pr_labels_applied ;
100
- if cfg. new_pr && ( is_new_non_draft_pr || is_first_time_ready_for_review) {
101
- autolabels. push ( Label {
102
- name : label. to_owned ( ) ,
103
- } ) ;
104
- state. data . new_pr_labels_applied = true ;
96
+ // Treat the following situations as a "new PR":
97
+ // 1) New PRs opened as non-draft
98
+ // 2) PRs opened as draft that are marked as "ready for review" for the first time.
99
+ let is_new_non_draft_pr =
100
+ event. action == IssuesAction :: Opened && !event. issue . draft ;
101
+ let is_first_time_ready_for_review = event. action == IssuesAction :: ReadyForReview
102
+ && !state. data . new_pr_labels_applied ;
103
+ if cfg. new_pr && ( is_new_non_draft_pr || is_first_time_ready_for_review) {
104
+ autolabels. push ( Label {
105
+ name : label. to_owned ( ) ,
106
+ } ) ;
107
+ state. data . new_pr_labels_applied = true ;
108
+ }
105
109
}
106
110
107
111
if event. issue . pull_request . is_none ( )
0 commit comments