Skip to main content

cz-github-linear-conventional

cz-github-linear-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 Linear issue id in the commit message
  • create links to GitHub commits in the CHANGELOG.md
  • create links to Linear issues in the CHANGELOG.md

When you call commitizen commit the scope is assumed from the current active branch. The Linear issue id should be available in the branch name for this. (See example below for automatically parsed issue id)

> cz commit
? Select the type of change you are committing fix: A bug fix. Correlates with PATCH in SemVer
? Linear issue number: cae-123
...

The changelog created by cz (cz bump --changelog)will contain links to the commits in Github and the Linear issues.

## 1.1.0 (2022-02-15)

### Feat

- **[cae-62](https://linear.app/caesari/issue/cae-62)**: adding support for linear issue ids because it is nice [8adc3](https://github.com/ThimDeveloper/cz-github-linear-conventional/commit/8adc39bc0cb35fff07f5c9c4b906b1b3eefd3f56)

Installation

Install with pip python -m pip install cz-github-linear-conventional

You need to use a cz config file that has the required additional values linear_base_url and github_repo. The scope or prefix for your linear issues will automatically be parsed from the current active branch and added to the commit message. This allows for automatic linking by the linear.app bot if that is set up for your linear project.

Example .cz.yaml config for this repository

commitizen:
  name: cz_github_linear_conventional
  tag_format: $version
  version: 1.0.0
  linear_base_url: https://linear.app/caesari
  github_repo: ThimDeveloper/cz-github-linear-conventional

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-github-linear-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:

Release files for cz-github-linear-conventional 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cz-github-linear-conventional 1.4.1
File Size Uploaded
cz_github_linear_conventional-1.4.1.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cz-github-linear-conventional 1.4.1
File Interpreter ABI Platform
cz_github_linear_conventional-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / cz_github_linear_conventional-1.4.1.tar.gz

Download URL cz_github_linear_conventional-1.4.1.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
338e329e517ba3c5a1a5005504da5cb30bddc6135b6d42ade4f41260d653d620
BLAKE2b-256 checksum
How to use checksums
92da70c2d6f69b4bd4f3ad23ace7f47a4afe2067b4f948dfa686758947f194ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / cz_github_linear_conventional-1.4.1-py3-none-any.whl

Download URL cz_github_linear_conventional-1.4.1-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1087568d4b02bedf1bb7c7c51ddb9d00b6deb67e98f6f9594d9b2d24493acf7
BLAKE2b-256 checksum
How to use checksums
a740b9cdb2d7371173f93a603fb6f29cbf19f061a60567e0d3e2898deb9e6958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.2.0

2 release files

1.1.4

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page