Skip to content

Commit d023773

Browse files
authored
chore: add action to remove extra labels on issue close [skip ci] (#1843)
1 parent a0bc64e commit d023773

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Removes pending-response and closing-soon labels when an issue is closed.
2+
3+
name: Cleanup Labels on Issue Close
4+
5+
on:
6+
issues:
7+
types: [closed]
8+
9+
permissions:
10+
issues: write
11+
12+
jobs:
13+
cleanup:
14+
name: Remove labels
15+
runs-on: ubuntu-latest
16+
if: ${{ !github.event.issue.pull_request && (contains(github.event.issue.labels.*.name, 'pending-response') || contains(github.event.issue.labels.*.name, 'closing soon')) || contains(github.event.issue.labels.*.name, 'pending-release')) }}
17+
18+
steps:
19+
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
20+
- name: remove unnecessary labels after closing
21+
shell: bash
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
ISSUE_NUMBER: ${{ github.event.issue.number }}
25+
run: |
26+
gh issue edit $ISSUE_NUMBER --remove-label "closing soon" --remove-label "pending-response" --remove-label "pending-release"

0 commit comments

Comments
 (0)