Skip to content

Conversation

@Felixoid
Copy link
Contributor

@Felixoid Felixoid commented Nov 24, 2025

Unfortunately, the current code doesn't cover many edge cases for large/old PRs and issues. Here are the cases that I address in the PR:

  • The page size in GitHub is 30, so only 30 comments are fetched
  • Pagination is not used at all
  • If a PR/issue was updated after until, it will be filtered out by the first search query
  • The since parameter isn't used. For huge issues/PRs, it helps to reduce the number of requests significantly
> gh api 'repos/ClickHouse/ClickHouse/issues/90542/comments?per_page=100&since=2025-11-20T00:00:00' | jq '.[] | .created_at'
"2025-11-20T23:55:00Z"
"2025-11-21T00:12:32Z"
"2025-11-21T09:56:12Z"
> gh api 'repos/ClickHouse/ClickHouse/issues/90542/comments?per_page=100&since=2025-11-21T00:00:00' | jq '.[] | .created_at'
"2025-11-21T00:12:32Z"
"2025-11-21T09:56:12Z"

@Felixoid Felixoid force-pushed the fix-github-commented branch 4 times, most recently from b20e925 to c06a3b6 Compare November 24, 2025 14:20
- Add `?per_page={PER_PAGE}&since={since}` to not fetch old comments
- If the latest comment on a page is older than `until`, fetch another page
@Felixoid Felixoid force-pushed the fix-github-commented branch from c06a3b6 to d28a3fc Compare November 24, 2025 14:28
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