korthout / backport-action

Fast and flexible GitHub action to cherry-pick merged pull requests to selected branches
MIT License
61 stars 26 forks source link

support backport, committing conflicts #386

Closed mvayngrib closed 4 months ago

mvayngrib commented 1 year ago

Is your feature request related to a problem? Please describe. backport doesn't always succeed, especially if the source and target have diverged, but it can still be useful to have a backport PR with conflicts committed that someone can then take to completion

Describe the solution you'd like option to cherry-pick and commit conflicts instead of aborting

Describe alternatives you've considered none, but would love to hear some

korthout commented 11 months ago

Hi @mvayngrib This is a great idea, which I'm sure my team would love as well. It will reduce the manual effort of opening the pull request and such.

As conflict can exist in any of the commits, I think it would be best to commit and push the conflicting commit and provide instructions in the pull request on how to resolve the conflicts and continue cherry-picking.

I'll keep this issue in mind when planning new feature work. Of course, I'd be happy to receive a contribution for this as well. Either way, thanks for the great suggestion.

vermz99 commented 6 months ago

@korthout I'll give this a try, if you have additional information, feel free to add them.

vermz99 commented 6 months ago

Here's what i currently have in mind, after investigation:

Proposition

  1. cherry-pick every commit up until the first conflict encountered.

  2. DO NOT commit the actual commit conflict.

  1. push the branch

  2. Proceed to create the PR as DRAFT

  1. Provide a set of instructions in the Draft PR to continue the cherry-pick.
korthout commented 4 months ago

Resolved by https://github.com/korthout/backport-action/pull/417 and released in v3.0.0.