feat(notifications): customizable comment-notification recipients#94
Merged
Conversation
Add a code extension seam so a company can replace who is notified about doc comments (e.g. a maintainers user-list instead of all members of the owning group), with today's behavior preserved as the default. - CommentRecipientResolver interface: resolveRecipients(activity) => string[] ([] = notify nobody; no null sentinel). - rwCommentRecipientExtensionPoint: module-owned extension point with a single setRecipientResolver (throws on double-registration), mirroring Backstage's own setNotificationRecipientResolver. A sibling pluginId:"rw" module registers a resolver; the notifications module reads it in its own init. - DefaultCommentRecipientResolver (exported): the prior policy (new thread => section owner; reply/resolve => participants); custom resolvers delegate to it for audiences they don't override. - CommentNotifier delegates recipient selection to the resolver and is fail-closed: if the resolver throws, the notification is discarded and logged rather than falling back to the broader default audience. Coalescing scope and topic stay tied to the activity kind, not the recipients. - Re-document CommentActivity.sectionOwnerRef as a neutral fact (rw-node). - README: 'Customizing who gets notified' section with a worked example. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
What
Adds a code extension seam so a company can replace who is notified about doc comments (e.g. notify a maintainers user-list instead of all members of the owning group), with today's behavior preserved as the default.
How
CommentRecipientResolver—resolveRecipients(activity) => Promise<string[]>([]= notify nobody; no null sentinel).rwCommentRecipientExtensionPoint— a module-owned extension point with a singlesetRecipientResolver(throws on double-registration), mirroring Backstage's ownsetNotificationRecipientResolver. A siblingpluginId: "rw"module registers a resolver; the notifications module reads it in its owninit(the framework orders the sibling first).DefaultCommentRecipientResolver(exported) — the prior policy (new thread → section owner; reply/resolve → participants). Custom resolvers delegate to it for audiences they don't override.CommentNotifierdelegates recipient selection to the resolver and is fail-closed: if a resolver throws, the notification is discarded and logged rather than falling back to the broader default audience. Coalescingscopeandtopicstay tied to the activity kind, not the recipients.CommentActivity.sectionOwnerRefas a neutral fact (rw-node, doc-only).Notes
startTestBackendintegration tests proving the override and double-register-throws); typecheck/lint/format clean across all workspaces.🤖 Generated with Claude Code