2021-04-08 02:15:11 +02:00
|
|
|
name: Remove Outdated Labels
|
2024-05-28 14:37:26 +02:00
|
|
|
|
2020-12-16 20:59:24 +01:00
|
|
|
on:
|
2024-05-28 15:05:21 +02:00
|
|
|
pull_request_target:
|
2020-12-16 20:59:24 +01:00
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
issues:
|
|
|
|
types:
|
|
|
|
- closed
|
|
|
|
|
2024-05-28 14:37:26 +02:00
|
|
|
permissions:
|
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
|
|
|
|
2020-12-16 20:59:24 +01: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 05:31:27 +08: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 07:56:52 +01:00
|
|
|
- uses: mondeja/remove-labels-gh-action@v2
|
2020-12-16 20:59:24 +01:00
|
|
|
with:
|
2024-03-29 05:31:27 +08:00
|
|
|
token: ${{ steps.app-token.outputs.token }}
|
2020-12-16 20:59:24 +01:00
|
|
|
labels: |
|
2023-12-05 12:50:14 +00:00
|
|
|
assessing
|
2020-12-16 20:59:24 +01:00
|
|
|
awaiting reply
|
|
|
|
duplicate
|
|
|
|
in discussion
|
|
|
|
invalid
|
|
|
|
out of scope
|
|
|
|
pending
|
2023-12-05 12:50:14 +00:00
|
|
|
permission required
|
2020-12-16 20:59:24 +01:00
|
|
|
won't add
|
2024-05-28 14:37:26 +02:00
|
|
|
|
2020-12-16 20:59:24 +01:00
|
|
|
remove-closed-pr-labels:
|
|
|
|
name: Remove closed pull request labels
|
2024-11-30 15:58:38 +01:00
|
|
|
if: |
|
|
|
|
github.event_name == 'pull_request_target' &&
|
|
|
|
(!github.event.pull_request.merged)
|
2020-12-16 20:59:24 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-03-29 05:31:27 +08: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 07:56:52 +01:00
|
|
|
- uses: mondeja/remove-labels-gh-action@v2
|
2020-12-16 20:59:24 +01:00
|
|
|
with:
|
2024-03-29 05:31:27 +08:00
|
|
|
token: ${{ steps.app-token.outputs.token }}
|
2020-12-16 20:59:24 +01:00
|
|
|
labels: |
|
|
|
|
in discussion
|
|
|
|
pending
|
2023-12-05 12:50:14 +00:00
|
|
|
assessing
|
2024-05-28 14:37:26 +02:00
|
|
|
|
2020-12-16 20:59:24 +01:00
|
|
|
remove-closed-issue-labels:
|
|
|
|
name: Remove closed issue labels
|
|
|
|
if: github.event.issue.state == 'closed'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-03-29 05:31:27 +08: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 07:56:52 +01:00
|
|
|
- uses: mondeja/remove-labels-gh-action@v2
|
2020-12-16 20:59:24 +01:00
|
|
|
with:
|
2024-03-29 05:31:27 +08:00
|
|
|
token: ${{ steps.app-token.outputs.token }}
|
2020-12-16 20:59:24 +01:00
|
|
|
labels: |
|
|
|
|
in discussion
|
|
|
|
pending
|
2023-12-05 12:50:14 +00:00
|
|
|
assessing
|