You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I create a repo on GitHub, then rename it and then try to use use_github() with the old name, it errors with "Repo [reponame] already exists on 'github.com'", even though that name should be now be available after the renaming.
To reproduce:
On GitHub:
Create a repo (called for example "test123")
Rename the repo to "test123.old"
Locally:
create_project("~/Desktop/test123")
use_git() (accept all the prompts)
use_github() - this gives:
ℹ Defaulting to 'https' Git protocol
✔ Setting active project to '/Users/andy/dev/test123'
Error: Repo 'ateucher/test123' already exists on 'github.com'
But we're pretty far from making a curl request ourselves. Both gh and httr2 sit between us and the GitHub API and I think they are helpfully shielding us from the 301.
Update: I don't think it would be worth it (or even possible) to detect the redirect directly in usethis. I can believe the method used in #1894 is the most practical.
If I create a repo on GitHub, then rename it and then try to use
use_github()
with the old name, it errors with"Repo [reponame] already exists on 'github.com'"
, even though that name should be now be available after the renaming.To reproduce:
On GitHub:
Locally:
create_project("~/Desktop/test123")
use_git()
(accept all the prompts)use_github()
- this gives:This occurs because of the redirect that GitHub does on renamed repos, so the API call in
check_no_github_repo()
here does not fail because it finds the renamed repo (test123.old
).The text was updated successfully, but these errors were encountered: