From 83873a33f42d2df50996ff53ca206ca53e046522 Mon Sep 17 00:00:00 2001 From: leftibot Date: Wed, 15 Apr 2026 16:36:30 -0600 Subject: [PATCH] Address review: restore ref option to fix detached HEAD in auto-clang-format The previous commit (5fc11e6) incorrectly removed the ref option from the checkout step. actions/checkout@v6 on pull_request events defaults to the merge ref (detached HEAD), so ref: github.head_ref is required for EndBug/add-and-commit to push back to the PR branch. 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: '.'