feat(api): add contributor notifications REST routes + CLI mirror#6969
feat(api): add contributor notifications REST routes + CLI mirror#6969galuis116 wants to merge 1 commit into
Conversation
loopover_list_notifications and loopover_mark_notifications_read (src/mcp/server.ts) had no REST or CLI-accessible mirror, unlike the sibling contributor-profile/decision-pack routes which already follow the requireContributorAccess self-scoping pattern. Added GET /v1/contributors/:login/notifications and POST /v1/contributors/:login/notifications/read using that same auth helper, and registered two CLI subcommands (notifications, notifications-read) that resolve the login the same way contributor-profile does.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6969 +/- ##
==========================================
- Coverage 93.71% 93.71% -0.01%
==========================================
Files 686 686
Lines 68392 68407 +15
Branches 18730 18733 +3
==========================================
+ Hits 64093 64106 +13
Misses 3302 3302
- Partials 997 999 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-17 16:40:59 UTC
Review summary Nits — 5 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
loopover_list_notificationsandloopover_mark_notifications_read(MCP tools insrc/mcp/server.ts) had no REST or CLI-accessible mirror.src/api/routes.tshad no contributor-facing notification-feed route -- only/v1/app/notification-model(a static describe-the-model endpoint) and the unrelated/v1/app/digest/subscriptions.GET /v1/contributors/:login/notificationsandPOST /v1/contributors/:login/notifications/readinsrc/api/routes.ts, reusingrequireContributorAccessexactly as/v1/contributors/:login/profileand/decision-packalready do, and calling the samelistNotificationDeliveriesForRecipient/buildNotificationFeed/markNotificationDeliveriesReadfunctions the MCP tools use so the two surfaces can never drift.loopover-mcp notificationsandloopover-mcp notifications-read, following the same login-resolution precedent ascontributor-profile(--login/ active session /LOOPOVER_LOGIN/GITHUB_LOGIN).notifications-readaccepts repeated--id <id>flags to clear specific notifications, or clears everything when omitted.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6745
Validation
git diff --checknpm run actionlint(no workflow changes in this PR)npm run typechecknpm run test:coveragelocally (targeted: the newroutes-notifications.test.ts(8 tests) andmcp-cli-notifications.test.ts(6 tests), plus the existingmcp-notifications.test.tsandmcp-cli-completion-spec.test.ts, all pass -- 79 tests total across the touched files)npm run test:workers(not applicable to this change)npm run build:mcp(not applicable to this change)npm run test:mcp-pack(not applicable to this change)npm run ui:openapi:check(this route is not part of the curated public OpenAPI surface, same as its siblingopen-pr-monitor/decision-packcontributor routes)npm run ui:lint(no UI changes in this PR)npm run ui:typecheck(no UI changes in this PR)npm run ui:build(no UI changes in this PR)npm audit --audit-level=moderate(no dependency changes in this PR)If any required check was skipped, explain why:
npm run docs:drift-check,npm run manifest:drift-check, andnpm run command-reference:checkwere also run locally and pass.Safety
forbidden_contributor), and a successful self-scoped read/mark-read.UI Evidencesection below with JPG/JPEG or PNG screenshots. (N/A -- this PR has no UI/visual surface; it adds backend REST routes + a CLI mirror only.)Notes