diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml new file mode 100644 index 00000000..e0a2b916 --- /dev/null +++ b/.github/workflows/auto-approve.yml @@ -0,0 +1,23 @@ +name: Approve PRs +on: + workflow_dispatch: + issue_comment: + types: [created] + +jobs: + autoapprove: + # This job only runs for pull request comments by approved users on creation + name: PR comment + if: github.event.issue.pull_request && + contains(github.event.comment.body, 'github-actions LGTM') && ( + github.event.comment.user.login == 'tkoyama010' || + ) + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: hmarr/auto-approve-action@v3 + with: + review-message: ":white_check_mark: Approving this PR because [${{ github.event.comment.user.login }}](https://github.com/${{ github.event.comment.user.login }}) said so in [here](${{ github.event.comment.html_url }}) :shipit:" + pull-request-number: ${{ github.event.issue.number }} + github-token: ${{ secrets.GITHUB_TOKEN }}