vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Not able to open associated pull request to commits

Open alZyad opened this issue 1 year ago • 7 comments

Description

This issue is similar to this one : https://github.com/gitkraken/vscode-gitlens/issues/3875

running "Open Associated Pull Request" does nothing, except i don't even see a loader, and on top of that i see no option to open the pull request from the hover menu.

  • I checked that the commit has an associated pull request by copying the commit SHA
  • I have the options for opening pull request enabled in the settings
  • i don't know how to check that specifically Gitlens is connected to the repo, but vs code is
  • on the gitlens output tab, there are no logs when i try to open associated pull request

Reproducing

Integration is not connected. Nothing happens because it exits when it sees that there isn't a connected integration.

In OpenPullRequestOnRemoteCommand.execute()

const integration = await remote?.getIntegration();
if (integration == null) return;

GitLens Version

16.3.0

VS Code Version

Version: 1.97.1 (Universal) Commit: e249dada235c2083c83813bd65b7f4707fb97b76 Date: 2025-02-10T13:13:58.153Z Electron: 32.2.7 ElectronBuildId: 10660205 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0 OS: Darwin arm64 24.2.0

Git Version

git version 2.47.1

Logs, Screenshots, Screen Captures, etc

No response

alZyad avatar Feb 13 '25 16:02 alZyad

What fixed it for me:

  • Go to extensions --> Right click on GitLens
  • Install specific version --> Select 14.9.1
  • Restart VS Code
  • Check if it you see PRs (you might need to login via Github)
  • If yes you can go back to latest GitLens version (17.0.2 for me) and it should continue to work

alex-j-b avatar Apr 14 '25 17:04 alex-j-b

Can you please enable debug logging by running the GitLens: Enable Debug Logging command from the Command Palette (F1 or ctrl/cmd+shift+p). This will enable logging to the GitLens & GitLens (Git) channels in the Output pane.

Once enabled, please reproduce the issue, and attach the logs from the GitLens and GitLens (Git) channels.

Thank you!

eamodio avatar Apr 15 '25 14:04 eamodio

This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!

github-actions[bot] avatar Apr 23 '25 05:04 github-actions[bot]

Closing this issue because it needs more information and has not had recent activity. Please re-open this issue if more details can be provided. Thanks!

github-actions[bot] avatar Apr 30 '25 05:04 github-actions[bot]

Hello, here are the logs for both channels. it includes the startup of vscode, i ran "Open Associated Pull Request" at "08:35:03.262"

GitLens (Git).log GitLens.log

Thank you for your help !

Edit: and for reference, the solution of @alex-j-b did not work in my case.

alZyad avatar Apr 30 '25 07:04 alZyad

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar May 31 '25 05:05 github-actions[bot]

I've reproduced:

Integration is not connected. Nothing happens because it exits when it sees that there isn't a connected integration.

In OpenPullRequestOnRemoteCommand.execute()

const integration = await remote?.getIntegration();
if (integration == null) return;

Also I've found another case that is closer to #3875, so I've described it there.

@eamodio Probably, if the integration is not connected we should look through autolinks of the commit?

UPD: https://github.com/gitkraken/vscode-gitlens/issues/4597#issue-3425507693

Hello, adding this followup since the initial issue is locked and this might be useful to other people with the same issue.

My Issue was caused by me adding a custom alias in my git remote and ssh configs, removing the alias from my git remote config fixed the issue.

sergeibbb avatar Jun 20 '25 17:06 sergeibbb