Skip to content

Commit

Permalink
[Backport 2.x] Add enforce-labels action (opensearch-project#1330)
Browse files Browse the repository at this point in the history
* Add enforce-labels action



* Correct label config based on actual labels available



---------


(cherry picked from commit c8fb54e)

Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 8e18097 commit 3763bff
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/[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 3763bff

Please sign in to comment.