@@ -1776,16 +1776,17 @@ export class FolderRepositoryManager extends Disposable {
17761776 branchInfos . set ( branchName , value ! ) ;
17771777 }
17781778 } ) ;
1779+ Logger . debug ( `Found ${ branchInfos . size } possible branches to delete` , this . id ) ;
1780+ Logger . trace ( `Branches to delete: ${ JSON . stringify ( Array . from ( branchInfos . keys ( ) ) ) } ` , this . id ) ;
17791781
17801782 const actions : ( vscode . QuickPickItem & { metadata : PullRequestMetadata ; legacy ?: boolean } ) [ ] = [ ] ;
17811783 branchInfos . forEach ( ( value , key ) => {
17821784 if ( value . metadata ) {
17831785 const activePRUrl = this . activePullRequest && this . activePullRequest . base . repositoryCloneUrl ;
17841786 const matchesActiveBranch = activePRUrl
1785- ? activePRUrl . owner === value . metadata . owner &&
1786- activePRUrl . repositoryName === value . metadata . repositoryName &&
1787- this . activePullRequest &&
1788- this . activePullRequest . number === value . metadata . prNumber
1787+ ? ( activePRUrl . owner === value . metadata . owner &&
1788+ activePRUrl . repositoryName === value . metadata . repositoryName &&
1789+ this . activePullRequest ?. number === value . metadata . prNumber )
17891790 : false ;
17901791
17911792 if ( ! matchesActiveBranch ) {
@@ -1796,6 +1797,9 @@ export class FolderRepositoryManager extends Disposable {
17961797 picked : false ,
17971798 metadata : value . metadata ! ,
17981799 } ) ;
1800+ } else {
1801+ Logger . debug ( `Skipping ${ value . metadata . prNumber } , active PR is #${ this . activePullRequest ?. number } ` , this . id ) ;
1802+ Logger . trace ( `Skipping active branch ${ key } ` , this . id ) ;
17991803 }
18001804 }
18011805 } ) ;
0 commit comments