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

[Bug] Non manifest PRs are not merging #4199

Closed
jcscottiii opened this issue May 17, 2023 · 1 comment · Fixed by #4207
Closed

[Bug] Non manifest PRs are not merging #4199

jcscottiii opened this issue May 17, 2023 · 1 comment · Fixed by #4207

Comments

@jcscottiii
Copy link
Collaborator

jcscottiii commented May 17, 2023

What used to happen (using an old PR as an example):

  • A single auto merge workflow would be triggered upon pull_request open event.
  • It would detect that the tests were still running and wait.
  • Once the tests finished and the retry poll came back around, it would merge it. (It would not wait for an approval)

The problem now (using a new PR as an example):

  • A single auto merge workflow would be triggered upon pull_request open event.
  • It detects that there is a minimum number of approvals needed and just stops

Solutions considered:

  1. Leverage pull_request_review event to retrigger the automerge workflow.
    Conclusion: This is already configured but not working. This is because any event from github action bot cannot trigger anything. This is to prevent recursive github actions (Read more about GITHUB_TOKEN in these docs). I think this changed in the recent years.
    Data to show that github action bot approval doesn't trigger a pull_request_event:
    • An old PR approved by only github-actions only shows the automerge check was ran for the pull_request event.
    • An example PR where the PR did not merge. Upon approving it myself, a second automerge job ran.
      • First auto merge job with the pull_request event (logs)
      • Second auto merge job with the pull_request_review event. This was triggered by my approval and not from the github actions approval (logs)
  2. Replace all triggers on the automerge workflow for an on "workflow_run" trigger. This workflow run will only trigger after the "Auto Approve".
    Preliminary conclusion: This looks like it should work and is reasonable to expect that automerge workflow should only happen after the auto approval (which happens after the successful test result)

Previous thoughts

I initially thought that this was due to a timeout issue due to the test action taking too long. I was wrong.

@jcscottiii
Copy link
Collaborator Author

Going to implement solution 2.

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

Successfully merging a pull request may close this issue.

1 participant