Closed browniebroke closed 4 years ago
@browniebroke interesting. I'm not sure if this is related, but PyUp updated the version of PyGitHub in the latest release, who in turn updated all their paths to remove the leading slashes. I had to update a bunch of places to remove leading slash being passed to get_file
and a couple of other functions that use PyGithub.
This could be the problem, yeah. I've quoted all file paths on pyup's side on purpose as it wasn't working when I initially tested it with Cookiecutter Django.
https://github.com/pyupio/pyup/commit/2fb7c0155e2a432ae9e90e4d86c882b11b53494d
Thanks for the excellent report, @browniebroke
Wow I nearly forgot about this one 😄
We use PyUP to keep cookiecutter-django up to date. It's a cookiecutter template to generate production-ready Django project.
As with many cookiecutter templates, it includes some folder which are placeholders for the generated project. That's the root of the source code, under which live the requirements files we want to update.
We've received less update recently, and when I checked our dashboard, I realised the files under the placeholder folder
{{cookiecutter.project_slug}}
where ignored by the bot.I've installed the bot in a local virtual environment and ran it with debug logs enabled, which pointed at:
These loglines directed me at where the request is made:
https://github.com/pyupio/pyup/blob/b20fa88e03cfdf5dc409a9f00d27629188171c31/pyup/providers/github.py#L76-L86
I tried to do a more minimal test case by doing it manually, and it seems that some characters (
{
and}
at least) are quoted, causing a 404:If I remove the call to
quote()
, it works:I'm using Python 3.6 and PyUP installed from github master.
(When installing from PyPI version 1.0.2, I'm getting an extra
/
at the beginning of the the file path which causes a Github error, but this is now fixed in master)