diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ab0de49bc..e038a1830 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,9 +12,9 @@ Example: -- [fix] Button: incorrect style -- [feat] Button: add color prop -- [dosc] Button: fix typo +- fix(Button): incorrect style +- feat(Button): incorrect style +- docs(Button): fix typo Allowed Types: diff --git a/build/lint-commit-msg.js b/build/lint-commit-msg.js index 70d2b2961..28c644a90 100644 --- a/build/lint-commit-msg.js +++ b/build/lint-commit-msg.js @@ -4,7 +4,7 @@ const signale = require('signale'); const gitParams = process.env.HUSKY_GIT_PARAMS; const commitMsg = fs.readFileSync(gitParams, 'utf-8').trim(); -const commitRE = /^(revert: )?\[(fix|feat|docs|perf|test|types|build|chore|refactor|breaking change)\].{1,50}/; +const commitRE = /^(revert: )?(fix|feat|docs|perf|test|types|build|chore|refactor|breaking change)(\(.+\))?: .{1,50}/; if (!commitRE.test(commitMsg)) { signale.error(`Error: invalid commit message format. @@ -13,9 +13,9 @@ Proper commit message format is required for automated changelog generation. Examples: -[fix] Button: incorrect style -[feat] Button: add color prop -[dosc] Button: fix typo +- fix(Button): incorrect style +- feat(Button): incorrect style +- docs(Button): fix typo Allowed Types: diff --git a/build/release.sh b/build/release.sh index c7104175f..c057beafa 100644 --- a/build/release.sh +++ b/build/release.sh @@ -13,7 +13,7 @@ then # commit git tag v$VERSION - git commit -am "[build] release: $VERSION" + git commit -am "build: release $VERSION" # publish git push origin dev