Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cherry-pick script, add missing --repo arg #62643

Merged
merged 3 commits into from
Jun 19, 2024

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jun 18, 2024

What?

When cherry-picking for Beta 2 and Beta 3, the script failed to comment and remove labels from PRs with the following error:

Error: GraphQL: Could not resolve to a PullRequest with the number of 62529. (repository.pullRequest)

Additionally, the script removes and then re-adds the label. See example. So I deleted the line that adds the label back, I'm not sure why it's there.

Why?

How?

It turns out that the --repo arg is missing.

Testing Instructions

It was tested in #62641.

Testing Instructions for Keyboard

Screenshots or screencast

@ellatrix ellatrix added the [Type] Bug An existing feature does not function as intended label Jun 18, 2024
Copy link

github-actions bot commented Jun 18, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ellatrix ellatrix force-pushed the fix/cherry-pick-comment-script branch from f5b4989 to 0c445f2 Compare June 18, 2024 07:52
@@ -380,15 +380,17 @@ function reportSummaryNextSteps( successes, failures ) {
function GHcommentAndRemoveLabel( pr ) {
const { number, cherryPickHash } = pr;
const comment = prComment( cherryPickHash );
const repo = [ '--repo', 'WordPress/gutenberg' ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it fail because you have multiple origins or something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea why it's failing for me without explicitly passing it. Could be multiple remotes, yes. Or a different gh version? In any case, seems good to pass explicitly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@youknowriad Sorry, I'm completely unfamiliar with gh. Looks like it's using a security remote for me, but the origin remote is set to this one... 🤷‍♀️ I don't know why it's using that and how to change it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, we've hardcoded it in other places, so updated those too: 555040c

@ellatrix ellatrix merged commit a2adffe into trunk Jun 19, 2024
62 checks passed
@ellatrix ellatrix deleted the fix/cherry-pick-comment-script branch June 19, 2024 09:14
@github-actions github-actions bot added this to the Gutenberg 18.7 milestone Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
2 participants