A commitizen adapter for Jira smart commits.
For a quick global installation of the plugin, simply run the install.sh
script present in this repo:
chmod +x install.sh
./install.sh
Install this adapter
npm i @hyperia/hyperia-commitizer
{
"path": "node_modules/@hyperia/hyperia-commitizer"
}
- with pre-commit
git cz
- without pre-commit
git cz -n
after run:
- run auto command:
git add -A
- questions:
- <list (type)>: Type of operation:
['task', 'bug', 'fix', 'update', 'merging', 'test', 'refactoring', 'experiment']
- <list (from)>: Where did you come from?:
['develop', 'beta', 'rc-branch', 'master', 'other']
- if (from == other): <input (fromManual)>: Name of the parent branch:
- <input (workflow)>: Job description:
- <list (pushing)>: Do you want to PUSH automatically?
['yes','no']
- <list (type)>: Type of operation:
- create commit from question and actual branch name in format:
<shortBranchName after '/' before second '-' >: <workflow> [<type> from <fromManual ?? from> ] (<actualBranchName>)
- if (pushing == yes): run auto command:
git push origin HEAD
- if actualBranchName contains
task/
- actualBranchName:
task/JIRA-5555
=> shortBranchName:JIRA-5555
- actualBranchName:
task/JIRA-5555-1
=> shortBranchName:JIRA-5555
- actualBranchName:
- if actualBranchName do not contains
task/
- actualBranchName:
rc-branch
=> shortBranchName:rc-branch
- actualBranchName:
example-branch-name
=> shortBranchName:example-branch-name
- actualBranchName:
- actual branch:
task/JIRA-5555-1
- finnal commit:
JIRA-5555: Job description... [task from dev] (task/JIRA-5555-1)