Search by category #97
Workflow file for this run
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
# Draft PRs are a paid feature. | |
# This simulates them by adding a draft label check. | |
name: Check draft status | |
on: | |
pull_request: | |
types: | |
- labeled | |
- unlabeled | |
- synchronize | |
branches: | |
- main | |
env: | |
labels: ${{ toJson(github.event.pull_request.labels) }} | |
jobs: | |
check-draft-status: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check for draft label | |
run: | | |
hasDraftLabel=$(echo "$labels" | jq '.[] | select(.name == "draft")') | |
echo "$hasDraftLabel" | |
if [ -n "$hasDraftLabel" ]; then | |
echo "Draft PRs can not be merged. Remove the draft label when this PR is ready." | |
exit 1 | |
fi |