Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/sentry/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@
ProjectRuleGroupHistoryIndexEndpoint,
)
from sentry.rules.history.endpoints.project_rule_stats import ProjectRuleStatsIndexEndpoint
from sentry.seer.code_review.endpoints.code_review_local import OrganizationCodeReviewLocalEndpoint
from sentry.seer.endpoints.group_ai_autofix import GroupAutofixEndpoint
from sentry.seer.endpoints.group_ai_summary import GroupAiSummaryEndpoint
from sentry.seer.endpoints.group_autofix_setup_check import GroupAutofixSetupCheck
Expand Down Expand Up @@ -2398,6 +2399,11 @@ def create_group_urls(name_prefix: str) -> list[URLPattern | URLResolver]:
OrganizationAutofixAutomationSettingsEndpoint.as_view(),
name="sentry-api-0-organization-autofix-automation-settings",
),
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/code-review/local-review/$",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be /internal endpoint?

OrganizationCodeReviewLocalEndpoint.as_view(),
name="sentry-api-0-organization-code-review-local",
),
re_path(
r"^(?P<organization_id_or_slug>[^/]+)/seer-rpc/(?P<method_name>\w+)/$",
OrganizationSeerRpcEndpoint.as_view(),
Expand Down
7 changes: 7 additions & 0 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2855,6 +2855,13 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
# For encrypting the access token for the GHE integration
SEER_GHE_ENCRYPT_KEY: str | None = os.getenv("SEER_GHE_ENCRYPT_KEY")

# Code Review Local (sentry-cli review command)
CODE_REVIEW_LOCAL_ENABLED = True
CODE_REVIEW_LOCAL_TIMEOUT = 600 # 10 minutes in seconds
CODE_REVIEW_LOCAL_POLL_INTERVAL = 2 # seconds between Seer polls
CODE_REVIEW_LOCAL_USER_RATE_LIMIT = (10, 3600) # 10 per hour
CODE_REVIEW_LOCAL_ORG_RATE_LIMIT = (100, 3600) # 100 per hour

# Used to validate RPC requests from the Overwatch service
OVERWATCH_RPC_SHARED_SECRET: list[str] | None = None
if (val := os.environ.get("OVERWATCH_RPC_SHARED_SECRET")) is not None:
Expand Down
2 changes: 2 additions & 0 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:detailed-data-for-seer", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
# Enable GenAI features such as Autofix and Issue Summary
manager.add("organizations:autofix-seer-preferences", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable local code review for sentry-cli review command
manager.add("organizations:code-review-local", OrganizationFeature, FeatureHandlerStrategy.INTERNAL, api_expose=False, default=False)
# Enables Route Preloading
manager.add("organizations:route-intent-preloading", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable Prevent AI code review to run per commit
Expand Down
Loading
Loading