Files
gstack/bin/gstack-review-read
T
Garry Tan 7e0d291d98 fix: add gstack-review-log and gstack-review-read atomic helpers
Branch names with `/` (e.g. garrytan/design-system) break review log
filepaths when Claude Code runs multi-line bash blocks as separate shell
invocations — eval sets $SLUG/$BRANCH in shell 1, but they're gone by
the time mkdir and echo run in shells 2+3.

These two scripts encapsulate the full operation (slug detection + mkdir
+ file I/O) in a single command, eliminating the variable persistence
problem. Both support GSTACK_HOME env var override for testability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 20:56:30 -07:00

11 lines
451 B
Bash
Executable File

#!/usr/bin/env bash
# gstack-review-read — read review log and config for dashboard
# Usage: gstack-review-read
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
eval $("$SCRIPT_DIR/gstack-slug" 2>/dev/null)
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
cat "$GSTACK_HOME/projects/$SLUG/$BRANCH-reviews.jsonl" 2>/dev/null || echo "NO_REVIEWS"
echo "---CONFIG---"
"$SCRIPT_DIR/gstack-config" get skip_eng_review 2>/dev/null || echo "false"