From 7aae511cbc5e242f7e629bca416acfa2a3c6f23b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Mar 2026 21:36:14 +0000 Subject: [PATCH 1/3] fix(github-app-auth): skip local git config when skip-checkout is true When skip-checkout: 'true', there is no git repo yet, so local git config commands fail with "fatal: not in a git directory" (exit 128). Wrap the local (non---global) git config commands in a conditional so they only run when a repo is present. https://claude.ai/code/session_01To6bMgr59sMZgHKDTt4F1x --- .github/actions/github-app-auth/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/github-app-auth/action.yml b/.github/actions/github-app-auth/action.yml index 6df8390..4f13ae9 100644 --- a/.github/actions/github-app-auth/action.yml +++ b/.github/actions/github-app-auth/action.yml @@ -80,9 +80,11 @@ runs: echo "GITHUB_TOKEN=${GH_TOKEN}" >> $GITHUB_ENV echo "Wrote GITHUB_TOKEN to GITHUB_ENV" git config --global user.name '${{ steps.get-user-id.outputs.user-name }}' - git config user.name '${{ steps.get-user-id.outputs.user-name }}' git config --global user.email '${{ steps.get-user-id.outputs.user-email }}' - git config user.email '${{ steps.get-user-id.outputs.user-email }}' + if [ "${{ inputs.skip-checkout }}" != "true" ]; then + git config user.name '${{ steps.get-user-id.outputs.user-name }}' + git config user.email '${{ steps.get-user-id.outputs.user-email }}' + fi - name: Output GitHub App authentication info shell: bash From 4779f42302b993fa85d18d8e73f0b4c5c4a5025d Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Mar 2026 21:53:19 +0000 Subject: [PATCH 2/3] fix(github-app-auth): set local git config after checkout step Move local git config (user.name, user.email) to a dedicated step that runs after checkout, so it always sets both global and local config when a repo is present. When skip-checkout is true, only global config is set. https://claude.ai/code/session_01To6bMgr59sMZgHKDTt4F1x --- .github/actions/github-app-auth/action.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/github-app-auth/action.yml b/.github/actions/github-app-auth/action.yml index 4f13ae9..eba0889 100644 --- a/.github/actions/github-app-auth/action.yml +++ b/.github/actions/github-app-auth/action.yml @@ -81,10 +81,6 @@ runs: echo "Wrote GITHUB_TOKEN to GITHUB_ENV" git config --global user.name '${{ steps.get-user-id.outputs.user-name }}' git config --global user.email '${{ steps.get-user-id.outputs.user-email }}' - if [ "${{ inputs.skip-checkout }}" != "true" ]; then - git config user.name '${{ steps.get-user-id.outputs.user-name }}' - git config user.email '${{ steps.get-user-id.outputs.user-email }}' - fi - name: Output GitHub App authentication info shell: bash @@ -103,3 +99,10 @@ runs: token: ${{ steps.app-token.outputs.token }} clean: false persist-credentials: true + + - name: Configure local git user + if: inputs.skip-checkout != 'true' + shell: bash + run: | + git config user.name '${{ steps.get-user-id.outputs.user-name }}' + git config user.email '${{ steps.get-user-id.outputs.user-email }}' From 81ec819992df1f9835a2676cff263acbc51ee3b3 Mon Sep 17 00:00:00 2001 From: Nathan Heaps <1282393+nsheaps@users.noreply.github.com> Date: Sun, 8 Mar 2026 19:47:41 -0400 Subject: [PATCH 3/3] fix checkout-as-app to also set git config user name and email after checkout --- .github/actions/checkout-as-app/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/checkout-as-app/action.yml b/.github/actions/checkout-as-app/action.yml index 8138b17..dcd77de 100644 --- a/.github/actions/checkout-as-app/action.yml +++ b/.github/actions/checkout-as-app/action.yml @@ -161,3 +161,9 @@ runs: set-safe-directory: ${{ inputs.set-safe-directory }} github-server-url: ${{ inputs.github-server-url }} persist-credentials: ${{ inputs.persist-credentials }} + + - name: Configure local git user + shell: bash + run: | + git config user.name '${{ steps.auth.outputs.user-name }}' + git config user.email '${{ steps.auth.outputs.user-email }}'