Changefile from PR description: Fix community PRs from branch named trunk (#39306)
* check if remote branch is trunk before checking out * fix comment
This commit is contained in:
parent
bfedd049c1
commit
d95554126f
|
@ -91,8 +91,11 @@ const program = new Command( 'changefile' )
|
|||
`Temporary clone of '${ headOwner }/${ name }' created at ${ tmpRepoPath }`
|
||||
);
|
||||
|
||||
Logger.notice( `Checking out remote branch ${ branch }` );
|
||||
await checkoutRemoteBranch( tmpRepoPath, branch );
|
||||
// If a pull request is coming from a contributor's fork's trunk branch, we don't nee to checkout the remote branch because its already available as part of the clone.
|
||||
if ( branch !== 'trunk' ) {
|
||||
Logger.notice( `Checking out remote branch ${ branch }` );
|
||||
await checkoutRemoteBranch( tmpRepoPath, branch );
|
||||
}
|
||||
|
||||
Logger.notice(
|
||||
`Getting all touched projects requiring a changelog`
|
||||
|
|
Loading…
Reference in New Issue