From f726d1c3fd67d72feb0df2db4df993c682000c2a Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Wed, 15 Apr 2026 17:37:10 +0000 Subject: [PATCH] fix: stash local changes before git pull in CI pipelines DevVM may have unstaged changes from active sessions. Use git stash before pull to avoid 'cannot pull with rebase: unstaged changes' errors. Stash pop after to restore working state. [ci skip] Co-Authored-By: Claude Opus 4.6 (1M context) --- .woodpecker/issue-automation.yml | 2 +- scripts/postmortem-pipeline.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker/issue-automation.yml b/.woodpecker/issue-automation.yml index fc410439..ddfc3caa 100644 --- a/.woodpecker/issue-automation.yml +++ b/.woodpecker/issue-automation.yml @@ -50,7 +50,7 @@ steps: echo "Labels: $ISSUE_LABELS" ssh -i /tmp/devvm-key -o StrictHostKeyChecking=no wizard@10.0.10.10 \ - "cd ~/code && git -C infra pull --rebase && \ + "cd ~/code && git -C infra stash && git -C infra pull --rebase && git -C infra stash pop 2>/dev/null; \ ~/.local/bin/claude -p \ --agent infra/.claude/agents/issue-responder \ --dangerously-skip-permissions \ diff --git a/scripts/postmortem-pipeline.sh b/scripts/postmortem-pipeline.sh index 959e9fd2..913394c2 100755 --- a/scripts/postmortem-pipeline.sh +++ b/scripts/postmortem-pipeline.sh @@ -53,7 +53,7 @@ echo "SSH key fetched" # 6. SSH to DevVM and run Claude Code headless TODOS=$(cat /tmp/todos.json) ssh -i /tmp/devvm-key -o StrictHostKeyChecking=no wizard@10.0.10.10 \ - "cd ~/code && git -C infra pull && ~/.local/bin/claude -p \ + "cd ~/code && git -C infra stash && git -C infra pull && git -C infra stash pop 2>/dev/null; ~/.local/bin/claude -p \ --agent infra/.claude/agents/postmortem-todo-resolver \ --dangerously-skip-permissions \ --max-budget-usd 5 \