Autosquash not updating the PR
gonditeniz opened this issue · comments
It's hard to know what's wrong since the repo is private so I can't see its "Actions" tab. Have you signed up for the GitHub Actions beta? What's the content of your Autosquash workflow file? Have you tried using this one?
I had a similar issue, my github_token was not set properly in my repository.
Thanks for the answer.
Let me know any information that can help you identify the issue and I'll try to share it.
Regarding your questions:
- We are part of the GitHub Actions beta.
- The file I'm using is this one
Additionally, in the checks section I can see the following entries:
- Autosquash / Autosquash (pull_request) Successful in 3s
- Autosquash / Autosquash (pull_request) Successful in 3s
They were executed in the moment I added the label and just once.
The log of the jobs is the following:
Set up job
Download action repository 'tibdex/autosquash@v2'
Current runner version: '2.160.0'
Prepare workflow directory
Prepare all required actions
Download action repository 'tibdex/autosquash@v2'
Run tibdex/autosquash@v2
Mergeable state is blocked
Run tibdex/autosquash@v2
Consider merging or updating #4750
Fetching pull request details
Mergeable state is blocked
Complete job
Cleaning up orphan processes```
I had a similar issue, my github_token was not set properly in my repository.
I reviewed that and it looks ok. Can you be more specific on "not set properly"?
Your log shows that the mergeable state is blocked
. As explained in #23 (comment), Autosquash relies on this state to decide what to do.
The relevant part of the code is this:
Lines 39 to 53 in 9151c79
Did you enable the "Require branches to be up-to-date before merging" branch protection?
The "Require branches to be up-to-date before merging" branch protection is enabled.
As far as I can see in the code, blocked
state is not taken into account neither for merge nor for update. What should happen in that case?
Same happens to me, I was going to try Autorebase
but it might have the same issue as you said. I tried removing and adding the label, and the same error is thrown.
Based on octokit/octokit.net#1763 (comment), maybe GitHub is returning blocked
instead of behind
because your "required status checks" protection is loose. If that's the case, can you try making it strict by checking the "Require branches to be up-to-date before merging" box?
The problem is that check run event isn't working:
I think Github or CircleCI (in my case) made a change recently to check_run
because this was working and stopped working 2 days ago, I didn't do any change but now I went to the webhooks' events page and this was disabled:
Also, there was a problem in Travis as well https://stackoverflow.com/questions/58307570/github-actions-check-run-is-not-called.
I guess we cannot rely on this event but we might have another option. My github configuration:
Any update on this? Can we not rely on check_run
and rely on other events for merging? for reference: https://github.com/tibdex/autosquash/blob/master/src/autosquash.ts#L359
Found the problem (but not the fix 😞)! It's when you enable this setting:
Found it thanks to kodiak that suffers the same issue, it seems a github limitation unless github actions can have more powers than bots (kodiak is a bot).