Crates.io | rcz |
lib.rs | rcz |
version | 0.4.17 |
source | src |
created_at | 2022-09-21 14:01:21.466918 |
updated_at | 2023-01-31 04:16:38.851216 |
description | A tool to write a commit message |
homepage | https://github.com/Cassin01/rcz |
repository | https://github.com/Cassin01/rcz |
max_upload_size | |
id | 670965 |
size | 22,291 |
A tool to write a commit message based on Conventional Commits
inspired by git-cz
cargo install rcz
# bash
function gitz() {
local output
if output=$(rcz); then
git commit -m "${output}"
else
echo "Err: failed to generate a commit message"
fi
}
or
.gitconfig
[alias]
cz = "!gitz() { if local output= ...}; gitz"
The configuration file will be automatically generated on:
Linux: ~/.config/rcz
Windows: {FOLDERID_RoamingAppData}\rcz
Mac OS: ~/Library/Preferences/rs.rcz
format = '''
{type}: {subject}'''
[[types]]
description = 'A bug fix'
value = 'fix'
emoji = '๐'
[[types]]
description = 'A new feature'
value = 'feat'
emoji = 'โจ'
[[types]]
description = 'Changes that introduces a breaking API change'
value = 'BREAKING CHANGE'
emoji = '๐ฅ'
[[types]]
description = 'build system or external dependencies'
value = 'chore'
emoji = '๐ ๏ธ'
[[types]]
description = 'CI related changes'
value = 'ci'
emoji = '๐ซ'
[[types]]
description = 'Documentation only changes'
value = 'docs'
emoji = 'โ๏ธ'
[[types]]
description = 'Changes that do not affect the meaning of the code'
value = 'style'
emoji = '๐'
[[types]]
description = 'A code change that neither fixes a bug nor adds a feature'
value = 'refactor'
emoji = '๐งน'
[[types]]
description = ' A code change that improves performance'
value = 'perf'
emoji = '๐'
[[types]]
description = 'Adding or correcting tests'
value = 'test'
emoji = '๐งช'
All section etc {scope}
that you can add on the format are bellow.
{type}
{emoji}
{description}
:warning: The string that enclosed in double brackets ({{echo 'foo'}}
, {{date}}
etc) is interpreted as shell script.
Other strings ({body}
, {footer}
, {header}
etc) is interpreted as a custom input.
The string is used as a prompt message.
Sometimes you don't have a scope and have to delete the brackets. If a space is entered for scope, brackets are removed altogether. #6
A example for your customize is bellow.
format = '''
{type}{scope}: {emoji}{subject}
{body}
{footer}'''