feat(#5994): add status_notifications support to per-repo config - #5997
Conversation
perRepoConfig gains a StatusNotifications() accessor (backed by a new Notifications field, following the same overlay -> base -> code-defaults fallback chain used by other per-repo settings) so per-repo installs can enable comment start/completion notifications the same way org installs can. StatusNotifications() moves to the shared ConfigReader interface since both config modes now implement it, which lets setupStatusNotifier in run.go read it directly instead of type-asserting to OrgConfigReader. repos migrate now carries status_notifications over into the generated per-repo config.yaml instead of warning that it has no per-repo equivalent. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
PR Summary by QodoAdd status_notifications to per-repo config and migrate carry-over
AI Description
Diagram
High-Level Assessment
Files changed (11)
|
Code Review by Qodo
1.
|
waynesun09
left a comment
There was a problem hiding this comment.
Review finding
MEDIUM — Per-field merge-rules reference doc not updated for new status_notifications field
docs/guides/infrastructure/layered-config-reference.md is the authoritative reference for how each per-repo config field resolves through the overlay -> base -> code-defaults chain (ADR 0069 Decision 2). It has an explicit "Per-field merge rules" table (around line 67-81, listing version, runtime, kill_switch, roles, agents, allowed_remote_resources, forge, create_issues) and a matching "Code defaults reference" table (around line 221-235), plus a dedicated subsection for create_issues (around line 211).
Verified on PR head dc3a6da9 that neither table nor any subsection mentions status_notifications, even though this PR adds a Notifications *StatusNotificationConfig field to perRepoConfig (internal/config/config.go) with exactly the replace-whole-object-if-set / fallback-to-parent semantics already documented for create_issues. Readers relying on this doc (cross-linked from docs/architecture.md and docs/problems/governance.md) won't know the field exists or how it merges. Note: this file isn't touched by this PR's diff, so it can't be commented on inline.
Suggestion: add a status_notifications row to the "Per-field merge rules" table (merge rule: "Replace whole object if set", same pattern as create_issues) and to the "Code defaults reference" table (default nil), and optionally a short subsection describing the scalar-override-per-object semantics, consistent with how create_issues is documented.
|
Re: #5997 (comment) On the getting-started/ placement flag — I think this one's a false positive. The ADR-0023 revision from 2026-05 split the old The numbered-steps point is worth thinking through separately — following up on that in the review thread on line 182 instead. |
…rence waynesun09 pointed out the layered-config-reference.md merge-rules table and code-defaults table didn't cover the new status_notifications field. Adds it with replace-whole-object-if-set semantics, matching create_issues. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 3:12 PM UTC · Completed 3:43 PM UTC Commit: |
|
Re: #5997 (review) Good catch. Pushed e12f7ae — added |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Previous runReviewFindingsLow
Labels: PR adds status_notifications support to per-repo config (installation/config domain), matching issue #5994 labels |
…-status-notifications
Sync with main to pick up the docs/ VitePress restructuring (root-level
`docs:build` npm script and updated `.github/workflows/site-build.yml`).
This branch predated that refactor, so the "build" CI check was using a
workflow definition (read from the PR merge ref) that referenced
`npm run docs:build`, while the checked-out PR head still had the old
`website/`-based package.json lacking that script, causing:
npm error Missing script: "docs:build"
Merging main resolves the drift with no conflicts.
Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Review · Commit: |
Site previewPreview: https://d7d374c1-site.fullsend-ai.workers.dev Commit: |
Drop the reference to a "reaction" field from the StatusNotificationsReader doc comment -- StatusNotificationConfig only has a Comment field today. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 4:21 PM UTC · Completed 4:37 PM UTC Commit: |
waynesun09
left a comment
There was a problem hiding this comment.
Approving — no findings from this round's review squad, all prior threads resolved, CI green.
|
🤖 Finished Retro · ✅ Success · Started 6:51 PM UTC · Completed 7:10 PM UTC Commit: |
Retro: PR #5997 —
|
…ction support Add SetStatusNotifications to ConfigWriter interface so the behaviourtest fixture/config builder can enable reaction notifications when generating per-repo test installs. This closes the remaining gap identified in the review: the perRepoConfig schema already supports status_notifications (since dc3a6da/#5997), but the behaviourtest harness had no setter to exercise it. - ConfigWriter.SetStatusNotifications(*StatusNotificationConfig) on both orgConfig and perRepoConfig - forge.Client.ListIssueReactions for asserting reactions in e2e tests, implemented on GitHub LiveClient, FakeClient, and GitLab (ErrNotSupported) - forge.Reaction type for the list return value - scm.Driver.ListIssueReactions for behaviourtest assertions - Reaction step definitions: "status notification reactions are enabled", "the issue has a <content> reaction", cleanup in CleanupScenario - reaction-notifications.feature exercising triage with reactions enabled Addresses review feedback on #5957
…ction support Add SetStatusNotifications to ConfigWriter interface so the behaviourtest fixture/config builder can enable reaction notifications when generating per-repo test installs. This closes the remaining gap identified in the review: the perRepoConfig schema already supports status_notifications (since dc3a6da/#5997), but the behaviourtest harness had no setter to exercise it. - ConfigWriter.SetStatusNotifications(*StatusNotificationConfig) on both orgConfig and perRepoConfig - forge.Client.ListIssueReactions for asserting reactions in e2e tests, implemented on GitHub LiveClient, FakeClient, and GitLab (ErrNotSupported) - forge.Reaction type for the list return value - scm.Driver.ListIssueReactions for behaviourtest assertions - Reaction step definitions: "status notification reactions are enabled", "the issue has a <content> reaction", cleanup in CleanupScenario - reaction-notifications.feature exercising triage with reactions enabled Addresses review feedback on #5957
…ction support Add SetStatusNotifications to ConfigWriter interface so the behaviourtest fixture/config builder can enable reaction notifications when generating per-repo test installs. This closes the remaining gap identified in the review: the perRepoConfig schema already supports status_notifications (since dc3a6da/#5997), but the behaviourtest harness had no setter to exercise it. - ConfigWriter.SetStatusNotifications(*StatusNotificationConfig) on both orgConfig and perRepoConfig - forge.Client.ListIssueReactions for asserting reactions in e2e tests, implemented on GitHub LiveClient, FakeClient, and GitLab (ErrNotSupported) - forge.Reaction type for the list return value - scm.Driver.ListIssueReactions for behaviourtest assertions - Reaction step definitions: "status notification reactions are enabled", "the issue has a <content> reaction", cleanup in CleanupScenario - reaction-notifications.feature exercising triage with reactions enabled Addresses review feedback on #5957
…ction support Add SetStatusNotifications to ConfigWriter interface so the behaviourtest fixture/config builder can enable reaction notifications when generating per-repo test installs. This closes the remaining gap identified in the review: the perRepoConfig schema already supports status_notifications (since dc3a6da/#5997), but the behaviourtest harness had no setter to exercise it. - ConfigWriter.SetStatusNotifications(*StatusNotificationConfig) on both orgConfig and perRepoConfig - forge.Client.ListIssueReactions for asserting reactions in e2e tests, implemented on GitHub LiveClient, FakeClient, and GitLab (ErrNotSupported) - forge.Reaction type for the list return value - scm.Driver.ListIssueReactions for behaviourtest assertions - Reaction step definitions: "status notification reactions are enabled", "the issue has a <content> reaction", cleanup in CleanupScenario - reaction-notifications.feature exercising triage with reactions enabled Addresses review feedback on #5957
Fixes #5994
Summary
perRepoConfiggets aStatusNotifications()accessor (backed by anew
Notificationsfield) following the same overlay -> base ->code-defaults fallback chain used by other per-repo settings
(
ConfigRoles,ConfigRuntime, etc).StatusNotifications()moves fromOrgConfigReaderto the sharedConfigReaderinterface, since both config modes now implement it.setupStatusNotifierininternal/cli/run.goreads it directlyinstead of type-asserting to
OrgConfigReader.repos migratenow carriesstatus_notificationsover into thegenerated per-repo
config.yamlinstead of warning that it has noper-repo equivalent (per-repos migrate does not carry over org config fields or register repos in mint #5822 context in the issue).
docs/cli/repos.mdconfig carry-over table, anddocs/guides/getting-started/operations.mdshows the per-repo(top-level) vs per-org (nested under
defaults) shapes.This unblocks #5957, which needs per-repo installs to be able to
enable reactions so the
pkg/behaviourteste2e harness (per-repo-only)can exercise the reaction feature.
Test plan
go build ./...go vet ./...gofmt -lcleanmake lintgo test ./internal/config/... ./internal/repos/... ./internal/cli/...— all greenround-trip, fallback-to-parent semantics, org-to-per-repo
carry-over (with deep-copy aliasing check), migrate carry-over
(asserted against generated config.yaml content), setupStatusNotifier
against a per-repo-shaped config.yaml
Assisted-by: Claude Opus 4.6 noreply@anthropic.com