Conversation
This change replaces all the local Pydantic model definitions in src/sentry/seer/code_review/models.py with imports from the sentry-seer-types package, using the new v1.code_review module path. Changes: - Add sentry-seer-types>=0.1.0 dependency to pyproject.toml - Replace ~170 lines of local model definitions with imports from sentry_seer_types.v1.code_review - Maintain backward compatibility via aliased imports - Use Pydantic v1 compatible models from sentry-seer-types Benefits: - Single source of truth for code review models shared with Seer - Eliminates duplicate model definitions - Ensures type consistency across Sentry and Seer Note: This depends on the restructured sentry-seer-types package with models under the code_review/ subdirectory. Co-authored-by: Cursor <cursoragent@cursor.com>
Updates imports from sentry-seer-types to use the new Seer-prefixed class names directly, removing the need for "import as" aliases. The sentry-seer-types package now exports models with their final names (e.g., SeerCodeReviewConfig, SeerCodeReviewRequestForPrReview) making the integration cleaner and more explicit. Co-authored-by: Cursor <cursoragent@cursor.com>
Adds imports for SeerCodeReviewRequestForPrClosed and SeerCodeReviewTaskRequestForPrClosed models that were being used in webhooks/task.py but were missing from the imports. These models are now available in sentry-seer-types v0.1.0. Changes: - Add SeerCodeReviewRequestForPrClosed to imports - Add SeerCodeReviewTaskRequestForPrClosed to imports - Update __all__ exports (alphabetically sorted) Co-authored-by: Cursor <cursoragent@cursor.com>
Removes CommentSeverity from imports as it was removed from sentry-seer-types (not used by Sentry's code_review module). Co-authored-by: Cursor <cursoragent@cursor.com>
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.
This is very WIP. We need craft to ship it.