diff --git a/.github/workflows/agent-review.yml b/.github/workflows/agent-review.yml index 60b9f05..56f9ec9 100644 --- a/.github/workflows/agent-review.yml +++ b/.github/workflows/agent-review.yml @@ -3,8 +3,8 @@ name: "Agent: review" on: - # A PR from a fork gets no secrets here, and the bot cannot push to a fork: the job skips it. - pull_request: + # Runs from the default branch, for PRs from forks too. It never checks out the PR. + pull_request_target: types: [labeled] permissions: {} @@ -12,9 +12,7 @@ permissions: {} jobs: pr: name: Hand the PR to the bot - if: >- - github.repository_owner == 'microsoft' && github.event.label.name == 'agent-review' - && github.event.pull_request.head.repo.full_name == github.repository + if: github.repository_owner == 'microsoft' && github.event.label.name == 'agent-review' runs-on: ubuntu-latest timeout-minutes: 5 steps: