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

Add "Dry run" mode to Cherry Picking script #59869

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

getdave
Copy link
Contributor

@getdave getdave commented Mar 14, 2024

What?

Adds ability to run the Cherry Picking script in a "dry run" mode.

Part of #59399

Why?

It's all too easy to run the Cherry Picking script and have the results propagate to Github. With this flag you can run the script and be sure results will never get propagated.

This is useful when testing locally and for folks getting familiar with the workflow/tooling around releases.

How?

  • Adds --dry-run flag
  • Conditionalise behaviour to not propagate results if flag is provided
  • Update comments output to reflect flag.

Testing Instructions

In a terminal run:

npm run other:cherry-pick -- --dry-run
  • See that script will output necessary warnings
  • Check the default Backport to WP RC/Beta is used as the "label" to search for and it doesn't accidentally use "--dry-run" as the label if no custom label is provided.

Testing Instructions for Keyboard

Screenshots or screencast

@getdave getdave added [Type] Enhancement A suggestion for improvement. Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts labels Mar 14, 2024
@getdave getdave self-assigned this Mar 14, 2024
@getdave
Copy link
Contributor Author

getdave commented Mar 14, 2024

I just realised there may be a problem where --dry-run might be taken to be the label argument 🤦

Copy link

github-actions bot commented Mar 14, 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: getdave <get_dave@git.wordpress.org>
Co-authored-by: draganescu <andraganescu@git.wordpress.org>

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

@getdave getdave mentioned this pull request Mar 14, 2024
3 tasks
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

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

Isn't this option identical to saying n at the final do you want to proceed prompt? If so, then maybe we should prompt at the start:

Choose how to run the script:
- [D]ry run, save the cherry picked branch on your computer
- [L]ive run, publish the cherry picked branch results to GitHub (this removes the labels for the cherry picked PRs too)
/> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Enhancement A suggestion for improvement.
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants