fix: ensure_ops_repo() should call migrate_ops_repo() to seed missing dirs (#688)
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline failed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-11 20:40:36 +00:00
parent 8137410e7e
commit 3b1ca4a73a

View file

@ -33,6 +33,9 @@
# Source agent-sdk for claude_run_with_watchdog watchdog helper
source "$(dirname "${BASH_SOURCE[0]}")/agent-sdk.sh"
# Source ops-setup for migrate_ops_repo (used by ensure_ops_repo)
source "$(dirname "${BASH_SOURCE[0]}")/ops-setup.sh"
# ── Run guards ───────────────────────────────────────────────────────────
# acquire_run_lock LOCK_FILE
@ -610,6 +613,7 @@ ensure_ops_repo() {
git -C "$ops_root" fetch origin "${PRIMARY_BRANCH}" --quiet 2>/dev/null || true
git -C "$ops_root" checkout "${PRIMARY_BRANCH}" --quiet 2>/dev/null || true
git -C "$ops_root" pull --ff-only origin "${PRIMARY_BRANCH}" --quiet 2>/dev/null || true
migrate_ops_repo "$ops_root" "${PRIMARY_BRANCH}"
return 0
fi