Skip to content

feat(cursor-origin): Track release commits - #124853

Merged
wedamija merged 2 commits into
masterfrom
danf/origin-release-commits
Sep 18, 2026
Merged

wedamija merged 2 commits into
masterfrom
danf/origin-release-commits

Conversation

@wedamija

Copy link
Copy Markdown
Member

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.

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.
@wedamija
wedamija requested review from a team as code owners September 17, 2026 22:41
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 17, 2026
Comment thread src/sentry/integrations/cursor_origin/repository.py Outdated
Comment thread src/sentry/options/defaults.py
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.
@wedamija
wedamija enabled auto-merge (squash) September 18, 2026 18:39
@wedamija
wedamija merged commit b21d799 into master Sep 18, 2026
88 checks passed
@wedamija
wedamija deleted the danf/origin-release-commits branch September 18, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants