| add_author_as_assignee | Controls whether to set the author of the original pull request as an assignee on the backport pull request. By default, the original author is not made an assignee.
| — | — |
| add_author_as_reviewer | Controls whether to request a review from the author of the original pull request on the backport 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 backport pull request. By default, no labels are added.
| — | — |
| add_reviewers | The action will add these reviewers (comma-delimited) to the backport pull request. By default, no reviewers are added.
| — | "" |
| add_team_reviewers | The action will add these teams as reviewers (comma-delimited) to the backport pull request. By default, no teams are added.
| — | "" |
| auto_merge_enabled | Controls whether to auto-merge the created backport pull request. When enabled, the pull request will automatically merge when all required checks pass and approvals are received. Can be set to a simple boolean (true/false) or controlled dynamically via workflow expressions. By default, auto-merge is not enabled.
| — | false |
| auto_merge_method | The merge method to use when auto-merge is enabled on backport 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 backport 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.
| — | backport-${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 |
| cherry_picking_merge_mode | Controls the cherry-pick merge mode. Accepted values: `default` (standard cherry-pick behavior) or `whitespace_tolerant` (ignores trailing whitespace and line-ending (CRLF vs LF) differences when applying the cherry-pick). Use `whitespace_tolerant` when those differences around the lines you're backporting cause cherry-pick conflicts. Also use it when `.gitattributes` declares `merge=union` for the file, where those same differences can silently duplicate lines instead. Equivalent to `git cherry-pick -Xignore-space-at-eol`.
| — | default |
| comment_style | Controls the style of comments posted by the action. When set to `legacy`, the action posts individual comments per target branch. When set to `summary`, the action posts a single summary comment per workflow run with actionable details.
| — | legacy |
| copy_all_reviewers | Controls whether to copy all reviewers from the original pull request to the backport 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 backport 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 backport pull request. Note that labels matching `label_pattern` are excluded. By default, no labels are copied.
| — | — |
| copy_milestone | Controls whether to copy the milestone from the original pull request to the backport 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 backport 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 backport fails when the cherry-pick encounters a conflict. - When set to `draft_commit_conflicts` the backport 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.
#### `downstream_repo`
Define if you want to backport to a repository other than where the workflow runs.
By default, the action always backports to the repository in which the workflow runs.
#### `downstream_owner`
Define if you want to backport to another owner than the owner of the repository the workflow runs on. Only takes effect if the `downstream_repo` property is also defined.
By default, uses the owner of the repository in which the workflow runs.
| — | {
"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 backport 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 |
| label_pattern | Regex pattern to match the backport labels on the merged pull request. Must contain a capture group for the target branch. The action will backport the pull request to each matched target branch. Note that the pull request's headref is excluded automatically.
| — | ^backport ([^ ]+)$ |
| merge_commits | Specifies how the action should deal with merge commits on the merged pull request. When set to `fail` the backport 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
Backport 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.
| — | [Backport ${target_branch}] ${pull_title} |
| source_pr_number | Specifies the pull request (by its number) to backport, i.e. the source pull request. When set, the action will backport the specified pull request to each target branch. When not set, the action determines the source pull request from the event payload.
| — | — |
| target_branches | The action will backport the pull request to each specified target branch (space-delimited). Note that the pull request's headref is excluded automatically. Can be used on its own (no labels required) or alongside backport labels — when both are set, the action backports to the union of the two. By default, only backport labels are used to specify the target branches.
| — | — |