Skip to content

Commit 0019571

Browse files
committed
docs: update README and .commit-check.yml
1 parent 402835d commit 0019571

File tree

2 files changed

+29
-18
lines changed

2 files changed

+29
-18
lines changed

.commit-check.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
checks:
22

33
- check: commit_message
4-
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)'
4+
regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)|(Merge).*|(fixup!.*)'
55
error: "The commit message should be structured as follows:\n\n
66
<type>[optional scope]: <description>\n
77
[optional body]\n
88
[optional footer(s)]\n\n
99
More details please refer to https://www.conventionalcommits.org"
10-
suggest: 'git commit --amend'
10+
suggest: git commit --amend --no-verify
1111

1212
- check: branch_name
13-
regex: '^(bugfix|feature|release|hotfix|task)\/.+|(master)|(main)|(HEAD)|(PR-.+)'
14-
error: 'Branches must begin with these types: bugfix/ feature/ release/ hotfix/ task/'
15-
suggest: 'git checkout -b type/branch_name'
13+
regex: ^(bugfix|feature|release|hotfix|task)\/.+|(master)|(main)|(HEAD)|(PR-.+)
14+
error: "Branches must begin with these types: bugfix/ feature/ release/ hotfix/ task/"
15+
suggest: git checkout -b type/branch_name
1616

1717
- check: author_name
18-
regex: r'^([a-zA-Z]{2,}\s[a-zA-Z]{1,}'?-?[a-zA-Z]{2,}\s?([a-zA-Z]{1,})?)'
19-
error: 'The user name seems invalid'
20-
suggest: 'git config user.name "Peter Shen"'
18+
regex: ^[a-z ,.\'-]+$|.*(\[bot])
19+
error: The committer name seems invalid
20+
suggest: git config user.name "Peter Shen"
2121

2222
- check: author_email
23-
regex: '^\S+@\S+\.\S+$'
24-
error: 'The email address seems invalid'
25-
suggest: 'git config user.email xianpeng.shen@gmail.com'
23+
regex: ^\S+@\S+\.\S+$
24+
error: The committer email seems invalid
25+
suggest: git config user.email petershen@example.com

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/commit-check/commit-check-action)
44
[![GitHub marketplace](https://img.shields.io/badge/Marketplace-commit--check--action-blue)](https://github.com/marketplace/actions/commit-check-action)
55

6-
A Github Action for checking commit message formatting, branch naming, referencing Jira tickets, and more.
6+
A Github Action for checking commit message formatting, branch naming, committer name, email, and more.
77

88
## Usage
99

@@ -57,19 +57,30 @@ jobs:
5757
- **Description**: run checks without failing
5858
- Default: 'false'
5959

60-
Note: to change the default rules of above inputs, just add your own [`.commit-check.yml`](https://github.com/commit-check/commit-check#usage) config file.
60+
Note: to change the default rules of above inputs, just add your own [`.commit-check.yml`](.commit-check.yml) config file.
6161

62-
## Add Commit Check Action badge in README
62+
https://github.com/commit-check/commit-check#usage
6363

64-
You can show Commit Check Action status with a badge in your repository README
64+
## Badging your repository
6565

66-
Example
66+
You can add a badge to your repository to show your contributors / users that you use commit-check!
67+
68+
[![Commit Check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml)
69+
70+
Markdown
71+
72+
```
73+
[![Commit Check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml)
74+
```
75+
76+
reStructuredText
6777
6878
```
69-
[![commit-check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml)
79+
.. image:: https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg
80+
:target: https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml
81+
:alt: Commit Check
7082
```
7183
72-
[![commit-check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml)
7384
7485
## Versioning
7586

0 commit comments

Comments
 (0)