vscode-pull-request-github icon indicating copy to clipboard operation
vscode-pull-request-github copied to clipboard

Non GitHub remotes for submodules causes authentication to fail

Open juzerzarif opened this issue 1 year ago • 2 comments

  • Extension version: 0.94.0
  • VSCode Version: 1.92.0
  • OS: MacOS Sonoma 14.2.1
  • Repository Clone Configuration (single repository/fork of an upstream repository): single repository with multiple submodules
  • Github Product (Github.com/Github Enterprise version x.x.x): Github.com

Steps to Reproduce:

  1. Have a repository with a GH remote that has one or more submodules with non GH remotes
  2. Open the GitHub Pull Requests panel in VSCode

I fleetingly see the Pull Request panel populate with items from the repo but then it seems to "crash" and get stuck on the "You have not yet signed in with GitHub" screen. I don't see this issue if I open the same repository but without the submodules checked out. Is there a way to let the extension bypass submodules it can't find GH remotes for?

juzerzarif avatar Aug 14 '24 15:08 juzerzarif

Relevant lines from the "GitHub Pull Requets" output log

2024-08-14 11:14:32.819 [warning] GitHubServer> No response from host https://not-github.com/repos/my-submodule: Unexpected token '<', "<!doctype "... is not valid JSON
2024-08-14 11:14:32.819 [warning] No remotes found. The following remotes are missing: origin, upstream
2024-08-14 11:14:32.819 [info] No GitHub remotes found for folder /home/zarif/git-repos/work/some-repo
2024-08-14 11:14:32.820 [info] Trying to use globalState for assignableUsers.
2024-08-14 11:14:32.824 [info] Review+2> No matching pull request metadata found locally for current branch undefined

juzerzarif avatar Aug 14 '24 15:08 juzerzarif

I've got exactly the same problem, so i can't use the extension on my projets.

PapsOu avatar Sep 02 '24 16:09 PapsOu

Can you share where your non-GitHub submodules are hosted? I tried with BitBucket, but I can't repro the issue.

I do see that the repo shows in the Pull Requests view, and I'm fixing that.

alexr00 avatar Dec 18 '24 10:12 alexr00

Hi @juzerzarif and @PapsOu! Have either of you been able to try the pre-release of the vscode-pull-request extension to check if the fix made works? Let us know if so, thanks

eleanorjboyd avatar Jan 28 '25 21:01 eleanorjboyd

To verify: 0. Install the latest pre-release version of GitHub Pull Requests

  1. Have a clone of a repository with a github.com remote.
  2. Have a repository on some other, non-github.com, hosting service.
  3. Use git cli to add your non-github.com repo as a submodule:
cd <your github.com repo clone folder>
git submodule add <clone url for you non-github.com repo>
  1. Open your clone of your github.com repo in VS Code.
  2. Verify that you don't see anything about the submodule you added in the Pull Requests view and that the view still works

You can remove the submodule when you're done with git rm <path-to-submodule>

alexr00 avatar Jan 29 '25 09:01 alexr00