git-cliff
git-cliff copied to clipboard
feat(gitlab): Add gitlab support
Description
Adding Gitlab support
Motivation and Context
Much like we support github we should also support gitlab
How Has This Been Tested?
Its still a work in progress
Screenshots / Logs (if applicable)
Types of Changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation (no code change)
- [ ] Refactor (refactoring production code)
- [ ] Other
Checklist:
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️
Codecov Report
Attention: Patch coverage is 24.21053%
with 144 lines
in your changes are missing coverage. Please review.
Project coverage is 38.96%. Comparing base (
d53b905
) to head (6cb0a54
). Report is 11 commits behind head on main.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## main #612 +/- ##
==========================================
- Coverage 41.52% 38.96% -2.56%
==========================================
Files 15 16 +1
Lines 1072 1258 +186
==========================================
+ Hits 445 490 +45
- Misses 627 768 +141
Flag | Coverage Δ | |
---|---|---|
unit-tests | 38.96% <24.22%> (-2.56%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@orhun I have tried to stick as close as I can to your github integration. Fortunately the gitlab api works in a very similar way to the github one.
Please tell me if you think this is the right approach.
Wow, this is great! Thanks for making it happen <3
Is it actually functional now? Can we add some tests (fixtures) to verify the behavior?
Wow, this is great! Thanks for making it happen <3
Is it actually functional now? Can we add some tests (fixtures) to verify the behavior?
Yes I will add some tests in a bit!
Glad to see you happy for it!
@orhun I have a working integration test :tada:
Some slight bugs remain but we are almost there
@orhun this is now complete, with tests and integration tests. I would appreciate it if you could look over it.
@orhun let me know if you need anything more for me to merge this. Thank you!
Thank you @dark0dave - this is pretty exciting. I will add a review soon!
@orhun I have significantly reduced the fields in the gitlab merge request struct as requested.
If you would kindly take another look, thank you!
Hey, all looks good! One thing that I want to do before moving on with this is refactoring the code to avoid duplications between GitHub and GitLab integration. This will also make it easier to add other remotes in the future.
My plan is to introduce a trait (maybe called GitRemote
or RemoteCommit
, RemotePullRequest
) then implement it over GitHub and GitLab types. Then we can move over these modules to remote/
and use generic methods to handle things. I'm talking off the top of my head now but that's roughly how it should be done I think.
I can get to this this week, but let me know what you think of it and possibly want to take a stab! Sorry it took a bit of time to get this PR in - due to the fact that it was a great surprise 😄
Hey, all looks good! One thing that I want to do before moving on with this is refactoring the code to avoid duplications between GitHub and GitLab integration. This will also make it easier to add other remotes in the future.
My plan is to introduce a trait (maybe called
GitRemote
orRemoteCommit
,RemotePullRequest
) then implement it over GitHub and GitLab types. Then we can move over these modules toremote/
and use generic methods to handle things. I'm talking off the top of my head now but that's roughly how it should be done I think.I can get to this this week, but let me know what you think of it and possibly want to take a stab! Sorry it took a bit of time to get this PR in - due to the fact that it was a great surprise 😄
Yeah I was thinking about that, the whole time I was doing this. It would make it easier for us to support more providers in the future. I was thinking we could do it as an improvement (ie annother PR). But happy to do it to this one if you think thats appropriate.