diff --git a/.claude/skills/recipe-upgrade/testme-on-pr.sh b/.claude/skills/recipe-upgrade/testme-on-pr.sh index dd60982..5c27980 100755 --- a/.claude/skills/recipe-upgrade/testme-on-pr.sh +++ b/.claude/skills/recipe-upgrade/testme-on-pr.sh @@ -42,8 +42,11 @@ while [ "$(date +%s)" -lt "$deadline" ]; do | python3 -c "import json,sys try: d=json.load(sys.stdin) except Exception: d={} +# Look for cc-ci/testme context first (most specific); fall back to first status URL sts=d.get('statuses') or [] -print(d.get('state','') or 'none', (sts[0].get('target_url') if sts else '') or '')" 2>/dev/null || echo "none ") +ctx_url=next((s.get('target_url','') for s in sts if s.get('context')=='cc-ci/testme'), '') +url=ctx_url or (sts[0].get('target_url','') if sts else '') +print(d.get('state','') or 'none', url or '')" 2>/dev/null || echo "none ") case "$state" in success) echo "VERDICT=GREEN"; echo "BUILD=${url}"; exit 0;; failure|error) echo "VERDICT=RED"; echo "BUILD=${url}"; exit 2;;