Don't surface merge-base enrichment failures as error popups#8769
Merged
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error fetching pull request merge base
Don't surface merge-base enrichment failures as error popups
Jun 3, 2026
alexr00
marked this pull request as ready for review
July 16, 2026 09:16
alexr00
approved these changes
Jul 16, 2026
alexr00
enabled auto-merge (squash)
July 16, 2026 09:17
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces user-facing noise when best-effort PR enrichment fails, specifically avoiding intrusive error popups when computing a pull request’s merge base via the GitHub compare-commits API (which can legitimately 404 for some cross-fork/deleted-fork scenarios).
Changes:
- Wraps the
repos.compareCommitscall in a dedicatedtry/catch, logging a warning and falling back topullRequest.base.shawhen merge-base computation fails. - Downgrades the outer method-level failure handling from
vscode.window.showErrorMessagetoLogger.errorto keep enrichment failures non-intrusive.
Show a summary per file
| File | Description |
|---|---|
| src/github/folderRepositoryManager.ts | Makes merge-base enrichment failure non-blocking and non-intrusive by logging and falling back instead of showing error popups. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
chrmarti
approved these changes
Jul 16, 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.
Opening certain PRs (notably cross-fork PRs with divergent histories, or where a fork has been deleted) shows an intrusive popup even though the underlying data is non-fatal enrichment:
FolderRepositoryManager.fulfillPullRequestMissingInfocallsrepos.compareCommitspurely to populatepullRequest.mergeBase. A 404 from that endpoint is a legitimate outcome for some cross-repo PRs, but the previous catch block surfaced it viavscode.window.showErrorMessage.Changes (
src/github/folderRepositoryManager.ts)compareCommitsfailure. Wrap just that call in its own try/catch, log viaLogger.warn, and fall back topullRequest.base.shaformergeBase— the same fallback already used inpullRequestModel.getFileChangesInfoand theServer Errorbranch ofcompareCommitsinloggingOctokit.ts.showErrorMessagetoLogger.error. The whole method is best-effort enrichment; failures shouldn't block or distract from the PR view.