Skip to content

Comments

Handle commit pagination when tracking changes#436

Open
yashkamalchaturvedi wants to merge 3 commits intoAvarchLLC:mainfrom
yashkamalchaturvedi:main
Open

Handle commit pagination when tracking changes#436
yashkamalchaturvedi wants to merge 3 commits intoAvarchLLC:mainfrom
yashkamalchaturvedi:main

Conversation

@yashkamalchaturvedi
Copy link
Contributor

Motivation

  • Prevent missing recent commits when the GitHub API returns more than one page of results and avoid advancing the stored SHA if the fetch is truncated.
  • Align default limits for the legacy helper so behavior is consistent across callers.

Description

  • Replace single-request commit fetch with a paginated loop using per_page = 100 and a page counter to collect commits until sinceSha or maxCommits is reached.
  • Stop and return an empty events set when fetched history would be truncated to avoid advancing the stored latestSha.
  • Increase the default maxCommits from 30 to 500 for getChangesSince and getChangeLog to reduce unnecessary truncation.
  • Simplify the in-file commit array typing to any[] and preserve the chronological processing and event generation logic.

Testing

  • No automated tests were run as part of this change (not requested).

@vercel
Copy link

vercel bot commented Jan 22, 2026

@yashkamalchaturvedi is attempting to deploy a commit to the dhanushlnaik's projects Team on Vercel.

A member of the Team first needs to authorize it.

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