devmasx / merge-branch

A GitHub Action that merge PR branch to other branchs
161 stars 58 forks source link

Auto resolve conflicts #25

Open NitzanShifrin opened 2 years ago

NitzanShifrin commented 2 years ago

Hey there! Any chance to add a flag to decide what branch to take when conflicts are happening. We want to have different versions for different branches, but we cant resolve the conflicts for now.

andrewfenn commented 2 years ago

After looking into this it doesn't seem possible to do this because the github API doesn't support merging of branches with conflicts. https://docs.github.com/en/rest/reference/branches#merge-a-branch

It might be possible to check out the code and do something outside of the API but I do not think the author of this project would want to do that given they're explicitly using the github API.

My recommendation would be to first bug Github to add it as a feature to their rest API.

alexcroox commented 2 years ago

It would be useful if the step could set a flag if there was a conflict so we can take post actions such as commenting on the PR a manual resolution needs to happen