Conversation
The overwatch-request endpoint handles both PR code review requests and PR closed cases. This commit removes the old shared pydantic models (SeerCodeReviewBaseRequest, SeerCodeReviewRequest, and SeerCodeReviewTaskRequest) in favor of specific models for each use case: - SeerCodeReviewRequestForPrReview / SeerCodeReviewTaskRequestForPrReview - SeerCodeReviewRequestForPrClosed / SeerCodeReviewTaskRequestForPrClosed This separation ensures proper validation of required fields (e.g., organization_id and integration_id are required for PR closed but optional for PR review). Also updated docstrings to reflect the current model names and remove references to old shared models. Fixes CW-838 Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| # ============================================================================= | ||
|
|
||
|
|
||
| class SeerCodeReviewBaseRequest(BaseModel): |
There was a problem hiding this comment.
Unused import after removing its only consumer
Low Severity
The SeerRepoDefinition import from sentry.seer.models is now unused. It was previously consumed by the removed SeerCodeReviewBaseRequest class (which used it as the type for repo and more_readable_repos). After this PR removes that class, the only remaining reference is inside a comment string on line 79. This is dead code left behind by the model cleanup.
- Remove unused SeerRepoDefinition import (identified by Bugbot) - Fix whitespace in docstring (ruff W293) Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>


Separates Pydantic models for the
overwatch-requestendpoint to distinguish between PR code review requests and PR closed cases.This change addresses CW-838 by:
SeerCodeReviewBaseRequest,SeerCodeReviewRequest,SeerCodeReviewTaskRequest).SeerCodeReviewRequestForPrReview,SeerCodeReviewRequestForPrClosed,SeerCodeReviewTaskRequestForPrReview,SeerCodeReviewTaskRequestForPrClosed).This ensures correct field validation, such as enforcing
organization_idandintegration_idas required for PR closed requests while keeping them optional for PR review requests, aligning with business logic for metrics and dashboarding.Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Linear Issue: CW-838