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 <sawiddis@amazon.com>

* Correct label config based on actual labels available

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

---------

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
(cherry picked from commit c8fb54e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Dec 27, 2023
1 parent 8e18097 commit a94067e
Show file tree
Hide file tree
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
Expand Up @@ -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/enforce-label-action@2.1.0
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 a94067e

Please sign in to comment.