After I have renamed a private GitHub repo from foo/bar
to foo/qux
via the UI, if I try to get
https://api.github.com/repos/foo/qux
I get a 404.
If I request via the old name (https://api.github.com/repos/foo/bar) I get a redirect. But in general I don't have the previous repository names to work with so that's not an option.
The best solution I can think of is to get https://api.github.com/user/repos
, page through all the repos and find the repo named foo/qux
. But this sucks, and I'm sure the GitHub UI is not doing this when I go to https://github.com/foo/qux
. So is there an easier way to get the ID of the repo now named foo/qux
?