Skip to content

Instantly share code, notes, and snippets.

@rioki
Created November 9, 2022 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rioki/0f9c49582bd868af25ea802107dc7a05 to your computer and use it in GitHub Desktop.
Save rioki/0f9c49582bd868af25ea802107dc7a05 to your computer and use it in GitHub Desktop.
name: Auto approve
on:
issue_comment:
types:
- created
jobs:
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v6
name: Approve LGTM Review
if: github.actor == 'rioki' && contains(github.event.comment.body, 'LGTM')
with:
script: |
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
review_id: 1,
event: 'APPROVE',
body: 'Let`s get this merged then.'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment