summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-01-12 11:11:12 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-01-12 11:42:16 +0100
commitda2a4f6a2ec5d48ad1507824898124f605f67d91 (patch)
treeac00e20480bea8b11513e6dfa9e9df3b60d6fa68 /.github
parent2c281e6db56c2d89a8f43e5946bc505d2ce39c43 (diff)
downloadsystemd-da2a4f6a2ec5d48ad1507824898124f605f67d91.tar.gz
ci: Fix PR labeling
Make sure we only add labels to open pull request and remove labels from closed pull requests.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/labeler.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 400e8c6fb6..e7e61bcacd 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -21,14 +21,14 @@ jobs:
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({
@@ -83,7 +83,7 @@ jobs:
})
- 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",