Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fd2943f

Browse files
workflows: Add commit message check.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
1 parent d41a2f4 commit fd2943f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

‎.github/workflows/commit_check.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'Check Commit Message'
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
branches:
11+
- 'main'
12+
13+
jobs:
14+
check-commit-messages:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Check commit messages format'
18+
uses: gsactions/commit-message-checker@v2
19+
with:
20+
pattern: '^[^!]+: [A-Za-z]+.+ .+$'
21+
flags: 'gm'
22+
error: 'Commit subject line must match the following pattern: <scope>: <description>'
23+
excludeTitle: 'false'
24+
excludeDescription: 'true'
25+
checkAllCommitMessages: 'true'
26+
accessToken: ${{ secrets.GITHUB_TOKEN }}
27+
- name: 'Check commit messages length'
28+
uses: gsactions/commit-message-checker@v2
29+
with:
30+
pattern: '^[^#].{10,80}$'
31+
error: 'Commit subject line maximum line length of 80 characters is exceeded.'
32+
excludeTitle: 'false'
33+
excludeDescription: 'true'
34+
checkAllCommitMessages: 'true'
35+
accessToken: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /