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) <noreply@anthropic.com>
This commit is contained in:
leftibot 2026-04-15 16:43:05 -06:00
parent ae408ce9d4
commit 04159106ac

View File

@ -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: '.'