-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
fix(gitlab): URL-encode the owner in remote requests for GitLab #742
Conversation
Gitlab requires that the project path be fully encoded. See the docs for details. https://docs.gitlab.com/ee/api/rest/#namespaced-path-encoding Pulls in the urlencoding crate here. Might not be needed when you have the choice to just update the documentation. I don't think the end user should be required to url encode their own strings. It might be nicer to just add the subgroup paradigm to the gitlab config in general for the future. This will fix the problem for now.
Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️ |
I use nix so getting onto nightly rust fmt/clippy was non trivial for me tonight. Feel free to do the clean up. There were lots of failing tests so I only ensured mine passed locally. I imagine I am missing some setup for those tests specifically, but maybe I broke them however my change seems unrelated. More importantly running git cliff with my changes produced the desired outcome in the issue. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #742 +/- ##
==========================================
+ Coverage 36.71% 36.78% +0.07%
==========================================
Files 19 19
Lines 1501 1501
==========================================
+ Hits 551 552 +1
+ Misses 950 949 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There are some additional problems related here. Encoding subgroups is one and I'd like to keep this PR pure to that particular issue. I am going to open another PR for the deserialize problem. |
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.
Great, thanks!
Congrats on merging your first pull request! ⛰️ |
Description
Gitlab requires that the project path be fully encoded. See the docs for details. https://docs.gitlab.com/ee/api/rest/#namespaced-path-encoding Pulls in the url encoding crate here. Might not be needed when you have the choice to just update the documentation. I don't think the end user should be required to url encode their own strings. It might be nicer to just add the subgroup paradigm to the gitlab config in general for the future. This will fix the problem for now.
Motivation and Context
I want to use git cliff on my self hosted gitlab.
#687
How Has This Been Tested?
I wrote a test. Doesn't cover the case on IF the end user url encodes their own string. This will break unexpectedly, but I rushed this in.
Types of Changes
Checklist: