feat(cursor-origin): Track pull requests - #125143
Merged
Merged
Conversation
Handle Origin's pull request lifecycle events and upsert `PullRequest` through `update_pull_request_from_scm_snapshot`, shared with GitHub and GitLab. Since each event includes the full pull request, the same handler covers creation, reopening, closing, merging, and metadata updates. Origin's pull request IDs are prefixed strings, while `PullRequest.external_id` is an integer, so the ID is not stored. Move commit author creation into a shared helper so pushes and pull requests use the same email limit.
wedamija
force-pushed
the
danf/origin-track-pull-requests
branch
from
September 21, 2026 23:16
cd04418 to
2936391
Compare
giovanni-guidini
approved these changes
Sep 22, 2026
| display_name: str = Field(default="", alias="displayName") | ||
|
|
||
|
|
||
| class PullRequestAuthor(OriginModel): |
Contributor
There was a problem hiding this comment.
Is there a way to detect if it's a user, app or service account? Like a "type" field or something?
Member
Author
There was a problem hiding this comment.
There's no type field explicitly, but the response does have author.user, author.app, author.serviceAccount to differentiate.
Modifying this to include these options in the author too
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.
Handle Origin's pull request lifecycle events and upsert
PullRequestthroughupdate_pull_request_from_scm_snapshot, shared with GitHub and GitLab. Since each eventincludes the full pull request, the same handler covers creation, reopening, closing,
merging, and metadata updates.
Origin's pull request IDs are prefixed strings, while
PullRequest.external_idis aninteger, so the ID is not stored.
Move commit author creation into a shared helper so pushes and pull requests use the
same email limit.