Trigger a GitHub Action run when complete PR require approvals

344 Views Asked by At

I want to trigger tests through Github Actions when a PR completes code review. I have set Required number of approvals before merging to 2, but I couldn't find any relevant events in the documentation. I hope to trigger the tests when both of the two reviewers approve.

I have tried possible events already, but it's not work.

  • pull_request_review: submitted
  • pull_request: review_requested
  • check_run: completed

Any help or explanation is welcome! Thank you.

1

There are 1 best solutions below

1
Pol Piella On

Have you tried using the pull_request event and filtering based on the auto_merge_enabled activity type?

I am not 100% sure it will work, but worth a try. I think if you have made two reviews compulsory, auto merging will be off until approvals come in.

Let me know if it works!