2.8 KiB
2.8 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 04-reviewers-subscriptions | GitLab reviewers and notification subscriptions | done | 2 |
|
plan.md | ../../specs/integrations/requirements/gitlab-integration.md |
Task 04: GitLab Reviewers And Notification Subscriptions
Acceptance
- Project-member search returns active members with numeric IDs and reviewer
replacement sends
reviewer_ids, including an empty list to clear reviewers. - MR and issue subscription reads/writes call the correct GitLab resource and return live upstream state without creating or changing Kandev watches.
- PAT, glab, mock, and noop clients plus workspace-scoped HTTP routes share the contract and sanitize provider failures.
Verification
cd apps/backend && rtk go test -run 'Test.*(ProjectMembers|Reviewers|Subscription|Subscribe|Unsubscribe)' ./internal/gitlab/...
cd apps/backend && rtk go test ./internal/gitlab/...
Files Likely Touched
apps/backend/internal/gitlab/models.goapps/backend/internal/gitlab/client.goapps/backend/internal/gitlab/client_helpers.goapps/backend/internal/gitlab/client_helpers_test.goapps/backend/internal/gitlab/pat_client.goapps/backend/internal/gitlab/pat_client_actions.goapps/backend/internal/gitlab/pat_client_test.goapps/backend/internal/gitlab/glab_client.goapps/backend/internal/gitlab/glab_client_test.goapps/backend/internal/gitlab/mock_client.goapps/backend/internal/gitlab/mock_client_test.goapps/backend/internal/gitlab/noop_client.goapps/backend/internal/gitlab/noop_client_test.goapps/backend/internal/gitlab/service.goapps/backend/internal/gitlab/controller_member_subscriptions.go(new)apps/backend/internal/gitlab/controller_member_subscriptions_test.go(new)apps/backend/internal/gitlab/controller_watches.go
Dependencies
Task 01 provides workspace client selection. This task owns
controller_member_subscriptions.go; it must not edit Task 03's task-MR handler.
Inputs
- Spec: reviewer/subscription
What, Reviewers and notifications API, Permissions, action failure modes, and reviewer/subscription scenarios. - Existing GitLab patterns:
SetMRAssignees,SetMRLabels, PAT action helpers, andparseMRinclient_helpers.go. - Upstream contract: GitLab REST v4 project members, MR
reviewer_ids, and issue and MR subscribe/unsubscribe endpoints. - Constraint: notification subscription is upstream state only; do not add a SQLite table or reuse automation watch APIs.
Output Contract
Report client signatures, REST/glab commands, error mapping, numeric-ID model
changes, files changed, tests run, blockers, and GitLab-version compatibility
risks. Mark this task done and update plan.md after verification.