-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Missing optional scopes #8
Comments
Hello! Thanks for submitting this. It's implemented in b5df656. I thought it'd be best to make this configurable via commit_parsers = [
{ message = "^feat*", group = "Features", default_scope = "general"},
{ message = "^fix*", group = "Bug Fixes", default_scope = "other"},
{ message = "^doc*", group = "Documentation", default_scope = "unscoped"},
]
You get the following: ### Documentation
#### Config
- Document values
#### Unscoped
- Some commit message I think this meets your requirements 😃
|
Sure, that would do fine! Now, all I need is a new release so I can pull the new version in my build image so I can continue automating things. Sagol! :) |
|
Previously, cliff was sorting the commits by oldest first. Like: ``` - Support parsing the missing scopes with `default_scope` (orhun#8) - Support generating a changelog scoped to a directory (orhun#11) ``` As the PR numbers indicate, the first bullet point is definitely older than the latter. With this update, it will look like this: ``` - Support generating a changelog scoped to a directory (orhun#11) - Support parsing the missing scopes with `default_scope` (orhun#8) ``` Signed-off-by: Taylan Dogan <[email protected]>
* refactor(changelog): sort commits by newest in CHANGELOG Previously, cliff was sorting the commits by oldest first. Like: ``` - Support parsing the missing scopes with `default_scope` (#8) - Support generating a changelog scoped to a directory (#11) ``` As the PR numbers indicate, the first bullet point is definitely older than the latter. With this update, it will look like this: ``` - Support generating a changelog scoped to a directory (#11) - Support parsing the missing scopes with `default_scope` (#8) ``` Signed-off-by: Taylan Dogan <[email protected]> * refactor: add sorting flag I don't expect any other sorting types will be added so the logic consist of checking whether it is `newest` or not. One could argue with why wouldn't I make this a boolean. My answer would be, in my opinion, it lose its meaning because this is not something we want to enable or disable but something that we want to decide which pattern we want to use. So it is more like a semantic choice. Signed-off-by: Taylan Dogan <[email protected]> * docs(readme): move the explanation of sort flag to README.md Co-authored-by: orhun <[email protected]>
Is your feature request related to a problem? Please describe.
I cannot iterate over commits that are missing a scope.
According to the Tera docs of group-by, items that lack an attribute are discarded.
This means that if I want to have a scoped changelog, as per the git-cliff example, (and I do) then these commits are skipped from the changelog.
Describe the solution you'd like
I would like
git-cliff
to mark these commits in a specially named scope (maybe calledunscoped
? maybe have it configurable?) so I can iterate over them in my template and create a special section/heading for themDescribe alternatives you've considered
If git-cliff does not somehow mark these missing scopes, I do not believe there is an alternative on iterating over them.
Additional context
Some capture of the output of git-clif when scopes are missing:
Note the Documentation section that does not display any commits there (since the commit message is like
docs: some commit message
The text was updated successfully, but these errors were encountered: