name: 'Assign PR'

on:
  pull_request_target:
    types:
      - 'opened'
      - 'reopened'
      - 'unassigned'

permissions:
  pull-requests: write

jobs:
  assign:
    name: 'Assign PR'
    runs-on: ubuntu-latest
    if: github.repository == 'microsoft/vscode-python'

    steps:
      - uses: actions/checkout@v2
        with:
          ref: main

      - name: Install Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.9'

      - name: Load pip cache
        uses: actions/cache@v2
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('.github/assign-reviewers/requirements.txt') }}
          restore-keys: |
            ${{ runner.os }}-pip-

      - name: Install dependencies
        run: python -m pip install --require-hashes --requirement .github/assign-reviewers/requirements.txt

      - name: Run script
        run: python .github/assign-reviewers/ ${{ secrets.GITHUB_TOKEN }}

name: 'Assign PR'

on:
  pull_request_target:
    types:
      - 'opened'
      - 'reopened'
      - 'unassigned'

permissions:
  pull-requests: write

jobs:
  assign:
    name: 'Assign PR'
    runs-on: ubuntu-latest
    if: github.repository == 'microsoft/vscode-python'

    steps:
      - uses: actions/checkout@v2
        with:
          ref: main

      - name: Install Python
        uses: actions/setup-python@v2
        with:
          python-version: '3.9'

      - name: Load pip cache
        uses: actions/cache@v2
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('.github/assign-reviewers/requirements.txt') }}
          restore-keys: |
            ${{ runner.os }}-pip-

      - name: Install dependencies
        run: python -m pip install --require-hashes --no-deps --requirement .github/assign-reviewers/requirements.txt

      - name: Run script
        run: python .github/assign-reviewers/ ${{ secrets.GITHUB_TOKEN }}

Make sure dependencies are installed with `--no-deps`
Make sure dependencies are installed with `--no-deps`