forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds a github action to auto label draft prs (apache#31518)
- Loading branch information
1 parent
0eca79c
commit 210537a
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Label Draft PRs | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- converted_to_draft | ||
jobs: | ||
label-draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check if the PR is a draft | ||
id: check-draft | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const isDraft = context.payload.pull_request.draft; | ||
core.setOutput('isDraft', isDraft); | ||
- name: Add `review:draft` Label | ||
if: steps.check-draft.outputs.isDraft == 'true' | ||
uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
labels: "review:draft" |