Extend the commitizen tools to create conventional commits and README that link to Jira and Git.
Project description
cz-git-jira-conventional
cz-git-jira-conventional is a plugin for the commitizen tools, a toolset that helps you to create conventional commit messages. Since the structure of conventional commits messages is standardized they are machine readable and allow commitizen to automaticially calculate and tag semantic version numbers as well as create CHANGELOG.md files for your releases.
This plugin extends the commitizen tools by:
- require a Jira issue id in the commit message
- create links to Git commits in the CHANGELOG.md
- create links to Jira issues in the CHANGELOG.md
When you call commitizen commit
you will be required you to enter the scope of your commit as a Jira issue id (or multiple issue ids, prefixed or without prefix, see config below).
> cz commit
? Select the type of change you are committing feat: A new feature. Correlates with MINOR in SemVer
? JIRA issues (multiple "XX-101, XY-102"): BILL-1000
? Write a short and imperative summary of the code changes: (lower case and no period)
Add a new feature
? Provide additional contextual information about the code changes: (press [enter] to skip)
- Add new params xyz to method xyz
? Is this a BREAKING CHANGE? Correlates with MAJOR in SemVer No
? Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)
feat(BILL-1000): Add a new feature
- Add new params xyz to method xyz
[main cc751fb] feat(BILL-1000): Add a new feature
1 file changed, 248 insertions(+)
create mode 100644 cz_git_jira_conventional.py
Commit successful!
The changelog created by cz (cz bump --changelog
)will contain links to the commits in Github and the Jira issues.
## v1.2.0 (2021-10-06)
### New
- **[BILL-101](https://jira.yourdomain.com/browse/BILL-101)**: ([e5c91](vuonglv1612/cz-git-jira-conventional/commit/e5c91d059f0646f19deceb8d5008486c7d70f6fe)) - add ahihi something
## v1.1.1 (2021-10-06)
### Fix
- **[BILL-121](https://jira.yourdomain.com/browse/BILL-121) [BILL-111](https://jira.yourdomain.com/browse/BILL-111)**: mlem mlem ([ea2a5](vuonglv1612/cz-git-jira-conventional/commit/ea2a5640325b3d7cc6d439a14fe68b0fdd142113))
Installation
Install with pip
python -m pip install cz-git-jira-conventional
You need to use a cz config file that has the required additional values jira_base_url
and git_repo
and may contain the optional value jira_prefix
if you are only using one Jira project (then the prefix for this project will be added automatically).
Example .cz.yaml
config for this repository
commitizen:
name: cz_git_jira_conventional
tag_format: v$version
version: 1.0.0
jira_base_url: https://myproject.atlassian.net
git_repo: https://yourgit.com/username/project
pre-commit
Add this plugin to the dependencies of your commit message linting with pre-commit
.
Example .pre-commit-config.yaml
file.
repos:
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.17.13
hooks:
- id: commitizen
stages: [commit-msg]
additional_dependencies: [cz-git-jira-conventional]
Install the hook with
pre-commit install --hook-type commit-msg
License
Distributed under the MIT License. See LICENSE
for more information.
Acknowledgements
This plugin would not have been possible without the fantastic work from:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cz_git_jira_conventional-2.3.0.tar.gz
.
File metadata
- Download URL: cz_git_jira_conventional-2.3.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 331ba7937cda69f9b55fb235094dd4e0cda3bdaeb1f206835ceaecd2c905a786 |
|
MD5 | 74746f16458d5f41c79309ab4cd4f387 |
|
BLAKE2b-256 | b3236777001684908ae8b94bbcbb1dac4543376b429bd44d26d60132a6925eb9 |
File details
Details for the file cz_git_jira_conventional-2.3.0-py3-none-any.whl
.
File metadata
- Download URL: cz_git_jira_conventional-2.3.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.1 requests/2.26.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f12faeacbbd24b779357c42e9c06d61d1e19d1327106fe7977b6d9b8fe1c2ed |
|
MD5 | 52de3aebc87f06f0a1663ab500f2af7b |
|
BLAKE2b-256 | 3a840ecc9429b05469987d832294de0258907f00b76b08fb60c8f92ef53dcca2 |