feat: ask a teammate to review a ticket
«Pedir revisión» on a ticket asks a member (with an optional note): they
are notified and see it under «Te piden revisión» in my work until they
answer «Todo bien» or «Pedir cambios» (with what to change) from the
ticket's Revisiones box; whoever asked hears the answer and can withdraw
an open request. Events of the ticket (requested, answered, cancelled),
so they show in its history and the activity feed. Viewers can be asked
and answer; not oneself, nor twice the same person with one pending.
API: requestReview / answerReview / cancelReview, Issue.reviews,
myIssues(reviewing); POST /api/issues/{issue}/reviews,
POST …/reviews/{id}/answer, DELETE …/reviews/{id}. MCP: request_review,
answer_review, my_issues reviewing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
IssueLinkType,
|
||||
IssuePriority,
|
||||
IssueReadModel,
|
||||
ReviewVerdict,
|
||||
SYSTEM_ACTOR_ID,
|
||||
} from '@task-stream/api/tracker/domain';
|
||||
import { BulkChange, BulkResult, MAX_BULK } from './bulk-change';
|
||||
@@ -21,6 +22,11 @@ import {
|
||||
} from './commands/attach-file.command';
|
||||
import { DetachFileCommand } from './commands/detach-file.command';
|
||||
import { WatchIssueCommand } from './commands/watch-issue.command';
|
||||
import {
|
||||
AnswerReviewCommand,
|
||||
CancelReviewCommand,
|
||||
RequestReviewCommand,
|
||||
} from './commands/reviews';
|
||||
import { SetIssueParentCommand } from './commands/set-issue-parent.command';
|
||||
import { RankIssueCommand } from './commands/rank-issue.command';
|
||||
import { DeleteIssueCommand } from './commands/delete-issue.command';
|
||||
@@ -212,6 +218,41 @@ export class IssuesService {
|
||||
);
|
||||
}
|
||||
|
||||
/** Asks `reviewerId` (a member) to review the ticket. */
|
||||
requestReview(
|
||||
actorId: string,
|
||||
issueId: string,
|
||||
reviewerId: string,
|
||||
note: string | null,
|
||||
): Promise<CommandResult> {
|
||||
return this.commands.execute(
|
||||
new RequestReviewCommand(actorId, issueId, reviewerId, note),
|
||||
);
|
||||
}
|
||||
|
||||
/** The person asked answers: all good, or changes wanted. */
|
||||
answerReview(
|
||||
actorId: string,
|
||||
issueId: string,
|
||||
reviewId: string,
|
||||
verdict: ReviewVerdict,
|
||||
answer: string | null,
|
||||
): Promise<CommandResult> {
|
||||
return this.commands.execute(
|
||||
new AnswerReviewCommand(actorId, issueId, reviewId, verdict, answer),
|
||||
);
|
||||
}
|
||||
|
||||
cancelReview(
|
||||
actorId: string,
|
||||
issueId: string,
|
||||
reviewId: string,
|
||||
): Promise<CommandResult> {
|
||||
return this.commands.execute(
|
||||
new CancelReviewCommand(actorId, issueId, reviewId),
|
||||
);
|
||||
}
|
||||
|
||||
/** A ticket's file, with its bytes, for whoever can read the ticket. */
|
||||
download(
|
||||
viewerId: string | null,
|
||||
|
||||
Reference in New Issue
Block a user