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

Add support for subscopes #386

Open
Wrench56 opened this issue Nov 19, 2024 · 4 comments
Open

Add support for subscopes #386

Wrench56 opened this issue Nov 19, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@Wrench56
Copy link
Contributor

Describe the feature

There have been talks in the conventional commit community about subscopes. A way of doing subscopes is fix(web/api) or fix(web:api).

The implementation of this feature is rather hard: one might have multiple levels of subscopes. A way to resolve this is nested lists that list all the allowed subtypes, sub-subtypes etc.

@Wrench56 Wrench56 added the enhancement New feature or request label Nov 19, 2024
@KeisukeYamashita
Copy link
Owner

KeisukeYamashita commented Nov 26, 2024

Thank you for reaching out!

There have been talks in the conventional commit community about subscopes

Could you give me any references that subscopes are discussed? Then, I can take a look on it!

@elcoosp
Copy link
Contributor

elcoosp commented Dec 2, 2024

Could you give me any references that subscopes are discussed? Then, I can take a look on it!

I don't know about the conventional commit community but this is a feature used in this package

@KeisukeYamashita
Copy link
Owner

Thank you, that sounds useful.
I can't make any promises, but I'm now planning to support that in the next release.

If you're able to help out, we'd gladly welcome a PR!

@Wrench56
Copy link
Contributor Author

Wrench56 commented Dec 5, 2024

I would love to help adding subscopes!

Currently I am a bit busy, but I can try to push some code out. Just want to make sure the code aligns with your ideas/conventions. So do you have an idea on how to implement this?

My proposition is to have a subscopes field that can be enabled by a flag and additionally you have to define a delimeter with "/" or ":" being the default.

Additionally we could somehow make a set of subscopes just like how the current scopes system works. The question that arises is whether we want to allow sub-subscopes and even deeper sublevels. If so, how would we want to implement that? A map of subscopes? In that case, maybe making scopes a map would be ideal:

scope:
  subscope-delimeter: "/"
  options:
    scope1:
      - subscope1
      - subscope2
    scope2:
      subscope1:
      - sub-subscope1
      - sub-subscope2

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

No branches or pull requests

3 participants