diff --git a/bin/cherry-pick.mjs b/bin/cherry-pick.mjs index a8c8c5cc6f473b..cc46d921b75fb9 100644 --- a/bin/cherry-pick.mjs +++ b/bin/cherry-pick.mjs @@ -380,15 +380,34 @@ function reportSummaryNextSteps( successes, failures ) { function GHcommentAndRemoveLabel( pr ) { const { number, cherryPickHash } = pr; const comment = prComment( cherryPickHash ); + const repo = 'WordPress/gutenberg'; try { - cli( 'gh', [ 'pr', 'comment', number, '--body', comment ] ); - cli( 'gh', [ 'pr', 'edit', number, '--remove-label', LABEL ] ); + cli( 'gh', [ + 'pr', + 'comment', + number, + '--repo', + repo, + '--body', + comment, + ] ); + cli( 'gh', [ + 'pr', + 'edit', + number, + '--repo', + repo, + '--remove-label', + LABEL, + ] ); if ( LABEL === 'Backport to WP Beta/RC' ) { cli( 'gh', [ 'pr', 'edit', number, + '--repo', + repo, '--add-label', BACKPORT_COMPLETED_LABEL, ] ); @@ -477,7 +496,7 @@ function getCurrentBranch() { */ async function reportGhUnavailable() { console.log( - 'Github CLI is not setup. This script will not be able to automatically' + 'GitHub CLI is not setup. This script will not be able to automatically' ); console.log( 'comment on the processed PRs and remove the backport label from them.'