feat(cz-commitlint): support customizable commit prompt with emojis#4540
feat(cz-commitlint): support customizable commit prompt with emojis#4540escapedcat merged 2 commits intoconventional-changelog:masterfrom
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
Hey guys, tabs like I mentioned here don't work well. I only have Windows 11 here, on other systems you may have different behaviors. Default configurationAdding space to force alignment in vs code |
|
@ViniDevBR I think a PR with an example with gitmoji in the documentation would be welcome. |
Nice. but i think that them will not accept this PR because of the space in powershell. But lets wait for this. About the documentation... import { UserConfig } from "@commitlint/types";
import gitmoji from 'commitlint-config-gitmoji'
/**
* @type {import('@commitlint/types').UserConfig}
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
prompt: {
questions: {
type: {
description: "Select the type of change that you're committing",
enum: {
feat: {
description: "A new feature",
title: "Features",
emoji: "✨",
},
fix: {
description: "A bug fix",
title: "Bug Fixes",
emoji: "🐛",
},
docs: {
description: "Documentation only changes",
title: "Documentation",
emoji: "📚",
},
style: {
description:
"Changes that do not affect the meaning of the code (linters)",
title: "Styles",
emoji: "🎨",
},
refactor: {
description:
"A code change that neither fixes a bug nor adds a feature",
title: "Code Refactoring",
emoji: "📦",
},
perf: {
description: "A code change that improves performance",
title: "Performance Improvements",
emoji: "🚀",
},
test: {
description: "Adding missing tests or correcting existing tests",
title: "Tests",
emoji: "🚨",
},
build: {
description:
"Changes that affect the build system or external dependencies (yarn)",
title: "Builds",
emoji: "🏗️ ",
},
ci: {
description:
"Changes to our CI configuration files and scripts (GitActions)",
title: "Continuous Integrations",
emoji: "⚙️ ",
},
chore: {
description: "Other changes that don't modify src or test files",
title: "Chores",
emoji: "♻️ ",
},
revert: {
description: "Reverts a previous commit",
title: "Reverts",
emoji: "⏪",
},
},
},
},
},
parserPreset: {
parserOpts: gitmoji.parserPreset.parserOpts,
plugins: [gitmoji.parserPreset.plugins],
},
...gitmoji.rules,
...gitmoji.plugins
} as UserConfig |
|
Sorry, @parloti are we good here? |
|
@escapedcat We are! Everything's set on my end, and the PR is ready to be merged whenever you get a chance. |
This PR contains the following updates: | Package | Type | Update | Change | Age | Confidence | |---|---|---|---|---|---| | [commitlint/commitlint](https://github.com/conventional-changelog/commitlint) | container | minor | `20.1.0` -> `20.2.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [docker.io/thegeeklab/git-sv](https://github.com/thegeeklab/git-sv) | container | patch | `2.0.8` -> `2.0.9` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) | devDependencies | minor | [`^0.46.0` -> `^0.47.0`](https://renovatebot.com/diffs/npm/markdownlint-cli/0.46.0/0.47.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>conventional-changelog/commitlint (commitlint/commitlint)</summary> ### [`v20.2.0`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#2020-2025-12-05) [Compare Source](conventional-changelog/commitlint@v20.1.0...v20.2.0) ##### Bug Fixes - update dependency glob to v11 \[security] ([#​4561](conventional-changelog/commitlint#4561)) ([a89a08b](conventional-changelog/commitlint@a89a08b)) ##### Features - **cz-commitlint:** support customizable commit prompt with emojis ([#​4540](conventional-changelog/commitlint#4540)) ([803c05b](conventional-changelog/commitlint@803c05b)) - **lint:** update ESLint configuration to use Vitest and remove Jest plugin ([#​4542](conventional-changelog/commitlint#4542)) ([63e7ad4](conventional-changelog/commitlint@63e7ad4)) - **rules:** add breaking-change-exclamation-mark ([#​4548](conventional-changelog/commitlint#4548)) ([c4d419b](conventional-changelog/commitlint@c4d419b)), closes [#​4547](conventional-changelog/commitlint#4547) </details> <details> <summary>thegeeklab/git-sv (docker.io/thegeeklab/git-sv)</summary> ### [`v2.0.9`](https://github.com/thegeeklab/git-sv/releases/tag/v2.0.9) [Compare Source](thegeeklab/git-sv@v2.0.8...v2.0.9) #### v2.0.9 (2025-12-05) ##### Others - **deps:** update docker.io/library/alpine docker tag to v3.23 ([#​260](thegeeklab/git-sv#260)) ([`2f6207a`](thegeeklab/git-sv@2f6207a)) - **deps:** update golang patch version ([#​261](thegeeklab/git-sv#261)) ([`a4cc5da`](thegeeklab/git-sv@a4cc5da)) </details> <details> <summary>igorshubovych/markdownlint-cli (markdownlint-cli)</summary> ### [`v0.47.0`](https://github.com/igorshubovych/markdownlint-cli/releases/tag/v0.47.0) [Compare Source](igorshubovych/markdownlint-cli@v0.46.0...v0.47.0) - Add output and exit code support for warnings - Update `markdownlint` dependency to `0.40.0` - Improve `MD011`/`MD013`/`MD051`/`MD060` - Update all dependencies via `Dependabot` </details> --- ### Configuration 📅 **Schedule**: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xOC4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsia2luZC9kZXBlbmRlbmN5Il19--> Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/88 Reviewed-by: DaanSelen <[email protected]> Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>








Description
This PR adds customizable emojis to the Commitlint prompt. This allows users to define richer, more informative options for commit types, which enhances the user experience and provides better context during the commit process.
Motivation and Context
The previous prompt was limited to displaying simple, text-based commit types. There was no way to add visual cues like emojis or descriptive text directly within the prompt's options, which made it less intuitive for developers. This change addresses that limitation.
TODO emoji + title
#3618
#4534
Usage examples
The documentation was updated with examples.
How Has This Been Tested?
Extensive tests were added to confirm that the
enumListis formatted correctly, alignment is handled properly, and theemojiInHeaderoption functions as expected.Types of changes
Checklist: