xt0rted/pull-request-comment-branch

This is fantastic for us trying to use "on: issue_comment"

Closed this issue · 1 comments

This is great btw...my workflow is a Terraform GHA workflow, and we wanted to do a manual comment 'Terraform Apply' before the code could merge to Main branch, and this allows us to do that. But, I'm hoping we could have one more stop gap and that would be to use the info gleaned from your code to check wether or not the PR has been approved, and if it has been approved Terraform Apply can proceed and if not TF fails. Do you know if it's possible to get that info and use it with your outputs?

I'm glad you found this helpful.

I'm working on v2 and looked into adding support for including the approval status of the PR. I don't see an easy way to add this though.

PRs don't have an approval status, instead they have reviews with a status and branch protection rules are used to set how many approvals are needed to allow merging. I think this is better suited for a different action due to the complexities of determining if a PR is approved or not.