# Request team review for PRs from external contributors.
name: PR:Request Team Review

on:
  pull_request_target:
    types: [opened, reopened]

permissions:
  pull-requests: write

jobs:
  request-review:
    if: >-
      !contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'),
                github.event.pull_request.author_association)
    runs-on: ubuntu-latest
    steps:
      - name: Request team review
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          gh pr edit ${{ github.event.pull_request.number }} \
            --repo ${{ github.repository }} \
            --add-reviewer Comfy-org/comfy_frontend_devs
