Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix(skill): disambiguate .commit.oid vs .commit_id in review-pr (#1472)
worktrunk-bot12d7dcf1f283
diff --git a/.claude/skills/review-pr/SKILL.md b/.claude/skills/review-pr/SKILL.mdindex cc690cec7..3eb8ad6c0 100644--- a/.claude/skills/review-pr/SKILL.md+++ b/.claude/skills/review-pr/SKILL.md@@ -29,6 +29,8 @@ HEAD_SHA=$(gh pr view <number> --json commits --jq '.commits[-1].oid')# Find the bot's most recent substantive review (any state).# Include reviews with a non-empty body OR approvals (LGTM uses --approve -b "").# Uses "| length > 0" instead of "!= \"\"" to avoid bash ! history expansion.+# IMPORTANT: `gh pr view --json reviews` returns `.commit.oid` (NOT `.commit_id`).+# The REST API (`gh api .../reviews`) uses `.commit_id` — don't confuse the two.LAST_REVIEW_SHA=$(gh pr view <number> --json reviews \--jq "[.reviews[] | select(.author.login == \"$BOT_LOGIN\" and (.body | length > 0 or .state == \"APPROVED\"))] | last | .commit.oid // empty")```@@ -307,6 +309,7 @@ approach:Post exactly one review per run. API calls can succeed server-side whileappearing to hang, so always verify before calling `gh pr review`:```bash+# NOTE: REST API uses .commit_id (not .commit.oid which is the gh pr view --json field)gh api "repos/$REPO/pulls/<number>/reviews" \--jq "[.[] | select(.user.login == \"$BOT_LOGIN\" and .commit_id == \"$HEAD_SHA\")] | last | .submitted_at // empty"```