From 04159106acb7bcc6a39edfcf9b3fe06d2cfb4b05 Mon Sep 17 00:00:00 2001 From: leftibot Date: Wed, 15 Apr 2026 16:43:05 -0600 Subject: [PATCH] Address review: fix auto-clang-format checkout for fork PRs Use github.event.pull_request.head.repo.full_name and github.event.pull_request.head.ref to correctly check out the PR branch when the PR originates from a fork repository. Requested by @lefticus in PR #691 review. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/auto-clang-format.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-clang-format.yml b/.github/workflows/auto-clang-format.yml index 0ffea8d2..a6ea16dc 100644 --- a/.github/workflows/auto-clang-format.yml +++ b/.github/workflows/auto-clang-format.yml @@ -8,8 +8,9 @@ jobs: steps: - uses: actions/checkout@v6 with: - ref: ${{ github.head_ref || github.ref_name }} - fetch-depth: 0 + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 - uses: DoozyX/clang-format-lint-action@v0.20 with: source: '.'