Conversation
…ingIntegration class
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
nhopeatall
approved these changes
Mar 24, 2026
Collaborator
nhopeatall
left a comment
There was a problem hiding this comment.
Summary
LGTM — Clean implementation that correctly follows the established IntegrationModule pattern. The SentryAlertingIntegration class mirrors the structure of GitHubSCMIntegration, the withCredentials env-scoping pattern matches existing usage in ackMessageGenerator.ts and squintDb.ts, and the bootstrap registration uses the same guard pattern. Tests are thorough with good edge-case coverage. All CI checks pass.
Minor Design Observation
- src/integrations/alerting.ts:29 — The
getConfig()return type is coupled toSentryIntegrationConfig, which makes this interface Sentry-specific rather than a true generic alerting abstraction. Compare withSCMIntegrationwhich avoids GitHub-specific types entirely. Not blocking — this can be generalized when/if a second alerting provider is added — but worth noting for future extensibility.
🕵️ claude-code · claude-opus-4-6 · run details
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.
Summary
AlertingIntegrationinterface insrc/integrations/alerting.tsextendingIntegrationModulewithcategory: 'alerting'andgetConfig()methodSentryAlertingIntegrationclass insrc/sentry/alerting-integration.tsimplementing the new interfaceSentryAlertingIntegrationin the unifiedintegrationRegistryviasrc/pm/bootstrap.tsAlertingIntegrationfromsrc/integrations/index.tshasAlertingIntegration()andgetSentryIntegrationConfig()functions remain unchangedDetails
AlertingIntegrationinterface (src/integrations/alerting.ts)Extends
IntegrationModulewith:readonly category: 'alerting'— narrowed type for type-safe filteringgetConfig(projectId): Promise<SentryIntegrationConfig | null>— retrieves alerting provider configSentryAlertingIntegrationclass (src/sentry/alerting-integration.ts)type = 'sentry',category = 'alerting'hasIntegration()— delegates to existinghasAlertingIntegration()logicgetConfig()— delegates to existinggetSentryIntegrationConfig()logicwithCredentials()— resolvesSENTRY_API_TOKENviagetIntegrationCredential(projectId, 'alerting', 'api_token')and scopes it inprocess.envfor the callback duration (following the same env-scoping pattern used byackMessageGenerator.tsandsquintDb.ts)Registration
SentryAlertingIntegrationis registered insrc/pm/bootstrap.tsalongside the existing PM and SCM integrations, using the same guard pattern (getOrNullcheck before registering).Test plan
tests/unit/sentry/alerting-integration.test.tscover: metadata,hasIntegration,getConfig,withCredentials(token scoping, restore, error propagation)Closes https://trello.com/c/mfdkkSWv/546-as-a-developer-i-want-alertingintegration-and-sentryalertingintegration-so-that-sentry-follows-the-unified-integration-pattern
🤖 Generated with Claude Code
🕵️ claude-code · claude-sonnet-4-6 · run details