Skip to content

Conversation

@sshresthh
Copy link

Summary

Fixes a logic gap where scripts would miss activity on long issue threads due to default API pagination limits (30 items).

Changes

  • Shared Helpers: Extracted pagination logic to reusable helpers.
  • auto-close-duplicates.ts: Now scans all comment pages to find the latest dedupe comment and subsequent activity. Also paginates reactions to ensure author thumbs-down are not missed.
  • backfill-duplicate-comments.ts: Now scans all comment pages to detect existing dedupe comments before triggering workflows.

Impact

Prevents the bot from incorrectly flagging issues as "stale" or "needs closing" simply because the relevant comments/reactions were pushed off the first page of results.

Testing

  • Logic Verification: Implemented standard pagination patterns (fetching per_page=100 until results < 100).
  • Dry Run: Verified safely using DRY_RUN=true to ensure no side effects on existing issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant