diff --git a/src/git/gitService.ts b/src/git/gitService.ts index ba0853b..a7c7f54 100644 --- a/src/git/gitService.ts +++ b/src/git/gitService.ts @@ -3045,7 +3045,12 @@ export class GitService implements Disposable { provider: RichRemoteProvider, options?: { avatarSize?: number; include?: PullRequestState[]; limit?: number; timeout?: number }, ): Promise; - @gate() + @gate((ref, remoteOrProvider, options) => { + const provider = GitRemote.is(remoteOrProvider) ? remoteOrProvider.provider : remoteOrProvider; + return `${ref}${provider != null ? `|${provider.id}:${provider.domain}/${provider.path}` : ''}${ + options != null ? `|${options.limit ?? -1}:${options.include?.join(',')}` : '' + }`; + }) @debug({ args: { 1: (remoteOrProvider: GitRemote | RichRemoteProvider) => remoteOrProvider.name, @@ -3097,8 +3102,11 @@ export class GitService implements Disposable { provider: RichRemoteProvider, options?: { timeout?: number }, ): Promise; - @gate() - @debug({ + @gate((ref, remoteOrProvider) => { + const provider = GitRemote.is(remoteOrProvider) ? remoteOrProvider.provider : remoteOrProvider; + return `${ref}${provider != null ? `|${provider.id}:${provider.domain}/${provider.path}` : ''}`; + }) + @debug({ args: { 1: (remoteOrProvider: GitRemote | RichRemoteProvider) => remoteOrProvider.name, }, diff --git a/src/git/models/commit.ts b/src/git/models/commit.ts index a783e49..65bb9db 100644 --- a/src/git/models/commit.ts +++ b/src/git/models/commit.ts @@ -147,11 +147,11 @@ export abstract class GitCommit implements GitRevisionReference { } @memoize() - async getAssociatedPullRequest(): Promise { + async getAssociatedPullRequest(options?: { timeout?: number }): Promise { const remote = await Container.git.getRichRemoteProvider(this.repoPath); if (remote?.provider == null) return undefined; - return Container.git.getPullRequestForCommit(this.ref, remote); + return Container.git.getPullRequestForCommit(this.ref, remote, options); } @memoize(