Skip to main content

No project description provided

Project description

Conventionalish

Patch Commitizen's Conventional Commits implementation with additional prefixes.

By default, Commitizen will use its Conventional Commits implementation, so when you run cz commit, you will get a choice of

  • fix:
  • feat:
  • docs:
  • style:
  • refactor:
  • perf:
  • test:
  • build:
  • ci:

Commitizen has a robust system for building your own commit patterns, and it's great if you want to start from scratch. But if you want to make a small change to the defaults and keep the nice prompts, commit-message linting, and changelog-building provided by Commitizen, you will have to create or update six patterns or regexps. This script inherits from ConventionalCommitsCz and patches in new choices and associated properties. FWIW, despite the ish in the name conventionalish, these changes will still meet the Conventional Commits standard (at least as much as Commitizen does) as long as the feat: and fix: prefixes remain.

Should you want to accomplish this by hand:

  1. inherit from ConventionalCommitsCz
  2. overload .questions() # for commit prompts
  3. overload .schema_pattern() # for commit-message linting

Will your addition affect versioning?

  1. overload .bump_pattern # for commitizen bump
  2. overload .bump_map # for commitizen bump
  3. overload .commit_parser # for commitizen changelog
  4. overload .change_type_map # for commitizen changelog
  5. overload .changelog_pattern # for commitizen changelog

Usage

To make these changes using a script:

  1. clone this project into your project root
  2. edit the QUESTIONS value at the top of questions.py. The default value will give near-identical behavior to the Commitizen default.
  3. install conventionalish in your project venv (poetry add .\conventionalish; pip install .\conventionalish; ...) or upload to PyPi with a new name.
  4. run with cz -n cz_conventionalish or add the following to pyproject.toml
[tool.commitizen]
name = "cz_conventionalish"

Troubleshooting, Q&A

I updated the file, but Commitizen doesn't recognize the changes.

This is an installed package, depending how you installed it, you may need to:

  1. delete any commitizenish/build or commitizenish/egg-info directories
  2. uninstall
  3. reinstall

How can I change the project name (conventionalish)?

  1. change the name of this folder after you clone it
  2. update the line name="conventionalish" in conventionalish/pyproject.toml to name="new_folder_name"

How can I change the commit-rule name (cz_conventionalish)?

  1. change the filename conventionalish/cz_conventionalish.py to conventionalish/cz_new_name.py
  2. change the line { include = "cz_conventionalish.py" } in conventionalish/pyproject.toml to { include = "cz_new_name.py" }

Author

Shay Hill (shay_public@hotmail.com)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conventionalish-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

conventionalish-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file conventionalish-0.1.1.tar.gz.

File metadata

  • Download URL: conventionalish-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.1 CPython/3.11.0 Windows/10

File hashes

Hashes for conventionalish-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5bd53430ddcfc38ec56354686d88754b8b14a7a6ebf4603177ac12e4bc5b6298
MD5 7e6b18bd74b8227a8e50f1d96efc009e
BLAKE2b-256 3d77602fb3ba2f797b7d2a996128f36d747b6c77632920b2e66c5916fbac3054

See more details on using hashes here.

File details

Details for the file conventionalish-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for conventionalish-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7f0076f455701b053173f4459d0ebec4cedbabcadee37de5ceec892a2158bbd6
MD5 e7aa177d24cdae3de8d7d37751783fc2
BLAKE2b-256 3a2a6a35a287b35889186dd2fbb702482d87758f54776baf6ab9869d308c2de3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page