Gathering detailed insights and metrics for hieutran-commitlint-plugin-jira-rules
Gathering detailed insights and metrics for hieutran-commitlint-plugin-jira-rules
Gathering detailed insights and metrics for hieutran-commitlint-plugin-jira-rules
Gathering detailed insights and metrics for hieutran-commitlint-plugin-jira-rules
npm install hieutran-commitlint-plugin-jira-rules
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
A plugin that implement all jira commits messages style rules and validate commit messages. Part of commitlint-jira monorepo.
For Tips and Advanced Usage you can read this Blog Post
1npm install --save-dev @commitlint/cli commitlint-plugin-jira-rules commitlint-config-jira
1// commitlint.config.js 2module.exports = { 3 plugins: ['commitlint-plugin-jira-rules'], 4 extends: ['jira'], 5}
1// package.json 2{ 3 "husky": { 4 "hooks": { 5 "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" 6 } 7 } 8}
jira-task-id-empty
- this rule check if commit message task id is not empty.
1// If your task do not have an id use a conventional task id e.g: IB-0000 2// ❌ Bad commit messages 3git commit -m"My commit message body" 4git commit -m":My commit message body" 5// ✅ Good commit messages 6git commit -m"IB-2121, IB-21: My commit message body" 7git commit -m"IB-0000: My commit message body"
jira-task-id-max-length
- this rule check if jira task id length is loonger that the provided value.
1// Preconfigured and recommended value in commitlint-config-jira is 9 chars 2// ❌ Bad commit messages 3git commit -m"IB-2121212121212121: My commit message body" 4// ✅ Good commit messages 5git commit -m"IB-2121: My commit message body" 6git commit -m"IB-21: My commit message body"
jira-task-id-min-length
- this rule check if jira task id length is shorter that the provided value.
1// Preconfigured and recommended value in commitlint-config-jira is 3 chars 2// ❌ Bad commit messages 3git commit -m"I1: My commit message body" 4// ✅ Good commit messages 5git commit -m"IB-2121: My commit message body" 6git commit -m"IB-21: My commit message body"
jira-task-id-case
- this rule check if taskId is in provided case.
1// Preconfigured and recommended value in commitlint-config-jira is "uppercase" 2// ❌ Bad commit messages 3git commit -m"ib-21: My commit message body" 4// ✅ Good commit messages 5git commit -m"IB-2121, IB-21: My commit message body" 6git commit -m"IB-21: My commit message body"
jira-task-id-project-key
- this rule check if commit message task id starts with specific project key.
1// Accept a string or an array of strings, by default is disabled 2// For example ["PRJ1", "PRJ2"] 3// ❌ Bad commit messages 4git commit -m"IB-21: My commit message body" 5// ✅ Good commit messages 6git commit -m"PRJ1-21, PRJ1-22: My commit message body" 7git commit -m"PRJ2-21: My commit message body"
jira-commit-status-case
- this rule check if commit status is in provided case.
1// Preconfigured and recomended value in commitlint-config-jira is "uppercase" 2// ❌ Bad commit messages 3git commit -m"[wip]IB-21: My commit message body" 4// ✅ Good commit messages 5git commit -m"[WIP]IB-21: My commit message body"
jira-commit-message-separator
- this rule check if commit message separator match provided separator.
1// Preconfigured and recomended value in commitlint-config-jira is ":" 2// ❌ Bad commit messages 3git commit -m"IB-21/ My commit message body" 4git commit -m"IB-21 - My commit message body" 5git commit -m"IB-21% My commit message body" 6// ✅ Good commit messages 7git commit -m"IB-21: My commit message body"
commitlint-jira-config
rulesFor Tips and Advanced Usage you can read this Blog Post
1// commitlint.config.js 2module.exports = { 3 plugins: ['commitlint-plugin-jira-rules'], 4 extends: ['jira'], 5 rules: { 6 // to Customise/Override a rule 7+ 'jira-task-id-max-length': [2, 'always', 10] 8 // to turn off a rule 9+ 'jira-task-id-max-length': [0] 10 }, 11}
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
@Gherciu/commitlint-jira Released under the MIT License.
Authored and maintained by GHERCIU GHEORGHE with help from contributors (list).
No vulnerabilities found.
No security vulnerabilities found.