Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add scope selector #118

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

Open
bertho-zero wants to merge 11 commits into commitizen:master
base: master
Choose a base branch
Loading
from bertho-zero:scope-enum
Open

Conversation

Copy link

@bertho-zero bertho-zero commented Apr 2, 2020

No description provided.

mayrop, priscilamtzfraire, reme3d2y, Digznav, shoichiaizawa, shinoshu, henriqemalheiros, btd1337, nelson6e65, elynnaie, and 2 more reacted with thumbs up emoji mayrop, shinoshu, and henriqemalheiros reacted with eyes emoji
Copy link

any idea when this will be available? i'd like to configure custom scopes

mayrop, reme3d2y, Digznav, shinoshu, and arsnl reacted with thumbs up emoji

Copy link

mayrop commented May 6, 2020

me too !! it would be great !

priscilamtzfraire, reme3d2y, and Digznav reacted with thumbs up emoji

Copy link

Hi, when this will be available? We're waiting for this too.

mayrop, shinoshu, btd1337, and lucaslenz reacted with thumbs up emoji

Copy link
Author

Hi @jimthedev, can we have a review for this ?

Copy link

@bertho-zero oh, neat, you've been working on this as well; I didn't know about scope-enum rule though. Here's my progress so far, it's trying to change as little code as possible and be fairly backwards compatible (i.e., you have to opt into this feature): ThisIsMissEm#1

This was referenced Jul 28, 2020
Copy link

@bertho-zero just pushed my own version of this in #126, which tries to achieve the same goal in a cleaner manner (I didn't realise you already had this PR when I started writing my version), also means there's no double-prompt run.

it's fairly similar but allows users to also specify their own scope, so is less strict than your implementation. I think we could add a "don't allow free scope" option too if you wanna be really strict about scopes choices. Perhaps CZ_SCOPES_STRICT or something?

nelson6e65 reacted with thumbs up emoji

Copy link
Author

Yes, this option can be useful if the commitlint config uses the scope-enum rule.

https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/rules/src/scope-enum.ts

Copy link

@bertho-zero Okay, so, I think if scope-enum is set, given that behaviour, then CZ_SCOPES_STRICT is implied — I could probably update my branch to implement that behaviour. I'm not sure if you've had a chance to take a look at my implementation, but I've effectively separated configuration from the running of the engine, such that we can test the parsing of configuration in isolation

Still need to write tests for the flow of inputs through that though!

btd1337 reacted with thumbs up emoji

Copy link

btd1337 commented Jan 25, 2021

Any news?

nelson6e65 reacted with eyes emoji

Copy link

who's in charge of this repo? how can we get this merged?

Copy link

@btd1337 @nweajoseph I haven't had a chance to ever look at this branch again, due to a lack of time. Maybe you could contribute unit tests to the code over at #126 and rebase it? More than happy to let someone else see it to completion.

Copy link

I am really looking forward to this feature

Copy link

floross commented Jan 26, 2023

Is it possible to get this simple feature merged ? If you are a project maintainer you should be able to allow only a limited scope to ensure consistency accros commit messages.

Copy link

fredericrous commented Mar 5, 2024
edited
Loading

I tried to test the feature but did not get prompted with the scopes. what am I missing? @bertho-zero
my package.json references this branch (and I ran npm install, I can see in node_modules the allowedScopes property)

 "cz-conventional-changelog": "bertho-zero/cz-conventional-changelog#scope-enum",

I configured in package.json

 "config": {
 "commitizen": {
 "path": "cz-conventional-changelog",
 "allowedScopes": [
 "my-project1",
 "my-project2",
 "my-project3"
 ]
 }
 },

Copy link

I found a nice alternative to cz-conventional-changelog that can even autodetect the scopes if you work in a monorepo: https://github.com/Zhengqbbb/cz-git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /