-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1.3 KB
/
check-commit-message.yml
File metadata and controls
42 lines (40 loc) · 1.3 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: "Commit Message Check"
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
push:
branches:
- "dev"
- "wip"
- "rfc/*"
- "feature/*"
- "bugfix/*"
- "improvement/*"
- "library/*"
- "prerelease/*"
- "hotfix/*"
- "*.*.x"
jobs:
check-commit-message:
name: "Check Commit Message"
runs-on: ubuntu-latest
steps:
- name: "Check Commit Type"
uses: gsactions/commit-message-checker@v2
with:
pattern: "^(feat|fix|rfc|docs|style|improvement|enhancement|refactor|perf|test|chore|build|ci|revert)(.+?)?: .+"
flags: "gm"
error: "Your commit title did not follow semantic versioning. Please see https://github.com/IQKV/.github/blob/dev/.github/COMMIT_CONVENTION.md"
- name: "Check Line Length"
uses: gsactions/commit-message-checker@v2
with:
pattern: "^.{6,220}$"
error: "The maximum line length of 220 characters is exceeded."
excludeDescription: "true" # this excludes the description body of a pull request
excludeTitle: "false"
checkAllCommitMessages: "false"
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true