-
Notifications
You must be signed in to change notification settings - Fork 413
36 lines (33 loc) · 1.19 KB
/
commit_message.yaml
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
name: Check commit message
concurrency:
group: commit-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
check_commit_message:
runs-on: ubuntu-latest
steps:
- name: Check Type
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(feat|fix|docs|style|refactor|chore|perf|test|build|ci|revert)(\(.*\))?:'
error: 'Commit type must be one of the following: feat|fix|docs|style|refactor|chore|perf|test|build|ci|revert.'
excludeDescription: true
- name: Check Format
uses: gsactions/commit-message-checker@v2
with:
pattern: '^(\w+)(\([^()]+\))?:\s(.+)$'
error: 'Your commit message is not formatted, check the docs for more details: https://ekuiper.org/docs/en/latest/CONTRIBUTING.html#commit-message-guidelines'
excludeDescription: true
- name: Check Length
uses: gsactions/commit-message-checker@v2
with:
pattern: '^.{5,50}$'
error: 'The maximum commit title length of 50 characters is exceeded.'
excludeDescription: true