-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Automate the cherry-picking process for WordPress and Gutenberg releases #40969
Conversation
4c5b2c5
to
7c518ec
Compare
7c518ec
to
f88f228
Compare
This is powerful! It should automate the whole process of backporting commits to a large degree. In fact, this could be a more general tool and work also with backports for Gutenberg plugin releases if connected with a different label in the repo. |
Test of commenting from CLI |
ddfa1b8
to
5cd4b79
Compare
@adamziel, can you share an update on where we are with this PR? I know you successfully used it 2-3 times to cherry-pick PRs for WordPress 6.0 RC releases. I didn't check the code very closely, but as long as it works that would be the last of my concerns. As we wrap up the WP 6.0 release cycle tomorrow, what do you think about documenting in-depth how the script works today, what tools/permissions are required to run this script? We could land the script as-is with the inline documentation included (or maybe even pre-requisites printed on the terminal), then we would have to explain the usage in the documents used by release technical leads. Finally, it would be great to share some recommendations with how to improve the script in the future. |
Size Change: +8.97 kB (+1%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
@gziolo Indeed, it works really well now!
Here's what
Sample output looks as follows:
I just added the inline documentation 👍
The context around the
Sounds perfect, let's team up on a doc that will also discuss the other automations like releasing npm packages and syncing Gutenberg packages and blocks to the wordpress-develop repository.
A few ideas:
|
This looks fan-tas-tic 💯 I understand there is no testing environment for this, and the only way to try it is whenever Backports are needed. Is that correct? If so, I would agree with @gziolo's plan above as the 6.0.0 release cycle is over. |
That's correct! Well, perhaps we could fabricate a testing environment:
The downside is that random PRs would get the backport label for a few minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some minor comments to look at before we land.
The other necessary task is to extend the tooling's capability to lint and format .mjs
files. I see that some lines don't follow WP coding standards.
…t changes with the backport label
fb287d5
to
b87a2cf
Compare
The E2E failures are unrelated to this PR. @gziolo, I think we're ready to merge! |
…t to confirm the git push command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work @adamziel. Let's land it so we could start using it with 6.0.x releases.
The only thing that I found a bit unclear was how to pass the different labels depending on the type of the release but I figured out it's covered with this line:
const LABEL = process.argv[2] || "Backport to WP Minor Release";
Did you find a place in the documentation where we could include some guidelines how to use this new tool?
Co-authored-by: Greg Ziółkowski <[email protected]>
@gziolo These two make good candidates: |
Excellent, that would be the next task when we wrap up the last piece of work: |
What problem does this PR solve
Cherry-picking Pull Requests for Gutenberg and WordPress releases is a repetitive process that goes like this:
Backport to WP Beta/RC
labelgit cherry-pick $hash
in the CLIThis pull request explores a script that reduces the above process to:
I successfully used it three times to cherry-pick PRs for WordPress 6.0 RC releases.
How does the script work?
Here's what
npm run cherry-pick
does:Backport to WP Beta/RC
)git cherry-pick {commitHash}
for each PRorigin
gh
console utility to comment on the remote PRs and remove the labelsSample output looks as follows:
What tools/permissions are required to run this script?
gh
console utility - optional, automates commenting and removing the labelsFuture improvement ideas
Test plan
npm run cherry-pick