diff --git a/src/autolinks/autolinks.ts b/src/autolinks/autolinks.ts index e30ec4f1ba1aa..f9ba58b0a3b12 100644 --- a/src/autolinks/autolinks.ts +++ b/src/autolinks/autolinks.ts @@ -230,7 +230,7 @@ export class Autolinks implements Disposable { link.provider?.domain === integration.domain ? integration.getIssueOrPullRequest( link.descriptor ?? remote.provider.repoDesc, - link.referenceType === 'branch' ? link.id : id, + this.getAutolinkEnrichableId(link), ) : link.descriptor != null ? linkIntegration?.getIssueOrPullRequest(link.descriptor, this.getAutolinkEnrichableId(link))