Skip to content

Commit

Permalink
check for existence of removed_label on closed PR
Browse files Browse the repository at this point in the history
  • Loading branch information
USA-RedDragon committed Jul 2, 2024
1 parent af4abb4 commit f055d39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ try {
(label) => label.name === value.label,
);
} else if (value.removed_label) {
matches = !prEvent.pull_request.labels.some(
(label) => label.name === value.removed_label,
);
if (prEvent.action !== "closed") {
matches = !prEvent.pull_request.labels.some(
(label) => label.name === value.removed_label,
);
} else {
matches = prEvent.pull_request.labels.some(
(label) => label.name === value.removed_label,
);
}
}
if (matches) {
patterns = ref;
Expand Down

0 comments on commit f055d39

Please sign in to comment.