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

Backport GH action & merge conflicts #447

Open
MstrDC opened this issue Oct 6, 2022 · 3 comments
Open

Backport GH action & merge conflicts #447

MstrDC opened this issue Oct 6, 2022 · 3 comments

Comments

@MstrDC
Copy link
Contributor

MstrDC commented Oct 6, 2022

Tested with:

  • Running backport locally:
    Merge conflict => Fix locally before it is pushed & PR created
  • Running backport via Github action:
    Merge conflict
    => Creates a PR for the branches that have no merge conflicts.
    => Merge conflict reported in the log
    => Merge conflicts are not reported on higher level, for examply failed/warning on GH action.

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:

  • git cherry-pick commit_sha
  • Merge conflict (ignore)
  • git add .
  • git cherry-pick continue\
  • Optional: Add label "merge-conflict" to the PR

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
Copy link
Owner

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

@Achllle
Copy link

Achllle commented Jun 18, 2024

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
Copy link

Achllle commented Aug 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants