The old fetch_open_issues assumed gh api --paginate emitted one JSON value
per line and split on newlines before calling json.loads. In reality gh
--paginate concatenates the raw JSON array response bodies (with embedded
whitespace/newlines), so any body large enough to contain a real newline
inside a string field left json.loads to parse a truncated slice, blowing
up with 'Unterminated string starting at ...'. Every issues-triggered
Check Duplicate Issues run has been failing because of this.
Fix by asking gh to unwind each page with --jq '.[]', which emits exactly
one JSON object per line and paginates safely, then json.loads each line.
Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
Add a Python script that detects duplicate issues using title similarity
(difflib.SequenceMatcher) and closes them via the gh CLI. Two-tier system:
- 0.6 threshold: informational comment via existing wow-actions step
- 0.85 threshold: auto-close with comment, label, and not_planned reason
Includes a workflow_dispatch workflow for one-time batch scans and
integrates auto-close into the existing check_duplicate_issues workflow
for newly opened issues.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>