Skip to content

Commit 8f47ac1

Browse files
committed
GH Actions: auto-remove label tweaks
PR 897 made a change to the "auto remove labels" workflow, but that change couldn't be tested until merged as it used the `pull_request_target` event, which always reads the workflows from the `master` branch and not from a PR branch. I've now tested the change and while the _new_ addition looks to be correct, one of the pre-existing jobs _also_ ran, while it shouldn't have run. This new commit attempts to fix that. Again, we can't test this until merged, but will test once it has been merged.
1 parent 880f321 commit 8f47ac1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/label-remove-outdated.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ jobs:
6262
6363
on-pr-close:
6464
runs-on: ubuntu-latest
65-
if: github.repository_owner == 'PHPCSStandards' && github.event_name == 'pull_request_target' && github.event.pull_request.merged == false
65+
# yamllint disable-line rule:line-length
66+
if: github.repository_owner == 'PHPCSStandards' && github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == false
6667

6768
name: Clean up labels on PR close
6869

0 commit comments

Comments
 (0)