From b0e88281b34980874ee2a04d7169597368d880b5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:12:26 +0000 Subject: [PATCH 1/2] Initial plan From 55133d9dc7bbcae7f6d15e9b122d2c08c72f210e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 3 Jun 2026 14:18:52 +0000 Subject: [PATCH 2/2] Don't show error popup when PR merge base fetch fails Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> --- src/github/folderRepositoryManager.ts | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/github/folderRepositoryManager.ts b/src/github/folderRepositoryManager.ts index eb5cbebc74..91871b0efe 100644 --- a/src/github/folderRepositoryManager.ts +++ b/src/github/folderRepositoryManager.ts @@ -2306,17 +2306,26 @@ export class FolderRepositoryManager extends Disposable { } if (!pullRequest.mergeBase) { - const { data } = await octokit.call(octokit.api.repos.compareCommits, { - repo: remote.repositoryName, - owner: remote.owner, - base: `${pullRequest.base.repositoryCloneUrl.owner}:${pullRequest.base.ref}`, - head: `${pullRequest.head.repositoryCloneUrl.owner}:${pullRequest.head.ref}`, - }); + try { + const { data } = await octokit.call(octokit.api.repos.compareCommits, { + repo: remote.repositoryName, + owner: remote.owner, + base: `${pullRequest.base.repositoryCloneUrl.owner}:${pullRequest.base.ref}`, + head: `${pullRequest.head.repositoryCloneUrl.owner}:${pullRequest.head.ref}`, + }); - pullRequest.mergeBase = data.merge_base_commit.sha; + pullRequest.mergeBase = data.merge_base_commit.sha; + } catch (e) { + // Computing the merge base via the compare-commits API can fail (for example, + // returning 404 for cross-fork pull requests with divergent histories or when + // a fork has been deleted). This is non-fatal enrichment data, so log and fall + // back to the base sha rather than surfacing an error popup to the user. + Logger.warn(`Fetching Pull Request merge base failed: ${formatError(e)}`, this.id); + pullRequest.mergeBase = pullRequest.base.sha; + } } } catch (e) { - vscode.window.showErrorMessage(vscode.l10n.t('Fetching Pull Request merge base failed: {0}', formatError(e))); + Logger.error(`Fulfill pull request missing info failed: ${formatError(e)}`, this.id); } Logger.debug(`Fulfill pull request missing info - done`, this.id); }