diff --git a/src/plus/integrations/providers/github.ts b/src/plus/integrations/providers/github.ts index c71fa9115da23..38d723cfa0978 100644 --- a/src/plus/integrations/providers/github.ts +++ b/src/plus/integrations/providers/github.ts @@ -316,3 +316,23 @@ export class GitHubEnterpriseIntegration extends GitHubIntegrationBase { if (groupsHidden != hideGroups) { groupsHidden = hideGroups; quickpick.items = hideGroups ? items.filter(i => !isDirectiveQuickPickItem(i)) : items; + const { value } = quickpick; + const activeLaunchpadItems = quickpick.activeItems.filter( + (i): i is LaunchpadItemQuickPickItem => 'item' in i, + ); + if (value?.length && !activeLaunchpadItems.length) { + const { prNumber } = getPullRequestIdentityValuesFromSearch(value); + if (prNumber != null) { + const launchpadItems = quickpick.items.filter( + (i): i is LaunchpadItemQuickPickItem => 'item' in i, + ); + const item = launchpadItems.find(i => i.item.id === prNumber); + if (item != null) { + if (!item.alwaysShow) { + item.alwaysShow = true; + // This is a hack because the quickpick doesn't update until you change the items + quickpick.items = [...quickpick.items]; + } + } + } } return true;