Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add PR title validation workflow #341

Merged
merged 5 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading