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(types): add support for custom types #114

Closed
wants to merge 2 commits into from

Conversation

adrianschmidt
Copy link

Inspired by #104, but slightly different implementation that doesn't require specifying all types just to add one or more custom ones.

The limitation in this implementation is that, while types defined in conventional-commit-types can be overridden, they cannot be removed entirely.

fix #93

@adrianschmidt
Copy link
Author

I realise this probably needs tests before it's accepted, but after looking at the test file, I unfortunately feel I that I don't have the time to do that right now. But since I forked the repo to add this functionality for our own use, I thought I could just as well open a PR and see what you thought.

If the addition itself is welcomed, and only the lack of tests stops it from being merged, please tell me so, and I'll try to find the time to add those tests!

@jimthedev
Copy link
Member

Would be happy to merge if you want to rebase. There's no reason to not have both, correct? If someone wants to swap out all types that is type. If they want to add them then us additionalTypes?

@adrianschmidt adrianschmidt force-pushed the add-types-option branch 2 times, most recently from cd6a01d to 1731a9e Compare May 5, 2020 07:45
This implementation does not overwrite all existing types.
Remove example from default values section, and add a separate
example with description.
@adrianschmidt
Copy link
Author

adrianschmidt commented May 5, 2020

There we go. Rebased and ready. I also added a second commit updating the readme regarding types, so the documentation for types and additionalTypes match, and hopefully is a little clearer. Please tell me if I should remove it, or make any changes!

@adrianschmidt
Copy link
Author

@jimthedev Not sure you got a notification for my last message, so I thought I'd ping you 🙂

@ThisIsMissEm
Copy link

@adrianschmidt this seems like a change that'd be better upstream in cz-cli? Allow loading a .js file there, and then you can programmatically manipulate the types object & require conventional-commit-types.

@adrianschmidt
Copy link
Author

@adrianschmidt this seems like a change that'd be better upstream in cz-cli? Allow loading a .js file there, and then you can programmatically manipulate the types object & require conventional-commit-types.

Hmm… yeah, that might be true. Sorry for not getting back to this earlier, I haven't had the peace of mind to sit down and look at it lately. I'll close this for now, and might come back with something for cz-cli later on.

Thanks for your help!

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

Successfully merging this pull request may close these issues.

Add config option for custom types
3 participants