Skip to content

Get PR webview opening working when we don't have a folder repo manager - #8922

Merged
Alex Ross (alexr00) merged 1 commit into
mainfrom
alexr00/blonde-beetle
Sep 3, 2026
Merged

Get PR webview opening working when we don't have a folder repo manager#8922
Alex Ross (alexr00) merged 1 commit into
mainfrom
alexr00/blonde-beetle

Conversation

@alexr00

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The changes are cohesive, covered by targeted tests, and the remote-only fallback is implemented in a way that fits existing FolderRepositoryManager usage patterns.

Review tier: Lite
Findings: None

What changed in this PR

Enables the “Open GitHub Issue or Pull Request” external URI opener to function even when there are no local workspace repositories/folder managers available, by creating a lightweight remote-only FolderRepositoryManager on demand.

Changes:

  • Refactors the external URI opener into a disposable class that can lazily create a remote-only FolderRepositoryManager when none exists.
  • Introduces RemoteOnlyRepository (a minimal Repository implementation) to support GitHub-only scenarios without a local git repo.
  • Adds unit tests for opener priority and remote-only manager creation behavior.
File Description
src/​test/​github/​externalUriOpener.test.ts Adds coverage ensuring a remote-only folder manager is created when no local manager exists.
src/​test/​common/​externalUri.test.ts Adds tests for the opener priority helper.
src/​github/​overviewRestorer.ts Switches registration to pass ExtensionContext + CredentialStore into the external URI opener.
src/​github/​externalUriOpener.ts Implements the new opener class and remote-only FolderRepositoryManager fallback creation.
src/​extension.ts Updates OverviewRestorer construction to pass the full extension context.
src/​common/​externalUri.ts Adds getGitHubIssueOrPullRequestUriOpenerPriority helper.
src/​api/​remoteOnlyRepository.ts Adds a remote-only Repository implementation for non-local scenarios.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@alexr00
Alex Ross (alexr00) merged commit d892f18 into main Sep 3, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/blonde-beetle branch September 3, 2026 10:41
Alex Ross (alexr00) added a commit to microsoft/vscode that referenced this pull request Sep 3, 2026
#334222)

* Remove the GHPR uri opening workaround in favor of external URI opener
See microsoft/vscode-pull-request-github#8922

* CCR feedback
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.

3 participants