Skip to content

Commit 655fb7f

Browse files
committed
chore(scripts): make todo-check respect loop env
Allow ROBOPPI_TODO_PATH/ROBOPPI_LOOP_DIR overrides and prefer legacy .agentcore-loop when present.
1 parent a754d52 commit 655fb7f

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎scripts/agent-pr-loop/todo-check.sh‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
LOOP_DIR=.roboppi-loop
4+
DEFAULT_LOOP_DIR=.roboppi-loop
55

6-
TODO="${LOOP_DIR}/todo.md"
7-
test -s "${TODO}" || { echo "CHECK: missing todo"; exit 1; }
6+
# Allow workflows to override where loop artifacts live.
7+
# Compatibility: prefer .agentcore-loop when present (older loop layout).
8+
if [ -n "${ROBOPPI_TODO_PATH:-}" ]; then
9+
TODO="${ROBOPPI_TODO_PATH}"
10+
elif [ -n "${ROBOPPI_LOOP_DIR:-}" ]; then
11+
TODO="${ROBOPPI_LOOP_DIR}/todo.md"
12+
elif [ -s ".agentcore-loop/todo.md" ] && [ ! -s "${DEFAULT_LOOP_DIR}/todo.md" ]; then
13+
TODO=".agentcore-loop/todo.md"
14+
else
15+
TODO="${DEFAULT_LOOP_DIR}/todo.md"
16+
fi
17+
18+
test -s "${TODO}" || { echo "CHECK: missing todo: ${TODO}"; exit 1; }
819

920
COUNT=$(grep -c '^- \[ \] ' "${TODO}" || true)
1021
if [ "${COUNT}" -lt 6 ]; then

0 commit comments

Comments
 (0)