Skip to content

Commit

Permalink
Add enforce-labels action (#1292)
Browse files Browse the repository at this point in the history
* Add enforce-labels action

Signed-off-by: Simeon Widdis <[email protected]>

* Correct label config based on actual labels available

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Simeon Widdis <[email protected]>
Swiddis authored Dec 27, 2023
1 parent cdbcfa4 commit c8fb54e
Showing 2 changed files with 18 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/draft-release-notes-config.yml
Original file line number Diff line number Diff line change
@@ -16,30 +16,23 @@ replacers:
categories:
- title: 'Breaking Changes'
labels:
- 'Breaking Changes'
- 'breaking'
- title: 'Features'
labels:
- 'feature'
- title: 'Enhancements'
labels:
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'bug'
- title: 'Infrastructure'
labels:
- 'infra'
- 'test'
- 'dependencies'
- 'github actions'
- 'infrastructure'
- 'testing'
- 'integ-test-failure'
- 'repository'
- title: 'Documentation'
labels:
- 'documentation'
- title: 'Maintenance'
labels:
- "version compatibility"
- "maintenance"
- title: 'Refactoring'
labels:
- 'refactor'
- 'code quality'
13 changes: 13 additions & 0 deletions .github/workflows/enforce-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Enforce PR labels

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]
jobs:
enforce-label:
runs-on: ubuntu-latest
steps:
- uses: yogevbd/[email protected]
with:
REQUIRED_LABELS_ANY: "breaking,feature,enhancement,bug,infrastructure,dependencies,documentation,maintenance,skip-changelog"
REQUIRED_LABELS_ANY_DESCRIPTION: "A release label is required: ['breaking', 'bug', 'dependencies', 'documentation', 'enhancement', 'feature', 'infrastructure', 'maintenance', 'skip-changelog']"

0 comments on commit c8fb54e

Please sign in to comment.