From cbac1d1233ee58812e6dc88d814a1715df60cf9e Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Thu, 30 Oct 2025 17:00:31 +0100 Subject: [PATCH] Github Pull Request tab won't open if branch names are reused Fixes #8007 --- src/github/pullRequestGitHelper.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/github/pullRequestGitHelper.ts b/src/github/pullRequestGitHelper.ts index 7ad603dfac..599a3eda6d 100644 --- a/src/github/pullRequestGitHelper.ts +++ b/src/github/pullRequestGitHelper.ts @@ -329,8 +329,9 @@ export class PullRequestGitHelper { ): Promise { try { const configKey = this.getMetadataKeyForBranch(branchName); - const configValue = await repository.getConfig(configKey); - return PullRequestGitHelper.parsePullRequestMetadata(configValue); + const allConfigs = await repository.getConfigs(); + const matchingConfigs = allConfigs.filter(config => config.key === configKey).sort((a, b) => b.value < a.value ? 1 : -1); + return PullRequestGitHelper.parsePullRequestMetadata(matchingConfigs[0].value); } catch (_) { return; }