creydr/Cherry Pick Action

Action to cherry-pick commits from merged pull requests to target branches via comments

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jul 7, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: creydr/cherry-pick-action@dbd78be6733ccc2e62a847a470ddeb0412439fd8 # v1.0.6

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
add_author_as_assigneeControls whether to set the author of the original pull request as an assignee on the cherry-pick pull request. By default, the original author is not made an assignee. false
add_author_as_reviewerControls whether to request a review from the author of the original pull request on the cherry-pick pull request. By default, the original author is not requested for review. false
add_labelsThe action will add these labels (comma-delimited) to the cherry-pick pull request. By default, no labels are added.
add_reviewersThe action will add these reviewers (comma-delimited) to the cherry-pick pull request. By default, no reviewers are added. ""
add_team_reviewersThe action will add these teams as reviewers (comma-delimited) to the cherry-pick pull request. By default, no teams are added. ""
auto_merge_enabledControls whether to auto-merge the created cherry-pick pull request. When enabled, the pull request will automatically merge when all required checks pass and approvals are received. By default, auto-merge is not enabled. false
auto_merge_methodThe merge method to use when auto-merge is enabled on cherry-pick PRs. Valid options are 'merge' (create a merge commit), 'squash' (squash and merge), or 'rebase' (rebase and merge). The specified method must be enabled in your repository's merge settings, otherwise auto-merge will fail. By default, the cherry-pick PR is merged using a merge commit if auto-merge is enabled. merge
branch_nameTemplate used as the name for branches created by this action. Placeholders can be used to define variable values. These are indicated by a dollar sign and curly braces (`${placeholder}`). Please refer to this action's README for all available placeholders. cherry-pick-${pull_number}-to-${target_branch}
cherry_pickingDetermines which commits are cherry-picked. When set to `auto`, the action cherry-picks the commits based on the method used to merge the pull request. - For "Squash and merge", the action cherry-picks the squashed commit. - For "Rebase and merge", the action cherry-picks the rebased commits. - For "Merged as a merge commit", the action cherry-picks the commits from the pull request. When set to `pull_request_head`, the action cherry-picks the commits from the pull request. Specifically, those reachable from the pull request's head and not reachable from the pull request's base. By default, the action cherry-picks the commits based on the method used to merge the pull request. auto
comment_patternRegex pattern to match cherry-pick commands in pull request comments. Must contain a capture group for the target branch(es). The captured group is split by whitespace, so multiple branches can be specified in one command. The action will cherry-pick the pull request to each matched target branch. ^\/cherry-pick (.+)$
copy_all_reviewersControls whether to copy all reviewers from the original pull request to the cherry-pick pull request. Note that this requests reviews from both requested reviewers, and people that have already reviewed the original pull request. Use `copy_requested_reviewers` instead to only request reviews from requested reviewers. By default, all reviewers are not copied. false
copy_assigneesControls whether to copy the assignees from the original pull request to the cherry-pick pull request. By default, the assignees are not copied. false
copy_labels_patternRegex pattern to match github labels which will be copied from the original pull request to the cherry-pick pull request. By default, no labels are copied.
copy_milestoneControls whether to copy the milestone from the original pull request to the cherry-pick pull request. By default, the milestone is not copied. false
copy_requested_reviewersControls whether to copy the requested reviewers from the original pull request to the cherry-pick pull request. Note that this does not request reviews from those users who already reviewed the original pull request. Use `copy_all_reviewers` instead to also request reviews from those users. By default, the requested reviewers are not copied. false
experimentalConfigure experimental features by passing a JSON object. The following properties can be specified: #### `conflict_resolution` Specifies how the action will handle a conflict occuring during the cherry-pick. In all cases, the action will stop the cherry-pick at the first conflict encountered. Behavior is defined by the option selected. - When set to `fail` the cherry-pick fails when the cherry-pick encounters a conflict. - When set to `draft_commit_conflicts` the cherry-pick will always create a draft pull request with the first conflict encountered committed. Instructions are provided on the original pull request on how to resolve the conflict and continue the cherry-pick. { "conflict_resolution": "fail" }
github_tokenToken to authenticate requests to GitHub. Used to create and label pull requests and to comment. Either GITHUB_TOKEN or a repo-scoped Personal Access Token (PAT). ${{ github.token }}
github_workspaceWorking directory for the cherry-pick action.${{ github.workspace }}
git_committer_nameName of the committer for the cherry-picked commit.github-actions[bot]
git_committer_emailEmail of the committer for the cherry-picked commit.github-actions[bot]@users.noreply.github.com
merge_commitsSpecifies how the action should deal with merge commits on the merged pull request. When set to `fail` the cherry-pick fails when the action detects one or more merge commits. When set to `skip` the action only cherry-picks non-merge commits, i.e. it ignores merge commits. fail
pull_descriptionTemplate used as description (i.e. body) in the pull requests created by this action. Placeholders can be used to define variable values. These are indicated by a dollar sign and curly braces (`${placeholder}`). Please refer to this action's README for all available placeholders. # Description Cherry-pick of #${pull_number} to `${target_branch}`.
pull_titleTemplate used as the title in the pull requests created by this action. Placeholders can be used to define variable values. These are indicated by a dollar sign and curly braces (`${placeholder}`). Please refer to this action's README for all available placeholders. [${target_branch}] ${pull_title}
source_pr_numberSpecifies the pull request (by its number) to cherry-pick, i.e. the source pull request. When set, the action will cherry-pick the specified pull request to each target branch. When not set, the action determines the source pull request from the event payload.
namedescription
created_pull_numbersSpace-separated list containing the identifying number of each created pull request. Or empty when the action created no pull requests. For example, '123' or '123 124 125'.
was_successfulWhether or not the changes could be cherry-picked successfully to all targets. Either 'true' or 'false'.
was_successful_by_targetWhether or not the changes could be cherry-picked successfully to all targets - broken down by target. Follows the pattern '{{label}}=true|false'.