Skip to content

chore: create PR approve bot #1

chore: create PR approve bot

chore: create PR approve bot #1

# referenced https://qiita.com/sounisi5011/items/eba7cf3ed65973e6edb2
name: Auto Approve
# このGitHub Actionsを起動するイベントの種類
on:
# Pull Request関係のイベント
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review # Draft Pull RequestからDraftが外れたら起動
jobs:
approve:
# このJobを実行する条件。以下の全てを満たす場合
# + Pull Requestの作成者が、リポジトリ所有者と等しい
# + Pull Requestが、Draft Pull Requestではない
if: |
github.event.pull_request.user.login == github.repository_owner
&& ! github.event.pull_request.draft
# このJobを実行する時に使うOS
# 今回は何でもいいが、GitHub Actionsでは指定が必須
runs-on: ubuntu-latest
# 内部で使用されるGitHub APIの権限を上書き
permissions:
pull-requests: write
steps:
# Pull RequestをApproveする
- uses: hmarr/auto-approve-action@v3