2021-04-08 03:15:11 +03:00
|
|
|
name: Remove Outdated Labels
|
2024-05-28 15:37:26 +03:00
|
|
|
|
2020-12-16 22:59:24 +03:00
|
|
|
on:
|
2024-05-28 16:05:21 +03:00
|
|
|
pull_request_target:
|
2020-12-16 22:59:24 +03:00
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
issues:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
|
2024-05-28 15:37:26 +03:00
|
|
|
permissions:
|
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
|
|
|
|
2020-12-16 22:59:24 +03:00
|
|
|
jobs:
|
|
|
|
remove-merged-pr-labels:
|
|
|
|
name: Remove merged pull request labels
|
|
|
|
if: github.event.pull_request.merged
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-03-29 00:31:27 +03:00
|
|
|
- uses: actions/create-github-app-token@v1
|
|
|
|
id: app-token
|
|
|
|
with:
|
|
|
|
app-id: ${{ vars.BOT_APP_ID }}
|
|
|
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
2024-03-15 09:56:52 +03:00
|
|
|
- uses: mondeja/remove-labels-gh-action@v2
|
2020-12-16 22:59:24 +03:00
|
|
|
with:
|
2024-03-29 00:31:27 +03:00
|
|
|
token: ${{ steps.app-token.outputs.token }}
|
2020-12-16 22:59:24 +03:00
|
|
|
labels: |
|
2023-12-05 15:50:14 +03:00
|
|
|
assessing
|
2020-12-16 22:59:24 +03:00
|
|
|
awaiting reply
|
|
|
|
duplicate
|
|
|
|
in discussion
|
|
|
|
invalid
|
|
|
|
out of scope
|
|
|
|
pending
|
2023-12-05 15:50:14 +03:00
|
|
|
permission required
|
2020-12-16 22:59:24 +03:00
|
|
|
won't add
|
2024-05-28 15:37:26 +03:00
|
|
|
|
2020-12-16 22:59:24 +03:00
|
|
|
remove-closed-pr-labels:
|
|
|
|
name: Remove closed pull request labels
|
2024-05-28 16:05:21 +03:00
|
|
|
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged)
|
2020-12-16 22:59:24 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-03-29 00:31:27 +03:00
|
|
|
- uses: actions/create-github-app-token@v1
|
|
|
|
id: app-token
|
|
|
|
with:
|
|
|
|
app-id: ${{ vars.BOT_APP_ID }}
|
|
|
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
2024-03-15 09:56:52 +03:00
|
|
|
- uses: mondeja/remove-labels-gh-action@v2
|
2020-12-16 22:59:24 +03:00
|
|
|
with:
|
2024-03-29 00:31:27 +03:00
|
|
|
token: ${{ steps.app-token.outputs.token }}
|
2020-12-16 22:59:24 +03:00
|
|
|
labels: |
|
|
|
|
in discussion
|
|
|
|
pending
|
2023-12-05 15:50:14 +03:00
|
|
|
assessing
|
2024-05-28 15:37:26 +03:00
|
|
|
|
2020-12-16 22:59:24 +03:00
|
|
|
remove-closed-issue-labels:
|
|
|
|
name: Remove closed issue labels
|
|
|
|
if: github.event.issue.state == 'closed'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-03-29 00:31:27 +03:00
|
|
|
- uses: actions/create-github-app-token@v1
|
|
|
|
id: app-token
|
|
|
|
with:
|
|
|
|
app-id: ${{ vars.BOT_APP_ID }}
|
|
|
|
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
|
2024-03-15 09:56:52 +03:00
|
|
|
- uses: mondeja/remove-labels-gh-action@v2
|
2020-12-16 22:59:24 +03:00
|
|
|
with:
|
2024-03-29 00:31:27 +03:00
|
|
|
token: ${{ steps.app-token.outputs.token }}
|
2020-12-16 22:59:24 +03:00
|
|
|
labels: |
|
|
|
|
in discussion
|
|
|
|
pending
|
2023-12-05 15:50:14 +03:00
|
|
|
assessing
|