From 15a32ba2272929e4e87917a0aef1546670e3c110 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Tue, 17 Nov 2026 13:42:50 -0800 Subject: [PATCH] chore: start the review bot on pull_request, not pull_request_target --- .github/workflows/agent-review.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agent-review.yml b/.github/workflows/agent-review.yml index 56f9ec9..60b9f05 100644 --- a/.github/workflows/agent-review.yml +++ b/.github/workflows/agent-review.yml @@ -3,8 +3,8 @@ name: "Agent: review" on: - # Runs from the default branch, for PRs from forks too. It never checks out the PR. - pull_request_target: + # A PR from a fork gets no secrets here, and the bot cannot push to a fork: the job skips it. + pull_request: types: [labeled] permissions: {} @@ -12,7 +12,9 @@ permissions: {} jobs: pr: name: Hand the PR to the bot - if: github.repository_owner == 'microsoft' && github.event.label.name == 'agent-review' + if: >- + github.repository_owner == 'microsoft' && github.event.label.name == 'agent-review' + && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest timeout-minutes: 5 steps: