From cb983a43f264e06bf5fff53be909e6fd6d775235 Mon Sep 17 00:00:00 2001 From: Jules YZERD Date: Mon, 15 Jun 2026 22:55:03 +0200 Subject: [PATCH 1/2] fix(workflows): correct pagination break condition and HTTP status check - lock-closed-issues.yml: change `issues.length === 0` to `issues.length < 100` so the last partial page terminates the loop immediately instead of making an extra empty API call first - claude-dedupe-issues.yml: replace explicit `200 || 202` check with `>= 200 && < 300` to accept any 2xx success code (e.g. 201, 204) from the Statsig event endpoint Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/claude-dedupe-issues.yml | 2 +- .github/workflows/lock-closed-issues.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/claude-dedupe-issues.yml b/.github/workflows/claude-dedupe-issues.yml index cfbdf2db23..a42b7a02ee 100644 --- a/.github/workflows/claude-dedupe-issues.yml +++ b/.github/workflows/claude-dedupe-issues.yml @@ -87,7 +87,7 @@ jobs: HTTP_CODE=$(echo "$RESPONSE" | tail -n1) BODY=$(echo "$RESPONSE" | head -n-1) - if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 202 ]; then + if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then echo "Successfully logged duplicate comment event for issue #${ISSUE_NUMBER}" else echo "Failed to log duplicate comment event for issue #${ISSUE_NUMBER}. HTTP ${HTTP_CODE}: ${BODY}" diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index 3b3533320e..b1fc5d7628 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -41,7 +41,7 @@ jobs: page: page }); - if (issues.length === 0) { + if (issues.length < 100) { hasMore = false; break; } From 6e84bf97acb9f0be014d4ac79cd69d15d42c4bf0 Mon Sep 17 00:00:00 2001 From: Jules YZERD Date: Mon, 15 Jun 2026 22:55:47 +0200 Subject: [PATCH 2/2] fix(scripts/gh.sh): reject empty query for search issues command Without this guard, calling `./scripts/gh.sh search issues` or passing an empty string sends an unfiltered `gh search issues ""` request to the GitHub API, which returns thousands of results or an API error. Co-Authored-By: Claude Sonnet 4.6 --- scripts/gh.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/gh.sh b/scripts/gh.sh index 06c15c847b..1bcf73f743 100755 --- a/scripts/gh.sh +++ b/scripts/gh.sh @@ -75,6 +75,10 @@ done if [[ "$CMD" == "search issues" ]]; then QUERY="${POSITIONAL[0]:-}" + if [[ -z "$QUERY" ]]; then + echo "Error: search issues requires a non-empty query string (e.g., ./scripts/gh.sh search issues \"bug report\" --limit 10)" >&2 + exit 1 + fi QUERY_LOWER=$(echo "$QUERY" | tr '[:upper:]' '[:lower:]') if [[ "$QUERY_LOWER" == *"repo:"* || "$QUERY_LOWER" == *"org:"* || "$QUERY_LOWER" == *"user:"* ]]; then echo "Error: search query must not contain repo:, org:, or user: qualifiers (e.g., ./scripts/gh.sh search issues \"bug report\" --limit 10)" >&2