AutoScreenOnOff icon indicating copy to clipboard operation
AutoScreenOnOff copied to clipboard

Update GitHub repository URL

Open EvanDotPro opened this issue 11 years ago • 2 comments
trafficstars

Because you renamed the project, the repository URL for the project has changed. In the browser, GitHub properly redirects to the new repo, but if a user has the GitHub app installed, it simply says "Loading repository failed!" because it simply takes the URL and parses that into an API request. The GitHub API does not handle repository rename redirects.

See: http://stackoverflow.com/questions/22715169/github-api-returns-404-but-default-http-request-returns-301 https://github.com/github/android/blob/e18693727bc62bc2598cd7575130cbf3b8f341eb/app/src/main/java/com/github/mobile/ui/repo/RepositoryViewActivity.java#L121 https://github.com/github/android/blob/e18693727bc62bc2598cd7575130cbf3b8f341eb/app/src/main/java/com/github/mobile/core/repo/RefreshRepositoryTask.java#L55 https://github.com/eclipse/egit-github/blob/bcdf39cca5ef0dd828f960030a2febba1e56a253/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/RepositoryService.java#L580-L607

EvanDotPro avatar Apr 27 '14 07:04 EvanDotPro

I thought about sending a pull request to the GitHub android app or egit-github to make it perform a HEAD request first to detect the 301 response and transparently use the new repo name, however, I don't think they'd like the idea of performing an extra HTTP request every time before reading repo details from the API.

Really, GitHub should just make their API respond to the old repo names with a 301 like the web interface does.

EvanDotPro avatar Apr 27 '14 07:04 EvanDotPro

sorry for seeing this pull-request so late. seems that github will redirect it now. :dancers:

plateaukao avatar Jul 22 '14 14:07 plateaukao