Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance GithHub publishing logic to handle renamed repositories #245024

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nomike
Copy link

@nomike nomike commented Mar 29, 2025

Fixes #245022.

Steps to test the fix

  1. Sign up for GitHub
  2. Create repository "test" on GitHub
  3. Rename that repository to "test-renamed"
  4. Login to your GitHub account from within vscode
  5. Initialize a new git repository in vscode and commit a test file
  6. Chose the "Publish to GitHub" command
  7. Use "test" as a repository name

With the current version, vscode will complain that the repository already exists, even though it no longer does.
My MR fixes this, publishing is now possible again.

Testing

I don't thing it's feasible to write a unit test for this, as that would require a GitHub account and a repository which needs to be created and deleted on each test run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub - publish doesn't work if name was in use before, fails with "GitHub repository already exists"
2 participants