Skip to content

Instantly share code, notes, and snippets.

@book000
Last active April 16, 2022 10:01
Show Gist options
  • Save book000/93ce71f886cb91b8bbdf02a5f3604cf0 to your computer and use it in GitHub Desktop.
Save book000/93ce71f886cb91b8bbdf02a5f3604cf0 to your computer and use it in GitHub Desktop.
プルリクがオープンされたときにbook000をレビュアーに追加する
# 自動的にbook000をレビュアーにする
# book000, renovate, github-actionsからのPull-Requestにはレビュアーを追加しない
# 次の設定が必要:
# Settings -> Actions -> General -> Fork pull request workflows from outside collaborators -> Require approval for first-time contributors who are new to GitHub
name: Add reviewer
on:
pull_request_target:
types: [ opened ]
jobs:
add-reviewer:
runs-on: ubuntu-latest
if: github.event.sender.id != 8929706 || github.event.sender.id != 29139614 || github.event.sender.id != 41898282
# 8929706 = book000, 29139614 = renovate, 41898282 = github-actions
steps:
- name: Add reviewer
run:
gh pr edit ${{ github.event.number }} -R "$GITHUB_REPOSITORY" --add-reviewer book000
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment