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

Recognize /lgtm and /approve from PR review comment #60

Open
carolynvs opened this issue May 15, 2022 · 2 comments
Open

Recognize /lgtm and /approve from PR review comment #60

carolynvs opened this issue May 15, 2022 · 2 comments

Comments

@carolynvs
Copy link
Contributor

It would be great if when doing a GitHub code review, if the reviewer used /lgtm or /approve in the summarizing review comment, that it was recognized by the github action. I think without that, it would be easy for people to do a review with those commands, and not realize that their command isn't being acted upon.

I'm going to look into what events we'd need to listen for to make this work.

@carolynvs
Copy link
Contributor Author

Shoot, this won't work for PRs from a fork because pull_request_review is locked to read access. I had hoped that the event worked the same as pull_request_target, using the workflow definition from the base ref, but unfortunately it uses the ref from the pull request (which would be unsafe to grant write access to).

So this is a non-starter until github supports an event like pull_request_review_target.

@carolynvs
Copy link
Contributor Author

Re-opening because I think that we can trigger an empty workflow name "review-submitted" when a PR review is completed. It does nothing though. Instead another workflow is triggered when the review-submitted workflow completes with the workflow_run event. In this workflow we will have a token with write access and can then react to slash commands.

https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow

@carolynvs carolynvs reopened this May 22, 2022
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

No branches or pull requests

1 participant