Skip to content

Commit d67d975

Browse files
committed
ci: 👷 trying to override commit-check defaults
1 parent f7458a7 commit d67d975

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.commit-check.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
checks:
2+
- check: message
3+
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ((\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]) )?([\w ])+([\s\S]*)|(Merge).*|(fixup!.*)'
4+
error: "The commit message should be structured as follows:\n\n
5+
<type>[optional scope]: <description>\n
6+
[optional body]\n
7+
[optional footer(s)]\n\n
8+
More details please refer to https://www.conventionalcommits.org"
9+
suggest: please check your commit message whether matches above regex
10+
11+
- check: branch
12+
regex: ^(bugfix|feature|release|hotfix|task|chore)\/.+|(master)|(main)|(HEAD)|(PR-.+)
13+
error: 'Branches must begin with these types: bugfix/ feature/ release/ hotfix/ task/ chore/'
14+
suggest: run command `git checkout -b type/branch_name`
15+
16+
- check: author_name
17+
regex: ^[A-Za-zÀ-ÖØ-öø-ÿ ,.\'-]+$|.*(\[bot])
18+
error: The committer name seems invalid
19+
suggest: run command `git config user.name "Your Name"`
20+
21+
- check: author_email
22+
regex: ^.+@.+$
23+
error: The committer email seems invalid
24+
suggest: run command `git config user.email [email protected]`
25+
26+
- check: commit_signoff
27+
regex: Signed-off-by:.*[A-Za-z0-9]\s+<.+@.+>
28+
error: Signed-off-by not found in latest commit
29+
suggest: run command `git commit -m "conventional commit message" --signoff`
30+
31+
- check: merge_base
32+
regex: main
33+
error: Current branch is not rebased onto target branch
34+
suggest: Please ensure your branch is rebased with the target branch

.github/workflows/commit-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
2424
with:
25-
message: false # temporarily disabled since emojis don't pass the regex test
25+
message: true
2626
branch: true
2727
author-name: true
2828
author-email: true

0 commit comments

Comments
 (0)