Provide option to support optional scope in conventional commits
Thanks for https://github.com/appleboy/CodeGPT/issues/9
It would be great to support the optional scope in conventional commits too! 😃
@Hongbo-Miao CodeGPT will generate conventional commits by default now so I don't know what you mean optional scope?
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
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
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. 🤔