Skip to content

Commit

Permalink
Fix cherry-pick script, missing --repo arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 18, 2024
1 parent cebb6bd commit 5a2a69b
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions bin/cherry-pick.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
] );
Expand Down Expand Up @@ -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.'
Expand Down

0 comments on commit 5a2a69b

Please sign in to comment.