pull-requests: write
steps:
- uses: actions/labeler@e54e5b338fbd6e6cdb5d60f51c22335fc57c401e
- if: github.event_name == 'pull_request_target'
+ if: github.event_name == 'pull_request_target' && github.event.action != 'closed'
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: "" # This is a workaround for issue 18671
- uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
- if: github.event_name == 'pull_request_target' && !github.event.pull_request.draft
+ if: github.event_name == 'pull_request_target' && github.event.action != 'closed' && !github.event.pull_request.draft
with:
script: |
response = await github.rest.issues.listLabelsOnIssue({
})
- uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
- if: github.event_name == 'pull_request_target' && github.event.issue.pull_request && github.event.pull_request.merged == true
+ if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.issue.pull_request
with:
script: |
for (const label of ["please-review",