Skip to content

Commit

Permalink
build(commitizen): do not run on main, next, or release branches (#24258
Browse files Browse the repository at this point in the history
)
  • Loading branch information
willmartian authored Nov 25, 2021
1 parent 89e4bc5 commit 7f61b06
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"release.dev": "node .scripts/release-dev.js",
"release.prepare": "node .scripts/prepare.js",
"release": "node .scripts/release.js",
"changelog": "conventional-changelog -p angular -i ./CHANGELOG.md -k core -s"
"changelog": "conventional-changelog -p angular -i ./CHANGELOG.md -k core -s",
"commitizenBranches": "git-branch-is -q --not -r \"^(main|next|release-)\""
},
"devDependencies": {
"@commitlint/cli": "^13.1.0",
Expand All @@ -18,6 +19,7 @@
"cz-conventional-changelog": "^3.3.0",
"execa": "^0.10.0",
"fs-extra": "^7.0.0",
"git-branch-is": "^4.0.0",
"husky": "^4.3.8",
"inquirer": "^6.0.0",
"listr": "^0.14.0",
Expand All @@ -34,8 +36,8 @@
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true"
"commit-msg": "npm run commitizenBranches --silent && commitlint -E HUSKY_GIT_PARAMS || true",
"prepare-commit-msg": "npm run commitizenBranches --silent && exec < /dev/tty && git cz --hook || true"
}
}
}

0 comments on commit 7f61b06

Please sign in to comment.