Skip to content

Commit

Permalink
add a GitHub workflow to check for one label minimum per issue
Browse files Browse the repository at this point in the history
  • Loading branch information
fharper committed May 2, 2024
1 parent 13f554b commit db262b3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Validate that the issue has at least one label
on:
issues:
types: [opened, unlabeled]

jobs:
check_required_labels:
if: join(github.event.issue.labels) == ''
runs-on: ubuntu-latest
permissions:
issues: write
steps:

- name: Add comment
run: gh issue comment "$NUMBER" --body "$BODY"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
BODY: "This issue has no label; please add one to help filter and searching issues."

0 comments on commit db262b3

Please sign in to comment.