sigma / gh.el

GitHub API library for Emacs
274 stars 74 forks source link

gh doesn't follow http redirects #106

Open rockneurotiko opened 3 years ago

rockneurotiko commented 3 years ago

The API v3 sometimes uses HTTP redirections, for example when the repository's name has changed.

Github documentation about the redirections: https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#http-redirects

I found this when trying to use magit-gh-pulls on a repository that had changed the name recently and I didn't updated the origin url, digging on the responses I saw that github was answering with a Moved Permanently redirect but gh wasn't following it.

Comment on magit-gh-pulls about it: https://github.com/sigma/magit-gh-pulls/issues/107#issuecomment-723969692