Skip to content

Commit

Permalink
Implement new GH labels for release categories
Browse files Browse the repository at this point in the history
  • Loading branch information
cvetty committed Dec 15, 2024
1 parent 8c877c0 commit abf9a5e
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- name: Feature
color: "0E8A16"
description: "A new feature"
- name: Improvement
color: "FBCA04"
description: "Code improvements"
- name: Dependency
color: "5319E7"
description: "Updates in dependencies"
- name: Documentation
color: "ABABAB"
description: "Documentation updates"
- name: Deprecated
color: 1D76DB
description: "Deprecated resource/feature"
- name: Removed
color: "E99695"
description: "Removed this logic"
- name: Bug
color: "B60205"
description: "Fixes a production issue"
- name: GHA
color: "0052CC"
description: "This label will be ignored from autogenerated release notes"
- name: IgnoreForRelease
color: "ABABAB"
description: "This label will be ignored from autogenerated release notes"
6 changes: 0 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ This PR [adds/removes/fixes/replaces] the [feature/bug/etc].
## Added PR Label?
- [ ] 👍 yes

## Added tests?

- [ ] 👍 yes
- [ ] 🙅 no, because they aren't needed
- [ ] 🙋 no, because I need help

## Added to documentation?

- [ ] 👍 yes
Expand Down
29 changes: 29 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .github/release.yml
# Contains configure for auto generated release notes
changelog:
exclude:
labels:
- IgnoreForRelease
categories:
- title: "Features"
labels:
- "Feature"
- title: "Improvements"
labels:
- "Improvement"
- title: "Bugs"
labels:
- "Bug"
- title: "Deprecated"
labels:
- "Deprecated"
- title: "Removed"
labels:
- "Removed"
- title: "Dependencies"
labels:
- "Dependency"
- title: "Other"
labels:
- "Documentation"
- "GHA"
22 changes: 22 additions & 0 deletions .github/workflows/ci_labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Manage labels

on:
push:
branches:
- "[0-9]+.x"
paths:
- ".github/labels.yml"
- ".github/workflows/labels.yml"

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
12 changes: 12 additions & 0 deletions .github/workflows/ci_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ env:
PHP_VERSION: "8.2.22"

jobs:
check_pr_label:
name: Check PR Label
if: github.event.pull_request.state == 'open'
runs-on: ubuntu-latest
steps:
- name: Check PR contains at least one valid label
uses: jesusvasquez333/verify-pr-label-action@v1.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: "Feature, Improvement, Dependency, Deprecated, Bug, IgnoreForRelease, Documentation, Removed, GHA"
disable-reviews: true

lint-checks:
name: Lint Checks
runs-on: "ubuntu-22.04"
Expand Down

0 comments on commit abf9a5e

Please sign in to comment.