creydr/Cherry Pick Action
Action to cherry-pick commits from merged pull requests to target branches via comments
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 7, 2026
- License
- MIT
Pinned Snippet
uses: creydr/cherry-pick-action@dbd78be6733ccc2e62a847a470ddeb0412439fd8 # v1.0.6tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| add_author_as_assignee | Controls 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_reviewer | Controls 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_labels | The action will add these labels (comma-delimited) to the cherry-pick pull request. By default, no labels are added. | — | — |
| add_reviewers | The action will add these reviewers (comma-delimited) to the cherry-pick pull request. By default, no reviewers are added. | — | "" |
| add_team_reviewers | The action will add these teams as reviewers (comma-delimited) to the cherry-pick pull request. By default, no teams are added. | — | "" |
| auto_merge_enabled | Controls 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_method | The 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_name | Template 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_picking | Determines 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_pattern | Regex 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_reviewers | Controls 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_assignees | Controls 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_pattern | Regex 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_milestone | Controls 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_reviewers | Controls 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 |
| experimental | Configure 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_token | Token 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_workspace | Working directory for the cherry-pick action. | — | ${{ github.workspace }} |
| git_committer_name | Name of the committer for the cherry-picked commit. | — | github-actions[bot] |
| git_committer_email | Email of the committer for the cherry-picked commit. | — | github-actions[bot]@users.noreply.github.com |
| merge_commits | Specifies 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_description | Template 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_title | Template 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_number | Specifies 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. | — | — |
Outputs
| name | description |
|---|---|
| created_pull_numbers | Space-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_successful | Whether or not the changes could be cherry-picked successfully to all targets. Either 'true' or 'false'. |
| was_successful_by_target | Whether or not the changes could be cherry-picked successfully to all targets - broken down by target. Follows the pattern '{{label}}=true|false'. |