-
Notifications
You must be signed in to change notification settings - Fork 208
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
Inconsistent view of mergeable_state
resulting in wrong behaviour
#103
Comments
3_automerge.txt
Same problem for me. I'm able to get mergeable_state = behind via API, but automerge-action gets mergeable-state = blocked (check attached log). Seems like a bug in either octokit usage in automerge-action or a bug in octokit/github api itself. |
update: tried to query Github API using octokit -- got mergeable_state = behind. |
Are you checking the state at the same time the automerge-action is running? Because it could be that the state is blocked due to automerge-action. So while that action is running, GH API could report blocked. I think I've seen this before sometimes. |
I checked before and after and I think I managed to "catch" in during at least once. I always got |
I've just tried to check during automerge check: github api responsed to me with behind (several times), but responsed to automerge-action with blocked (several times too). |
This looks a bit like a GH API bug and I'm afraid I cannot help you here. The correct place to address it is https://github.saobby.my.eu.orgmunity/, I think. Unfortunately, the GH API, especially with regards to GH actions, has some unexpected behaviours which I also struggled with in the beginning. It has gotten a bit better, but there are still issues like this one. Sorry for not being able to give you any better news! |
@pascalgn I have a PR which is constantly blocked
Is there a way to try to force merge even with state blocked? |
Thanks @pascalgn for pointer. |
I think this is fixed now. However, feel free to reopen this or create a new issue if you disagree or if there are any other problems! 👍 |
I have configured automerge-action to run in a scheduled workflow, every 5 minutes. When it runs, it finds one PR that has the labels I have configured.
The PR needs to be updated from master, which I expect the action to perform. Then it should be ready to merge.
When it runs, it first says mergeable_state is
blocked
, which results in not doing an update. Then it says mergeable_state isundefined
, and that makes it not try to merge. If I try using the API to look up mergeable_state, I getbehind
.We have configured branch protections, so unless the branch is updated nobody is allowed to merge. That's why it is failing to merge. The big question is why it is getting two different values for mergeable_state, neither of which are correct as far as I can tell. Presumably, if it had gotten the correct values, it would also do the expected thing (which is to first update, then merge).
The text was updated successfully, but these errors were encountered: