mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
feat(action): remove labels after PR closed (#19639)
This commit is contained in:
parent
20d79cf46e
commit
6f4584315d
40
.github/workflows/remove-labels-after-pr-closed.yml
vendored
Normal file
40
.github/workflows/remove-labels-after-pr-closed.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: Remove labels after issue (or PR) closed
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [closed]
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Remove labels
|
||||||
|
env:
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
ISSUE_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
run: |
|
||||||
|
LABELS=(
|
||||||
|
"product-backlog"
|
||||||
|
"needs-design"
|
||||||
|
"design-in-progress"
|
||||||
|
"ready-for-dev"
|
||||||
|
"sprint-backlog"
|
||||||
|
"in-progress"
|
||||||
|
"blocked"
|
||||||
|
"needs-dev-review"
|
||||||
|
"needs-qa"
|
||||||
|
"issues-found"
|
||||||
|
"ready-for-release"
|
||||||
|
)
|
||||||
|
for LABEL in "${LABELS[@]}"; do
|
||||||
|
curl \
|
||||||
|
-X DELETE \
|
||||||
|
-H "Authorization: token $GITHUB_TOKEN" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
"https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/labels/$LABEL"
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user