You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
related to #5129 , automating cherry-picking would save maintainers time, reduce confusion, and simplify the changelog and release processes.
Description of Proposed Feature
i think i've come up with a reasonable workflow. we'd adopt the following workflow:
humans would label PRs with a special and temporary "to-cherry-pick" label at any point
a python script in tools could be run by any maintainer at any time to generate a cherry-pick PR; permissions to add/remove labels would be necessary
using labels instead of a project board is mainly a safety step -- right now when you add a PR to a project board by default it goes into a special 'awaiting triage' state, and programmatically querying about the project won't return that PR. there's a risk of someone adding the PR to the board and it never gets noticed or gets noticed too late. presence of a label is a binary state, so there's no such risk.
Plan for Implementation
the script would do the following:
filter the set of PRs for those that are (1) merged, and (2) labelled "to-cherry-pick" (optionally check that each of these PRs is against develop)
get the associated commits from each PR (see farther down)
sort the PRs in commit order (this will lead to fewer merge conflicts)
cherrypick the contents of each PR onto a new branch
make a PR to github with the new branch
remove the "to-cherry-pick" label from the source PRs
the title and/or text of the PR should be something easily parsed by a script so that we can use it in #5129 .
we should probably also add an 'undo' script that closes the PR and adds back the labels, in case something goes wrong or one of the PRs shouldn't be cherry-picked.
EDIT: forgot to add my notes about how to get associated commits from a PR. i couldn't find a way to do it more easily than this:
if the merge commit has 1 parent, use just the merge commit (it was a squash)
if the merge commit has 2 parents, use the commits between it and its first parent, excluding the merge commit itself. this means selecting only "A" and "B" in the following mock commit graph:
* Merge 'topic/example' into 'develop'
|\
| * A
| * B
|/
* Merge 'topic/some-other-branch' into 'develop'
The text was updated successfully, but these errors were encountered:
Motivation
related to #5129 , automating cherry-picking would save maintainers time, reduce confusion, and simplify the changelog and release processes.
Description of Proposed Feature
i think i've come up with a reasonable workflow. we'd adopt the following workflow:
tools
could be run by any maintainer at any time to generate a cherry-pick PR; permissions to add/remove labels would be necessaryusing labels instead of a project board is mainly a safety step -- right now when you add a PR to a project board by default it goes into a special 'awaiting triage' state, and programmatically querying about the project won't return that PR. there's a risk of someone adding the PR to the board and it never gets noticed or gets noticed too late. presence of a label is a binary state, so there's no such risk.
Plan for Implementation
the script would do the following:
the title and/or text of the PR should be something easily parsed by a script so that we can use it in #5129 .
we should probably also add an 'undo' script that closes the PR and adds back the labels, in case something goes wrong or one of the PRs shouldn't be cherry-picked.
EDIT: forgot to add my notes about how to get associated commits from a PR. i couldn't find a way to do it more easily than this:
The text was updated successfully, but these errors were encountered: