-
Notifications
You must be signed in to change notification settings - Fork 68
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
remove leading slash from .pyup.yml to fix bug on gitlab api #375
Conversation
Codecov Report
@@ Coverage Diff @@
## master #375 +/- ##
==========================================
+ Coverage 94.19% 94.22% +0.02%
==========================================
Files 11 11
Lines 1155 1161 +6
==========================================
+ Hits 1088 1094 +6
Misses 67 67
Continue to review full report at Codecov.
|
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.
What did I realized is that at some point we removed adding a slash to the root here for GitHub provider: 6ae5146#diff-d486dceb95e3519b6f8ec88631bd64cc
Before that we were concerned about quoting the root path like shown here: 2fb7c01
Anyway, long-story short. Looks like you are right, neither GitHub nor GitLab needs it. I would just urge you to add another code at gitlab.Provider.get_file
to lstrip any slash from path being passed. That way we help making sure that will not happen from other call.
Thanks for this, @ckleemann 🎉
I removed the leading slash for pyup.yml on all places in bot.py. I also added the lstrip on the gitlab provider as suggested. |
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 to me. Thanks @ckleemann
@ckleemann we are just waiting for #348 to make sure we are not breaking some stuff before publishing to PyPi |
As reported in #374 the support for gitlab is broken. This is due to a change in the gitlab api. Gitlab dose not accept a urlencoded leading slash in a file path. Non urlencoded leading slashes are fine. A leading slash is used to receive the pyup.yml. The the path is then urlencoded by the gitlab library.
There is no need to for the leading slash. At this point there is no previous file request which could fail a relative file path request. So I removed the slash. Which let the api call on gitlab work again.
Fix #374