GeezerVison is showing github.com — build: update lint-commit-msg rules (#4167) · present/vant@66f3aac
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md +3-3Lines changed: 3 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
12 | 12 |
|
13 | 13 | Example: |
14 | 14 |
|
15 | | -- [fix] Button: incorrect style |
16 | | -- [feat] Button: add color prop |
17 | | -- [dosc] Button: fix typo |
| 15 | +- fix(Button): incorrect style |
| 16 | +- feat(Button): incorrect style |
| 17 | +- docs(Button): fix typo |
18 | 18 |
|
19 | 19 | Allowed Types: |
20 | 20 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: build/lint-commit-msg.js +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ const signale = require('signale'); |
4 | 4 | const gitParams = process.env.HUSKY_GIT_PARAMS; |
5 | 5 | const commitMsg = fs.readFileSync(gitParams, 'utf-8').trim(); |
6 | 6 |
|
7 | | -const commitRE = /^(revert: )?\[(fix|feat|docs|perf|test|types|build|chore|refactor|breaking change)\].{1,50}/; |
| 7 | +const commitRE = /^(revert: )?(fix|feat|docs|perf|test|types|build|chore|refactor|breaking change)(\(.+\))?: .{1,50}/; |
8 | 8 |
|
9 | 9 | if (!commitRE.test(commitMsg)) { |
10 | 10 | signale.error(`Error: invalid commit message format. |
@@ -13,9 +13,9 @@ Proper commit message format is required for automated changelog generation. |
13 | 13 |
|
14 | 14 | Examples: |
15 | 15 |
|
16 | | -[fix] Button: incorrect style |
17 | | -[feat] Button: add color prop |
18 | | -[dosc] Button: fix typo |
| 16 | +- fix(Button): incorrect style |
| 17 | +- feat(Button): incorrect style |
| 18 | +- docs(Button): fix typo |
19 | 19 |
|
20 | 20 | Allowed Types: |
21 | 21 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: build/release.sh +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
13 | 13 |
|
14 | 14 | # commit |
15 | 15 | git tag v$VERSION |
16 | | - git commit -am "[build] release: $VERSION" |
| 16 | + git commit -am "build: release $VERSION" |
17 | 17 |
|
18 | 18 | # publish |
19 | 19 | git push origin dev |
|