python提交客户端工具
commitizen的Python项目详细描述
Python 3 command line utility to standardize commit messages and bump version
文档:https://Woile.github.io/commitizen/
About
Commitizen是为团队设计的工具。
其主要目的是定义一种标准的提交规则的方式 和通信(使用commitizen提供的cli)。
它背后的原因是更容易阅读,并强制写作 描述性提交。
除此之外,在你的承诺上有一个交集,使得 分析它们并将其用于其他用途,如自动生成 版本或更改日志。
Installation
pip install -U commitizen
poetry add commitizen --dev
全局安装
sudo pip3 install -U commitizen
Features
- 命令行实用程序,用您的规则创建提交。默认值:conventional commits
- 显示有关提交规则的信息(命令:schema、example、info)
- 基于提交自动使用语义验证的bump版本。Read More
- 使用“keep a changelog”(计划功能)生成变更日志
Commit rules
此客户端工具提示用户有关提交的信息。
这是git消息历史记录的一个示例:
fix: minor typos in code feat: new command update docs: improved commitizens tab in readme feat(cz): jira smart commits refactor(cli): renamed all to ls command feat: info command for angular docs(README): added badges docs(README): added about, installation, creating, etc feat(config): new loads from ~/.cz and working project .cz .cz.cfg and setup.cfg
然后使用cz bump可以更改项目的版本
feat到MINORfix到PATCH
Usage
$ cz --help usage: cz [-h] [--debug] [-n NAME] [--version] {ls,commit,c,example,info,schema,bump} ... Commitizen is a cli tool to generate conventional commits. For more information about the topic go to https://conventionalcommits.org/ optional arguments: -h, --help show this help message and exit --debug use debug mode -n NAME, --name NAME use the given commitizen --version get the version of the installed commitizen commands: {ls,commit,c,example,info,schema,bump} ls show available commitizens commit (c) create new commit example show commit example info show information about the cz schema show commit schema bump bump semantic version based on the git log