Add review body to automatic reviews #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yamllint disable rule:line-length | |
# yamllint disable rule:braces | |
name: PR Approval | |
on: | |
pull_request: | |
env: | |
LINES: > | |
"Whatever you say!" | |
"Isn't this exciting? I know I'm excited!" | |
"I have a good feeling about this! It's going to be great!" | |
jobs: | |
approve_pr: | |
name: Automatic Approval | |
runs-on: ubuntu-latest | |
if: github.actor == github.repository_owner | |
steps: | |
- name: Approve PR | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
shuf -n 1 -e ${{ env.LINES }} | | |
gh pr review ${{ github.event.pull_request.html_url }} --approve --body-file - |