feat(cursor-origin): Track release commits - #124853
Merged
Merged
Conversation
Implement `compare_commits` so releases built from Origin repositories include their commits, authors, and file changes. Origin's comparison only returns a commit count, so ranges use `aheadBy` to fetch commits from the head. The first release fetches the 20 most recent commits. This is exact for linear history, but can miss commits when merging a long-lived branch. Commit files require a separate 5-point call, so `cursor-origin-app.fetch-commits.max-compare-commits` caps the range at 500 commits and logs when truncation occurs. `_paginate` now accepts a `limit` to avoid fetching more commits than needed.
giovanni-guidini
approved these changes
Sep 18, 2026
Add `CommitData` and `CommitPatchFile` beside `RepositoryConfig`, and annotate `compare_commits`, `_format_commit` and `_patch_set` with them. The base signature stays `Sequence[Mapping[str, Any]]`, so no other provider changes. `Literal["A", "D", "M"]` matches `CommitFileChange.type`. Typing the timestamp also caught that `format_date` returns None for an empty date, which `set_commits` sorts on, so it would raise rather than store a null.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement
compare_commitsso releases built from Origin repositories includetheir commits, authors, and file changes.
Origin's comparison only returns a commit count, so ranges use
aheadByto fetchcommits from the head. The first release fetches the 20 most recent commits. This
is exact for linear history, but can miss commits when merging a long-lived branch.
Commit files require a separate 5-point call, so
cursor-origin-app.fetch-commits.max-compare-commitscaps the range at 500 commitsand logs when truncation occurs.
_paginatenow accepts alimitto avoid fetchingmore commits than needed.