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.
Hi,
This PR adds support for
allowed_scopes
. It functions the same way asallowed_types
, except that the default list is empty, which means that all scopes are allowed.I hope the changes follow the expectations of this repo.
I am unsure about the changes I made to
CHANGELOG.md
and toreference.md
and the commit message itself.Details
This feature can be used by adding
allowed_scopes
to the config file:When using a scope not in the list, the following error is printed:
Notes
Issue #7 mentions a scope "blacklist" as well. I thought about adding a
disallowed_scopes
config as well, but It seems like added complexity at this point. If you have both allowed and disallowed lists, you probably need to check that only one of them is present in the config at the same time + maybe other things I have not thought of.If a feature for
disallowed_scopes
is also needed, I might code it up in the future if I have the time. But I feel likeallowed_scopes
can stand on its own.Resolves #7