Skip to content

Commit 0ab8f9d

Browse files
authored
Merge pull request #92 from d-morrison/fix/sweep-staged-edits-before-push
claude.yml: commit residual staged/untracked edits before the HEAD-unchanged check
2 parents 4233c1b + 1abd288 commit 0ab8f9d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/claude.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,14 @@ jobs:
424424
ISSUE_TITLE: ${{ github.event.issue.title }}
425425
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
426426
run: |
427+
# Sweep changes Claude staged or left untracked but didn't commit, so the HEAD-unchanged check below doesn't drop them.
428+
if [ -n "$(git status --porcelain)" ]; then
429+
git config user.name "claude[bot]"
430+
git config user.email "claude[bot]@users.noreply.github.com"
431+
git add -A
432+
git commit -m "chore: auto-commit residual staged/untracked changes from @claude session" \
433+
|| { echo "::error::auto-commit of residual @claude changes failed"; exit 1; }
434+
fi
427435
CURRENT_SHA=$(git rev-parse HEAD)
428436
if [ "$CURRENT_SHA" = "$STARTING_SHA" ]; then
429437
echo "No new commits on $BRANCH — Claude produced no changes; skipping push/PR."

0 commit comments

Comments
 (0)