We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a27cc0f commit 126cac5Copy full SHA for 126cac5
src/handlers/no_merges.rs
@@ -135,14 +135,14 @@ pub(super) async fn handle_input(
135
136
if should_send {
137
if !first_time {
138
- // Check if the labels are already set.
+ // Check if the labels are still set.
139
// Otherwise, they were probably removed manually.
140
- if !event
141
- .issue
142
- .labels()
143
- .iter()
144
- .all(|label| config.labels.contains(&label.name))
145
- {
+ let any_removed = config.labels.iter().any(|label| {
+ // No label on the issue matches.
+ event.issue.labels().iter().all(|l| &l.name != label)
+ });
+
+ if any_removed {
146
// Assume it was a false positive, so don't
147
// re-add the labels or send a message this time.
148
state.save().await?;
0 commit comments