-
Notifications
You must be signed in to change notification settings - Fork 14
28 lines (26 loc) · 1.1 KB
/
check-commits.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
name: Check commit message and PR header format
on:
pull_request:
push:
branches: [main]
jobs:
check-commit-message:
runs-on: ubuntu-latest
steps:
- uses: gsactions/commit-message-checker@v2
with:
pattern: '^(feat|fix|docs|style|refactor|perf|test|chore)(\(.+\))?:\ .+$'
flags: 'gm'
error: "Commit message should match the '<type>(<scope>): <subject>' style \n
for python-semantic-release supported types:\n
feat: A new feature\n
fix: A bug fix\n
docs: Documentation only changes\n
style: Changes that do not affect the meaning of the code (white-space, formatting, missing chars...)\n
refactor: A code change that neither fixes a bug nor adds a feature\n
perf: A code change that improves performance\n
test: Adding missing or correcting existing tests\n
chore: Changes to the build process or auxiliary tools and libraries such as documentation generation\n"
accessToken: ${{ secrets.GITHUB_TOKEN }}
checkAllCommitMessages: true