Commits¶
Zendev can create a commit interactively and validate messages against one of three profiles.
Select a profile¶
Set the repository default in pyproject.toml:
The available profiles are:
| Profile | Contract |
|---|---|
zendev |
A Gitmoji emoji or shortcode paired with its canonical commit type. |
conventional |
Conventional Commits 1.0.0, including scopes, breaking changes, bodies, and footers. |
gitmoji |
Gitmoji title syntax with Unicode or shortcode intentions and an optional scope or body. |
auto reads the nearest [tool.zendev.commit] table and falls back to the
zendev profile.
Create a commit¶
Stage the intended files, then run:
The command prompts for type, scope, summary, body, breaking-change status, and
footer, then invokes git commit with the assembled message.
Examples accepted by the zendev profile include:
Git-generated Merge, Revert, fixup!, squash!, amend!, and reword!
prefixes are accepted.
Validate without committing¶
Validate a title directly:
Validate a complete commit-message file and select a profile explicitly:
Install the reusable hook through prek to make this a commit-time gate.