From d2f1b61d7fd3de94db64edf37260692da318cf34 Mon Sep 17 00:00:00 2001 From: leftibot Date: Wed, 15 Apr 2026 16:25:09 -0600 Subject: [PATCH] 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) --- .github/workflows/auto-clang-format.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/auto-clang-format.yml b/.github/workflows/auto-clang-format.yml index 0da73acd..a6422c14 100644 --- a/.github/workflows/auto-clang-format.yml +++ b/.github/workflows/auto-clang-format.yml @@ -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: '.'