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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide option to support optional scope in conventional commits #11

Open
hongbo-miao opened this issue Mar 9, 2023 · 3 comments
Open

Comments

@hongbo-miao
Copy link

hongbo-miao commented Mar 9, 2023

Thanks for #9

It would be great to support the optional scope in conventional commits too! 馃槂

@hongbo-miao hongbo-miao changed the title Option to support scope in conventional commits Support optional scope in conventional commits Mar 9, 2023
@appleboy
Copy link
Owner

appleboy commented Mar 9, 2023

@hongbo-miao CodeGPT will generate conventional commits by default now so I don't know what you mean optional scope?

@hongbo-miao
Copy link
Author

hongbo-miao commented Mar 9, 2023

Take docs(readme): improve OpenAI API Key setup process for example, in this commit message, (readme) is scope.
https://www.conventionalcommits.org/en/v1.0.0/#commit-message-with-scope

@hongbo-miao
Copy link
Author

hongbo-miao commented Mar 9, 2023

Renovate may give some ideas.

In a mono repo, it is common to provide this as a Renovate config

semanticCommitScope: '{{#if parentDir}}{{parentDir}}{{else}}deps{{/if}}'

This means by default it is using the each sub project folder name as scope. However, if it is root folder, it uses default deps as scope (as Renovate only updates dependencies which make sense to use deps as default scope in root folder).
So the commits looks like

image

For non-mono repo, it is even harder to provide a good scope for sure. Maybe only docs(readme) is easy. Unfortunately, I don't have a good idea for the rest. 馃

@hongbo-miao hongbo-miao changed the title Support optional scope in conventional commits Provide option to support optional scope in conventional commits Mar 9, 2023
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

No branches or pull requests

2 participants