-
-
Couldn't load subscription status.
- Fork 255
feat: support context json schema dump #1296
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1296 +/- ##
==========================================
- Coverage 43.46% 43.03% -0.43%
==========================================
Files 22 22
Lines 1972 1992 +20
==========================================
Hits 857 857
- Misses 1115 1135 +20
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:
|
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.
First, please run the formatter with:
cargo +nightly fmt --all -- --verboseand then run clippy with:
cargo clippy --tests --verbose -- -D warningsto ensure the code passes both checks.
While using schemars to generate JSON Schemas in a code-first manner from the git-cliff-core and git-conventional models isn't necessarily a bad idea, both crates already expose their internal models publicly. Given that, adding schema-generation logic directly into the CLI might slightly drift away from the core purpose of git-cliff, which is primarily a changelog generator.
If you still prefer to support schema generation, you might consider isolating that functionality. For instance, by using remote deriving, you could maintain a small separate project that depends on git-cliff-core and git-conventional, and generate schemas there instead.
This would keep the CLI focused on its main responsibility while still enabling schema generation for external tooling.
|
I have done the Regarding the Schema → SDK issue: I agree this workflow is not ideal in most cases. While Cliff does not define a stable Schema version, every change to Regarding Schema generation, after careful consideration, I approved for defining a separate remote definition for This PR is just a draft idea for now. Maybe a better a approach: We could gate this with a feature flag and, via some process (scripts or an xtask, etc.), generate a Schema when Cliff publishes a release and upload it to the Releases artifacts. Would that be more appropriate? |
|
cc: @orhun Thanks for clarifying. I understand this PR is still a draft. Also, I’m a bit hesitant about this feature itself, as well as adding a related option to the CLI. We should consider whether this functionality is truly needed for most users. Even if it is, it might be cleaner, from a separation-of-concerns perspective, to add a separate binary under
As you also noted, the current implementation direction seems problematic to me as well.
In other words, what's being proposed here effectively shifts the maintenance burden to the maintainers, before we've even established a clear need for the feature. I think we should have a more thorough discussion about the necessity and maintenance cost of this functionality before proceeding further. Personally, I would still recommend creating a separate repository dedicated to schema generation, which could depend on both |
|
Hey, sorry for the delay on this. I'll be having a look soon hopefully |
Description
Close #1294. Add JSON Schema dump feature.
Current blocked by crate-ci/git-conventional#88.
Motivation and Context
Add a gloabl opt
--dump-context-schemato dump current versionContextJSON Schema.How Has This Been Tested?
Screenshots / Logs (if applicable)
Types of Changes
Checklist: