-
Notifications
You must be signed in to change notification settings - Fork 57
Description
For GitHub, POST/PATCH requests against a renamed repository end up in a 307 redirect, which isn't automatically followed by urllib. Such responses are then handled by extracting the new URL from Location
header: see git_machete.github.GitHubClient.__fire_github_api_request
.
For GitLab, such requests end up in a HTTP 405 (Method Not Allowed) response with {"message":"Non GET methods are not allowed for moved projects"}
body. The new location can't be extracted from this response (no Location
header returned); another GET /projects/...
request is necessary.
This case is so rare that as for now (PR #1189, initial release of GitLab integration) we're not implementing it yet. We're just adding an error message in code that points to this exact issue. If you ever come it across, pls comment on this issue.