Skip to content

Commit

Permalink
ci: Add PR title validation workflow (#341)
Browse files Browse the repository at this point in the history
- Validate pull request titles using the `thehanimo/pr-title-checker` GitHub Action.
  • Loading branch information
EttyKitty committed Dec 28, 2024
1 parent 69a9637 commit 50c1c9e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"LABEL": {
"name": "",
"color": "EEEEEE"
},
"CHECKS": {
"regexp": "(feat|fix|ci|chore|docs|test|refactor|revert)(\\([^\\)]+\\))?\\!?: .{1,}$|(?:Bump .+)$|^Release [0-9]+\\.[0-9]+\\.[0-9]+$|^Merge master into develop"
},
"MESSAGES": {
"failure": "Invalid PR Title. Please use the following formats: 'commit type(area of change(optional)): Title'. Refer to the list of [conventional commit types](https://github.com/pvdlg/conventional-commit-types?tab=readme-ov-file#commit-types)."
}
}
17 changes: 17 additions & 0 deletions .github/workflows/pr-title-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "PR Title Checker"
on:
pull_request:
types:
- opened
- edited

jobs:
check:
name: Validate PR Title
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.4.3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json #(optional. defaults to .github/pr-title-checker-config.json)

0 comments on commit 50c1c9e

Please sign in to comment.