Closed Betree closed 3 years ago
Sorry for the unintended change in behavior. The new behavior is actually correct, but I was not aware that URL parameters were not encoded until a recent dependency update. See also https://github.com/octokit/request-action/issues/71
Right now both your links return 404 for me
I was able to reproduce the problem with the debug/coverage
branch
The problem in this case is the route. Instead of GET /repos/{owner}/{repo}/git/{ref}
, use GET /repos/{owner}/{repo}/git/ref/{ref}
- GET /repos/{owner}/{repo}/git/{ref}
+ GET /repos/{owner}/{repo}/git/ref/{ref}
Then remove the refs/
prefix, which will result in
https://api.github.com/repos/opencollective/opencollective-frontend/git/ref/heads%2Fdebug%2Fcoverage
The git
routes to get a single reference and a list of (matching) reference changed a while ago, you are still using the old one. It still works, but the response is unpredictable, it can be an object or an array, depending on the request. The two new endpoints address that problem.
Fantastic, thank you very much @gr2m. I'll update our CI with the route that you've suggested.
In https://github.com/opencollective/opencollective-frontend/blob/1eab647efdf0d953c1675d076273b177d4a38180/.github/workflows/e2e.yml#L90, we use
request-action
to fetch the matching branch on remote repository (GET /repos/{owner}/{repo}/git/{ref}
).This used to generate a valid URL like https://api.github.com/repos/opencollective/opencollective-frontend/git/refs/heads/debt/remove-guest-tokens, but since a few days we're getting an encoded version of the parameter instead, which results in the branch appearing as missing: https://api.github.com/repos/opencollective/opencollective-frontend/git/refs%2Fheads%2Fdebt%2Fremove-guest-tokens.
Maybe that's similar to https://github.com/octokit/request-action/issues/71? Is there a way to tell
request-action
to not URL encode a parameter?Full debug log: