Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

feat: ✨ --theme gitmoji => opt-in flag feature (non-breaking) #3

Merged
merged 8 commits into from
Feb 28, 2021

Conversation

JeromeFitz
Copy link
Owner

@JeromeFitz JeromeFitz commented Feb 28, 2021

✨️ Theme

😎️ Gitmoji

Add as an opt-in (non-breaking change) to out of the box customize git-cz without incurring overhead on custom implementations (if you use this at scale).

TODO

  • ❎️ cli --gitmoji (flag)
  • cli --theme => string which defaults to default if nothing else passed
  • overrides
    • ❎️ verify --gitmoji
    • ❎️ verify .git-cz.json
    • verify --theme gitmoji
    • verify .git-cz.json => `'theme':'gitmoji'
  • keep in sync? package script to pull from: gitmoji
  • custom conversion from gitmoji to conventional-commits needs (semver)
  • ❎️ release note sections enhancement for expanded emoji list Not needed
    • ❎️ section titles Not needed
  • emoji only? type(scope) => emoji(scope)
    • 🐛️ subject
    • ❎️ 🐛 subject out of scope
    • ❎️ 🐛(scope) subject out of scope
    • 🐛️ (scope) subject
    • 🐛️ (scope): subject
  • add tests, however, emojis and strings are 😭️

Add as an opt-in (non-breaking change) to out of the box customize
`git-cz` without incurring overhead on custom implementations (if you
use this at scale).
@JeromeFitz JeromeFitz added the 🚧️ WIP Work in progress label Feb 28, 2021
Copy link
Owner Author

@JeromeFitz JeromeFitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see the code from a different perspective.

Request is made throughout to not implement as a one-off, and instead move to a theme basis where default|gitmoji would be the first (only?) two available.

I am "fine" with this as-is to be honest as it suits my personal needs perfectly, however, want to think more outside of the box a bit I guess.

There are some updates to the release-notes-generator that may need to happen now with customizations which is what I kind of want to avoid.

So since that would be out-of-scope of the implementation plan, may just see how it works (if at all) with existing overrides before spending too much time porting over writer/parserOpts as want this to be as close to default behavior as possible.

.husky/prepare-commit-msg Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Comment on lines +39 to +40
if (cliOptions.format) {
options.format = cliOptions.format;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legit think this fixes an existing bug. 🐛

lib/createState.js Outdated Show resolved Hide resolved
lib/parseArgs.js Outdated Show resolved Hide resolved
lib/parseArgs.js Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
.git-cz.json Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@JeromeFitz JeromeFitz changed the title feat: ✨ gitmoji => opt-in flag feature (non-breaking) feat: ✨ theme.gitmoji => opt-in flag feature (non-breaking) Feb 28, 2021
Also test `experiment` in release notes generator
Also very sober just more testing of conventional-commits from gitmoji
I _was_ going to rewrite the tests to pull from configuration files
however are these hard-coded at the moment because they should not be?
Can still be manually override by `git-cz --theme gitmoji` however I
imagine for `git-cz` we would like to keep things consistent.
@JeromeFitz JeromeFitz removed the 🚧️ WIP Work in progress label Feb 28, 2021
@JeromeFitz JeromeFitz changed the title feat: ✨ theme.gitmoji => opt-in flag feature (non-breaking) feat: ✨ --theme gitmoji => opt-in flag feature (non-breaking) Feb 28, 2021
@JeromeFitz
Copy link
Owner Author

Merging for canary this can be decided if this PR wants to go into git-cz or not like the others. 💯

I understand whole-heartedly about the configuration file for global config.

With so many people using gitmoji and semantic-releaese via conventional-commits am hoping to have git-cz be the best of both worlds with minimal configuration and people can extend either as before with the global config file or less boillerplate for people to use something as widely used (selfishly to me) as gitmoji.

@JeromeFitz
Copy link
Owner Author

🎉 This PR is included in version 5.0.0-canary.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JeromeFitz
Copy link
Owner Author

🎉 This PR is included in version 5.0.0-main.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JeromeFitz
Copy link
Owner Author

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@JeromeFitz
Copy link
Owner Author

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant