Repository navigation
feat(config): add OCO_EMOJI_FULL_SPEC config option - #598
Merged
di-sukharev merged 2 commits intoNov 13, 2026
Merged
Conversation
Introduce a new `OCO_EMOJI_FULL_SPEC` boolean config key that mirrors the behaviour of the `--fgm` CLI flag but persists across runs. This allows users to enable the full GitMoji specification once via `oco config set OCO_EMOJI_FULL_SPEC=true` instead of passing `--fgm` on every invocation. The setting also applies to commits generated by the `prepare-commit-msg` git hook, which does not accept flags. Changes include: - Add `OCO_EMOJI_FULL_SPEC` to `CONFIG_KEYS` enum, `ConfigType`, `DEFAULT_CONFIG`, env config reader, validator and key details - Update `getMainCommitPrompt` to combine the flag and the new setting when deciding whether to use the full spec - Document the new config key in README alongside existing options - Add e2e and unit tests covering the new setting
di-sukharev
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #537
Problem
--fgmwas only a CLI flag, so anyone who always wants the full GitMoji spec had to pass it on every run. Theprepare-commit-msghook never passes the flag, so hook users couldn't get the full spec at all.Changes
Adds a boolean
OCO_EMOJI_FULL_SPECconfig key (defaultfalse) that does the same thing as--fgm. It works withoco config set,.envandoco config describe, and it's named to sort withOCO_EMOJIandOCO_EMOJI_POSITION_BEFORE_DESCRIPTION.The setting is read in
getMainCommitPromptnext toOCO_EMOJI, so the CLI, the hook and the@commitlintprompt path all pick it up. README is updated.One thing to note: with the setting on,
--fgm=falsedoesn't turn it off, since the flag defaults tofalse(from #472).OCO_EMOJI_FULL_SPEC=false ocoworks for a one-off. I can follow up on the flag if you'd like that changed.Tests
Tested with:
npm run test:unit(214 passing, new cases inconfig.test.tsandprompts.test.ts)npm run lintandnpm run format:checktest/e2e/cliBehavior.test.ts(24 passing, with a new test that runs the built CLI with only the setting)oco config set/oco config describeby hand, including an invalid value being rejectedI didn't run the other e2e suites, and the hook path is covered by the unit tests only.