From 13ccf7cf5c863f5ec61e6534e5e2d6dcd469cad5 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 18 Nov 2026 10:47:19 -0800 Subject: [PATCH] chore: skip fork PRs in the review bot workflow --- .github/workflows/agent-review.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/agent-review.yml b/.github/workflows/agent-review.yml index 56f9ec9..253f967 100644 --- a/.github/workflows/agent-review.yml +++ b/.github/workflows/agent-review.yml @@ -3,7 +3,8 @@ name: "Agent: review" on: - # Runs from the default branch, for PRs from forks too. It never checks out the PR. + # Runs from the default branch, also when the PR has a merge conflict. It never checks out the + # PR. The job skips a PR from a fork: the bot cannot push to a fork. pull_request_target: types: [labeled] @@ -12,7 +13,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: