In a GitHub Action.
From all of the reviewers of a pull request
The people who have approved said pull request
I want to get their username.
I am expecting there is a value I can pass to a "step" in the workflow. Something like how there is ${{ github.event.pull_request.body }}
I am wanting to get a value like: APPROVERS: ${{ github.event.pull_request.reviewers }} so I can parse it to a custom script.
Because there isn't anything in the default GitHub workflow specification (that I could find), I ended up just making this open-source GitHub Action that will get that info for you: https://github.com/marketplace/actions/get-github-pull-request-reviews
Easy as just adding this step into my workflow:
Then consuming the result like so:
Only thing to be careful of is, this will just give you a file with the reviews rather than a JSON string as the string is too much to store in the Action variables.