diff --git a/dist/index.js b/dist/index.js index 41ce623..8d262f3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -36950,9 +36950,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; diff --git a/src/index.js b/src/index.js index 4cae47e..ce75712 100644 --- a/src/index.js +++ b/src/index.js @@ -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;