-
-
Notifications
You must be signed in to change notification settings - Fork 200
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(core): add remote
to commit and deprecate fields
#822
Conversation
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 #822 +/- ##
==========================================
+ Coverage 40.13% 40.48% +0.36%
==========================================
Files 20 21 +1
Lines 1645 1648 +3
==========================================
+ Hits 660 667 +7
+ Misses 985 981 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
git-cliff-core/src/commit.rs
Outdated
/// GitHub metadata of the commit. | ||
#[cfg(feature = "github")] | ||
pub github: crate::remote::RemoteContributor, | ||
pub github: crate::remote_contributor::RemoteContributor, |
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.
I moved the RemoteContributor
from the remote
module because the remote
module is under the remote
feature flag.
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.
Thanks for the PR!
I think there are still a couple of steps that we should take to achieve this:
- Deprecate the
github
,gitlab
,gitea
, andbitbucket
fields.
This is necessary to avoid confusion between commit.remote
and commit.github
. Additionally, I'm not certain if the current state of the PR will work well with the integrations.
For deprecation, we can use the #[deprecated()]
annotation along with log::warn
statements in the application code.
- Update the feature gates for
remote
so that the types can be exposed without requiring the integration to be enabled.
This is a good start toward cleaning up the remote module and improving the core API. I'd be fully on board with incorporating these changes along with the suggested improvements!
Oh, I didn't get you wanted to move from Then, I'll work on this 👍 |
I extracted the RemoteContributor into Also, please have another look at the PR and let me know there's something else I should do 👍 |
Thanks for the update on the PR! A couple of points:
|
I addressed all points except 2. Could you handle it since it might be a bit involved? 👀 |
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.
Looks good! Just needs a bit of tweaks ⚙️
We are still missing point 2 you mentioned before:
The tests are failing because we are not serializing the How do you suggest to do this? (feel free to push to the branch if you prefer) |
Hmm, that's not good. Why are we not serializing it? I didn't get why the fixtures are failing because using |
Imo the issue is that the git-cliff cli never sets the but maybe that is only for the releases, not for the commits. |
CI is green now. Yeah 😎 |
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.
Perfect, thanks for your contribution @MarcoIeni ❤️
Can you also shoot me an issue about removing the github
/gitlab
etc. fields for the next release? Currently there is quite a bit of duplication in the context which leads to more memory usage and it would be better to get rid of those things after the next release :)
remote
field to commitremote
to commit and deprecate fields
Thanks for reviewing and merging. Looking forward for the release! I created the issue as you asked #856 👍 |
Description
Close #803
Add the
remote
field so that libraries using git-cliff-core can fill it. git-cliff can later use it after a refactoring.Motivation and Context
#803 (comment)
How Has This Been Tested?
It's a trivial change, so I haven't tested it.
Screenshots / Logs (if applicable)
Types of Changes
Checklist: