Skip to content

Commit 102877c

Browse files
committed
feat(scm-multi-platform-detection): Iterating
1 parent f1e0f6f commit 102877c

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/sentry/integrations/api/endpoints/organization_repository_platforms_test.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@
2525
class OrganizationRepositoryPlatformsTestEndpoint(OrganizationRepositoryEndpoint):
2626
"""Endpoint for the tree-based multi-platform detector.
2727
28-
Runs ``detect_platforms_multi`` (which also emits metrics under
29-
``onboarding-scm.platform_detection.multi.*`` internally) and returns the
30-
detected platforms as ``{"platforms": [...]}``. An empty / unprocessable
31-
repo returns ``{"platforms": []}``; GitHub/API failures return a 502.
28+
Will replace the existing `OrganizationRepositoryPlatformsEndpoint`.
3229
"""
3330

3431
owner = ApiOwner.INTEGRATION_PLATFORM
@@ -72,8 +69,7 @@ def get(self, request: Request, organization: Organization, repo: Repository) ->
7269
try:
7370
result = detect_platforms_multi(client, repo.name)
7471
except ApiConflictError:
75-
# Empty / unprocessable repo (e.g. empty git tree). Benign: the FE
76-
# falls back to the manual picker on []. Still capture for visibility.
72+
# Empty / unprocessable repo (e.g. empty git tree).
7773
sentry_logger.warning(
7874
"github.platform_detection.multi.empty_repo", attributes=attributes
7975
)
@@ -82,8 +78,6 @@ def get(self, request: Request, organization: Organization, repo: Repository) ->
8278
sentry_sdk.capture_exception()
8379
return Response({"platforms": []})
8480
except (ApiError, ValueError):
85-
# The structured log is the searchable record; capture_exception files
86-
# the Sentry issue with the original error + stacktrace.
8781
sentry_logger.error("github.platform_detection.multi.failed", attributes=attributes)
8882
with sentry_sdk.new_scope() as scope:
8983
scope.set_tag("scm_platform_detection", "failed")

0 commit comments

Comments
 (0)