-
-
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
feat(changelog): support parsing commits by footer #569
Conversation
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
Thanks for the PR!
I'm wondering if the same can be achieved with I'm also wondering if this is useful for #382. But I'm guessing "This commit reverts" is not a part of the footer.
That is the expected behavior so I recommend you to either add a new Overall, I think this might be useful. Can you update the documentation about the existence of |
ping @jan-ferdinand 🙂 |
Other things have come up and are more pressing right now; I'll come back to this. Apologies if that creates inconveniencies. |
No worries! |
ping |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #569 +/- ##
==========================================
+ Coverage 36.29% 36.44% +0.15%
==========================================
Files 19 19
Lines 1455 1460 +5
==========================================
+ Hits 528 532 +4
- Misses 927 928 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for ping & patience. I have made the following changes, most of which were requested or guided towards:
I would like to have some additional guidance on the following points:
|
Thanks for picking up on this!
I think it is good enough! I will mention this feature in the news so it should be visible enough.
Yes, we can go ahead with it. Alternatively, I'm not sure if there are any actions needed but, you can report this to git-conventional (which
I would rather have them as comment like they are now. Good to have the references 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, there is only one conflict that needs to be resolved then we are good to go!
Took me long enough. 🤷 Thanks for your patience!
👌
I had opened a PR in trying to resolve this issue. The maintainer chose to stay consistent with the reference implemenation rather than deviating from it, a decision I can understand.
👍 Thanks for your guidance. 😊 I'm going to rebase & force-push in hopes of removing the blocking conflict. Edit: I have also squashed all commits and changed the commit message. Let me know if any of that goes against this project's guidelines. 😌 |
Enable defining parsers for a commit's footer, similar to the already- present commit parsers for a commit's message or body. For example: ```toml commit_parsers = [ { footer = "changelog: ignore", skip = true }, ] ``` Due to an inconsistency between the conventional commits specification and its reference parser, footers are currently interpreted as `key:value` instead of the (correct) `key: value`. See conventional-commits/parser#47 for details. As a future-proof workaround, you can use `key: ?value` in the regex.
Congrats on merging your first pull request! ⛰️ |
Description
Enable footer-based commit parsing. The idea is to add functionality like
I would appreciate some guidance – is this useful, desired, worth it, …?
Motivation and Context
In order to keep my changelogs concise, I would like to ignore certain commits. I would like to specify whether a commit should be ignored in the commit message. A somewhat elegant way to achieve this (I think) would be to include a footer like
changelog: ignore
.(If you have a better way to approach this, I'm happy to learn of it.)
How Has This Been Tested?
Append existing tests that create sample changelogs.
The test
changelog_generator_split_commits
is failing. It appears that a footer's value (but not the key) makes its way into the changelog. This might be because the footer's key is interpreted as a conventional commit type. I would appreciate some guidance here.Possible Limitations
The conventional commits' specification and the reference implementation of its parser are currently out of sync. This might mean that the commit parser
{footer = "Hello: world"}
does not work (even though it should), whereas the commit parser{footer = "Hello:world"}
does work (even though omitting the space goes against the specification).Some relevant issues concerning footer parsing are:
:
token in footers conventional-commits/parser#47:
requires space crate-ci/git-conventional#54Types of Changes
Checklist: