From 87c54a163b44112ed9238874ca09ebe9b112267b Mon Sep 17 00:00:00 2001 From: efb4f5ff-1298-471a-8973-3d47447115dc <73130443+efb4f5ff-1298-471a-8973-3d47447115dc@users.noreply.github.com> Date: Sun, 10 Apr 2022 21:17:48 +0000 Subject: [PATCH] Auto Remove outdated labels (#2186) * Update README.md * Revert "Update README.md" This reverts commit 78805b973e5ba5c1b3639db66ac849e70c636f57. * Add files via upload --- .github/workflows/remove-outdated-labels.yml | 39 ++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/remove-outdated-labels.yml diff --git a/.github/workflows/remove-outdated-labels.yml b/.github/workflows/remove-outdated-labels.yml new file mode 100644 index 00000000..59e41593 --- /dev/null +++ b/.github/workflows/remove-outdated-labels.yml @@ -0,0 +1,39 @@ +name: Remove outdated labels +on: + # https://github.community/t/github-actions-are-severely-limited-on-prs/18179/15 + pull_request_target: + types: + - closed + issues: + types: + - closed +jobs: + remove-merged-pr-labels: + name: Remove merged pull request labels + if: github.event.pull_request.merged + runs-on: ubuntu-latest + steps: + - uses: mondeja/remove-labels-gh-action@v1.1.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + labels: | + PR: waiting for review + PR: WIP + PR: changes requested + PR: merge conflicts / rebase needed + PR/Issue: dependent + + remove-closed-pr-labels: + name: Remove closed pull request labels + if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) + runs-on: ubuntu-latest + steps: + - uses: mondeja/remove-labels-gh-action@v1.1.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + labels: | + PR: waiting for review + PR: WIP + PR: changes requested + PR: merge conflicts / rebase needed + PR/Issue: dependent