remove label if pr converts to draft (#3194)

This commit is contained in:
efb4f5ff-1298-471a-8973-3d47447115dc 2023-02-15 20:40:51 +01:00 committed by GitHub
parent ee87dc0f52
commit 1b0789ac5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions

View File

@ -1,9 +1,9 @@
name: Remove outdated labels
on:
# https://github.community/t/github-actions-are-severely-limited-on-prs/18179/15
pull_request_target:
types:
- closed
- converted_to_draft
jobs:
remove-merged-pr-labels:
name: Remove merged pull request labels
@ -23,7 +23,7 @@ jobs:
remove-closed-pr-labels:
name: Remove closed pull request labels
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged)
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) && (github.event.action != 'converted_to_draft')
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
@ -36,3 +36,14 @@ jobs:
PR: merge conflicts / rebase needed
PR/Issue: dependent
PR: stale
remove-draft-pr-labels:
name: Remove labels from draft pull requests
if: github.event_name == 'pull_request_target' && github.event.action == 'converted_to_draft'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
PR: waiting for review