From 98ef6fd029227cf3c437563b98f2c3ffa8c33119 Mon Sep 17 00:00:00 2001 From: ShraddhaZoman Date: Sun, 9 Aug 2026 18:10:48 +0530 Subject: [PATCH] ci: correct fork check in pull_request_target workflow The condition github.event.repository.fork == false is ineffective in a pull_request_target context, since github.event.repository always refers to the base repository, never the fork. This meant the check always evaluated to true, allowing the job to run even for fork-originated PRs. Use github.event.pull_request.head.repo.fork instead, which correctly reflects the PR's actual source repository. Fixes #33632 --- .github/workflows/assistant-to-the-branch-manager.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/assistant-to-the-branch-manager.yml b/.github/workflows/assistant-to-the-branch-manager.yml index d207ae50972d..76e83af4fb38 100644 --- a/.github/workflows/assistant-to-the-branch-manager.yml +++ b/.github/workflows/assistant-to-the-branch-manager.yml @@ -13,7 +13,7 @@ permissions: jobs: assistant_to_the_branch_manager: runs-on: ubuntu-latest - if: github.event.repository.fork == false + if: github.event.pull_request.head.repo.fork == false steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: