sorenlouv / backport

A simple CLI tool that automates the process of backporting commits on a GitHub repo
https://github.com/sqren/backport/blob/main/docs/config-file-options.md
Apache License 2.0
247 stars 60 forks source link

Backport GH action & merge conflicts #447

Open MstrDC opened 1 year ago

MstrDC commented 1 year ago

Tested with:

What I'm asking: Can there maybe be a config option to force cherry-pick & push and let the merge conflict be handled by Github in the pull request? For example:

I would build a Github check on PR, to check for "<<<<<<< HEAD". People can then checkout the PR branch, do some fixes, push and merge the PR.

Maybe mostly useful for the Github Action route, but still usefull in my opinion. Would you be open to a change like this?

sorenlouv commented 1 year ago

This sounds like a good enhancement. I'll look into it.

Achllle commented 3 months ago

The fact that the github action is successful but the PR isn't created due to a merge conflict is a bug IMO, not a feature request. I was very surprised to find that this has been reported and not resolved after such a long time. Rather than a config, I believe this should be standard behavior. Right now devs in my team complain about missing backport PRs and you need to dig into the github action logs to find out what the actual issue is. This could mean that a backport could be forgotten which is very bad. @sorenlouv my suggestion would be that if you don't have the bandwidth to resolve this, we should at least at a warning message on the main README communicating this bug, or at least call it a beta feature.

Achllle commented 1 month ago

For anyone reading, setting commitConflicts: true in the config won't make Github recognize that there are unresolved conflicts. The conflicts will simply be committed and so if your CI doesn't catch the failing build, it's possible that the backport's unresolved merge conflict is overlooked and merged in.