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 conflict_resolution input #417

Merged
merged 9 commits into from
May 26, 2024
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,19 @@ Default:
Configure experimental features by passing a JSON object.
The following properties can be specified:

#### `conflict_resolution`

Default: `fail`

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.

#### `detect_merge_method`

Default: `false`
Expand Down
18 changes: 15 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ inputs:
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.

#### `detect_merge_method`

When enabled, the action detects the method used to merge the pull request.
Expand All @@ -59,7 +70,8 @@ inputs:
By default, uses the owner of the repository in which the workflow runs.
default: >
{
"detect_merge_method": false
"detect_merge_method": false,
"conflict_resolution": "fail"
}
github_token:
description: >
Expand Down Expand Up @@ -125,5 +137,5 @@ runs:
using: "node20"
main: "dist/index.js"
branding:
icon: 'copy'
color: 'yellow'
icon: "copy"
color: "yellow"
Loading