Add Open on GitHub action to PR editors - #8909
Merged
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add option to open PR viewer in external browser
Add Open on GitHub action to PR editors
Aug 27, 2026
Alex Ross (alexr00)
marked this pull request as ready for review
August 27, 2026 15:41
Alex Ross (alexr00)
approved these changes
Aug 27, 2026
Alex Ross (alexr00)
enabled auto-merge (squash)
August 27, 2026 15:41
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an “Open Pull Request on GitHub” action to the PR overview editor toolbar and implements loading-safe URL resolution so users can open the PR externally even when the webview is stuck in a loading state.
Changes:
- Added a new editor/title toolbar action (
pr.openPullRequestOnGitHub) scoped to the PR overview webview. - Added
PullRequestOverviewPanel.getCurrentPullRequestUrl()to return the loaded PR URL when available, or reconstruct it from retained PR identity + matching repository remote while loading. - Refactored the command handler so it can open the active PR editor’s URL (or fall back to choosing from active PRs).
Show a summary per file
| File | Description |
|---|---|
| src/test/github/pullRequestOverview.test.ts | Adds coverage for resolving an active PR URL before the PR model finishes loading. |
| src/github/pullRequestOverview.ts | Implements loading-safe URL resolution via getCurrentPullRequestUrl(). |
| src/commands.ts | Refactors the command to support editor-toolbar invocation and active-panel URL fallback. |
| package.json | Contributes the PR editor toolbar action gated by activeWebviewPanelId == 'PullRequestOverview'. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
Martin Aeschlimann (aeschli)
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR editors can remain stuck loading, leaving no way to open the pull request externally.
Editor action
{ "command": "pr.openPullRequestOnGitHub", "when": "activeWebviewPanelId == 'PullRequestOverview'" }Loading-safe URL resolution