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
Additional details and impacted files@@ Coverage Diff @@
## main #784 +/- ##
==========================================
- Coverage 39.61% 39.40% -0.20%
==========================================
Files 20 20
Lines 1606 1632 +26
==========================================
+ Hits 636 643 +7
- Misses 970 989 +19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This would be more useful if we added an optional free-form dictionary (e.g., |
orhun
left a comment
There was a problem hiding this comment.
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. |
orhun
left a comment
There was a problem hiding this comment.
Hot stuff 🔥
I pushed some commits to improve this even further:
- now supports
GIT_CLIFF_CONTEXTenvironment variable - remote data is made available via calling
add_remote_dataon 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: