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 check for PR titles and commit messages #1017

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all 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
29 changes: 29 additions & 0 deletions .github/workflows/semantic-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'PR and Commit Message Check'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
pull_request_target:
types:
- opened
- edited
- reopened
- synchronize

jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check Line Length
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(feat|fix|chore|docs|style|refactor|perf|ci|test)(\([\w\-]+\))?: [A-Z0-9].+'
error: 'Commit messages and PR title should match conventional commit convention and start with a majuscule.'
excludeDescription: 'true'
excludeTitle: 'false'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.GITHUB_TOKEN }}
Loading