Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Force PRs to be labeled properly #1183

Merged
merged 6 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
25 changes: 25 additions & 0 deletions .github/workflows/label-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Labels

on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- reopened
- labeled
- unlabeled
- synchronize

env:
LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }}

jobs:
check-type-label:
name: ensure labeled
runs-on: ubuntu-latest
steps:
- run: |
echo "Labels: $LABELS"
if [[ "$LABELS" != *"bug"* ]] && [[ "$LABELS" != *"enhancement"* ]] && [[ "$LABELS" != *"api"* ]] && [[ "$LABELS" != *"maintenance"* ]] && [[ "$LABELS" != *"documentation"* ]]; then
echo "Please add a type label to this PR"
exit 1
fi