Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨feat(config) add option to customize commit message #66

Merged
merged 5 commits into from
Jul 24, 2022
Merged

Conversation

ngryman
Copy link
Owner

@ngryman ngryman commented Oct 16, 2021

It looks like #53 became stale, so I finished it here.
Kudos to @AndreAugustoAAQ for starting this!

This PR mostly fixes a couple of regressions:

  • The script was crashing because the config object was undefined.
  • Now we've introduced a user-provided format, optional fields (ie. scope) can leave multiple consecutive whitespaces when not provided. I prevented multiple spaces in the finale commit message, which is I believe a good way to sanitize the message anyway.

@AndreAugustoAAQ, @luizcorreia, @rossignolli Could you take a look at this as you were involved in the previous PR?
Thanks!


Fixes #51 #52 #53 #43 #31 #32

AndreAugustoDev and others added 4 commits February 26, 2021 15:27
🔧 added 'format' option in the configuration to be able to customize the commit message

📝 (readme) add customize commit message section

BREAKING CHANGE:
💥 remove conventional config option (this is replaced by new customize commit message option)
@luizcorreia
Copy link

It's good to me.
I'll try make tests to this.

@AndreAugustoDev
Copy link
Contributor

I made changes for my usage and pushed it to the dev-fixes branch,
Additions of new gitmoji emojis have been made in dev-add-emojis, but with the PR #68 merge it will only be missing one newly added emoji

Adding custom format does not break conventional option
https://github.com/AndreAugustoAAQ/cz-emoji/tree/dev-add-emojis

@ngryman ngryman merged commit 32f3f49 into master Jul 24, 2022
@ngryman ngryman deleted the dev-fixes branch July 24, 2022 16:38
ngryman added a commit that referenced this pull request Jul 24, 2022
…ominicrico

* ✨ (config) add option to customize commit message

🔧 added 'format' option in the configuration to be able to customize the commit message

📝 (readme) add customize commit message section

BREAKING CHANGE:
💥 remove conventional config option (this is replaced by new customize commit message option)

* 🚧 tests for suggested code at #53

* 🐛 fix crash caused by an undefined config object

* 🐛 only allow at most one space in the commit message

* 🐛 do not override user provided format (thanks @dominicrico)

Co-authored-by: André Augusto <andreaugustoqueiroz999@gmail.com>
ngryman added a commit that referenced this pull request Jul 24, 2022
…ominicrico for the fixes!

* ✨ (config) add option to customize commit message

🔧 added 'format' option in the configuration to be able to customize the commit message

📝 (readme) add customize commit message section

BREAKING CHANGE:
💥 remove conventional config option (this is replaced by new customize commit message option)

* 🚧 tests for suggested code at #53

* 🐛 fix crash caused by an undefined config object

* 🐛 only allow at most one space in the commit message

* 🐛 do not override user provided format (thanks @dominicrico)

Co-authored-by: André Augusto <andreaugustoqueiroz999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants