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

fix: validate that issues exist before commenting on duplicatesBrowse files
Add validation to comment-on-duplicates.sh that verifies the base issue
and all potential duplicate issues actually exist in the repo before
posting a comment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
David Dworken authored on Jan 7, 2026 parent 0b86fdb · commit a3df424857ac
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