-
-
Notifications
You must be signed in to change notification settings - Fork 201
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(cli): generate changelog from JSON context #784
feat(cli): generate changelog from JSON context #784
Conversation
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #784 +/- ##
==========================================
- Coverage 39.61% 39.42% -0.18%
==========================================
Files 20 20
Lines 1606 1634 +28
==========================================
+ Hits 636 644 +8
- Misses 970 990 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This would be more useful if we added an optional free-form dictionary (e.g., |
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.
Damn, this is nice! Thanks for going ahead and implementing it 🔥
This would be more useful if we added an optional free-form dictionary (e.g., additional_data) to both Release and Commit. In the current state, we may only change the existing context fields.
I definitely agree, would love to have that. We can use serde_json::Value
for that I reckon.
A couple of things:
- We should update the documentation about this. We can create a new page under
/docs/usage
. (I'm okay with adding it if you are not interested :)) - Can you add a fixture test to verify this behavior?
Great! Is
If you could just push a file with some kind of an outline here, I'll be glad to fill it in.
Absolutely, once we've settled on the extra attribute name. |
Yes, I think |
@orhun I added the |
Ah, there is a custom git-cliff/git-cliff-core/src/commit.rs Line 397 in a71649b
|
@orhun I added a simple docs page and everything except Docker automated builds passed - those are still running. |
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.
Hot stuff 🔥
I pushed some commits to improve this even further:
- now supports
GIT_CLIFF_CONTEXT
environment variable - remote data is made available via calling
add_remote_data
on context - support stdin out of the box via checking
is_terminal()
(e.g.cat context.json | git-cliff
) - updated docs
I think this opens so many doors as an extension point, so thanks a lot again! <3
Oops, ref: 135938f |
Thanks for the review and for the improvements, I can't wait to use it! |
Will cook up a release pretty soon 🤞🏼 |
Congrats on merging your first pull request! ⛰️ |
Description
This implements generating a changelog from a pre-generated JSON context, which allows for more extensibility.
Motivation and Context
How Has This Been Tested?
As of now, only manual tests have been performed. I'm not sure what the best strategy for unit-testing this would be.
Types of Changes
Checklist: