spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

Merge pull request #16635 from ddworken/dworken/validate-issue-existsBrowse files
fix: validate that issues exist before commenting on duplicates
David Dworken authored on Jan 7, 2026 · GitHub committed on Jan 7, 2026 parents 0b86fdb + a3df424 · commit 03129a27b040
1 changed file+14 -0compared with 0b86fdb
Mscripts/comment-on-duplicates.sh
@@ -60,6 +60,20 @@
6060 fi
6161 done
6262
63+# Validate that base issue exists
64+if ! gh issue view "$BASE_ISSUE" --repo "$REPO" &>/dev/null; then
65+ echo "Error: issue #$BASE_ISSUE does not exist in $REPO" >&2
66+ exit 1
67+fi
68+
69+# Validate that all duplicate issues exist
70+for dup in "${DUPLICATES[@]}"; do
71+ if ! gh issue view "$dup" --repo "$REPO" &>/dev/null; then
72+ echo "Error: issue #$dup does not exist in $REPO" >&2
73+ exit 1
74+ fi
75+done
76+
6377 # Build comment body
6478 COUNT=${#DUPLICATES[@]}
6579 if [[ $COUNT -eq 1 ]]; then