File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2174,13 +2174,13 @@ export class FolderRepositoryManager implements vscode.Disposable {
21742174 if ( ! pullRequestModel . head ) {
21752175 return false ;
21762176 }
2177- const baseRemote = findLocalRepoRemoteFromGitHubRef ( this . repository , pullRequestModel . base ) ?. name ;
2178- const headRemote = findLocalRepoRemoteFromGitHubRef ( this . repository , pullRequestModel . head ) ?. name ;
2179- if ( ! baseRemote || ! headRemote ) {
2180- return false ;
2181- }
2182- const log = await this . repository . log ( { range : ` ${ headRemote } / ${ pullRequestModel . head . ref } .. ${ baseRemote } / ${ pullRequestModel . base . ref } ` } ) ;
2183- return log . length === 0 ;
2177+ const repo = this . _githubRepositories . find (
2178+ r => r . remote . owner === pullRequestModel . remote . owner && r . remote . repositoryName === pullRequestModel . remote . repositoryName ,
2179+ ) ;
2180+ const headBranch = ` ${ pullRequestModel . head . owner } : ${ pullRequestModel . head . ref } ` ;
2181+ const baseBranch = ` ${ pullRequestModel . base . owner } : ${ pullRequestModel . base . ref } ` ;
2182+ const log = await repo ?. compareCommits ( baseBranch , headBranch ) ;
2183+ return log ?. behind_by === 0 ;
21842184 }
21852185
21862186 async fetchById ( githubRepo : GitHubRepository , id : number ) : Promise < PullRequestModel | undefined > {
You can’t perform that action at this time.
0 commit comments