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

merge when green annoyance #1334

Open
e00E opened this issue Aug 18, 2020 · 3 comments
Open

merge when green annoyance #1334

e00E opened this issue Aug 18, 2020 · 3 comments

Comments

@e00E
Copy link
Contributor

e00E commented Aug 18, 2020

Not sure if or how we fix this but wanted to document the problem.

I have multiple PRs that are supposed to be merged in a row and depend on each other like branch-0, branch-1, branch-2 and there is only one commit in each branch.
Then when I merge-when-green branch-0, branch-1 gets updated to point to master but it cannot be merged anymore because of a merge conflict. There is no real conflict because of the way the branches were set up but I think what happens is that the squash feature updates the commit timestamp and message which changes the hash so that the merged commit no longer matches the original branch-0 commit. The code change is the same but the commit hash changed which is a conflict.
This is annoying because I have to checkout the branch locally again and rebase to master manually.

Does that happen to you too? Is there something I can change about the workflow to not have this problem?

@nlordell
Copy link
Contributor

nlordell commented Aug 18, 2020

This happens to me as well. I also think that it is, as you pointed out, because the squash commit is treated as a different commit to the one in your base branch.

Maybe we can configure merge when green to fast-forward merge if the branch has exactly a single commit, or configure it to rebase instead of merge with master.

@fleupold
Copy link
Contributor

Maybe what we want is this config from https://doc.mergify.io/merge-action.html#strict-merge

Screen Shot 2020-08-18 at 15 22 34

@fleupold
Copy link
Contributor

There are a bunch of issues with it though, so I'm not sure we can use it https://doc.mergify.io/actions.html#strict-rebase

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