Address review: fix auto-clang-format detached HEAD error

actions/checkout@v6 defaults to checking out the PR merge ref in
detached HEAD state, causing EndBug/add-and-commit to fail with
"fatal: You are not currently on a branch." Fix by explicitly
checking out the PR's head branch via github.head_ref.

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:25:09 -06:00
parent 65cf24b1ed
commit d2f1b61d7f

View File

@ -7,6 +7,8 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- uses: DoozyX/clang-format-lint-action@v0.20
with:
source: '.'