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:
@@ -3341,6 +3341,348 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/issues/{issue}/reviews": {
|
||||
"post": {
|
||||
"description": "Whoever can change the ticket asks; the reviewer is told and sees it in GET /api/me/issues?reviewing=true until they answer.",
|
||||
"operationId": "IssuesController_requestReview",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "issue",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"description": "Ticket id or key",
|
||||
"schema": {
|
||||
"example": "WEB-12",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RequestReviewDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CommandResultDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid input",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Missing or rejected Pireon token",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not a member of the project (or not allowed)",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Someone changed it at the same time: retry",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Business rule (e.g. a transition the workflow forbids)",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"pireon-oauth": []
|
||||
},
|
||||
{
|
||||
"pireon": []
|
||||
}
|
||||
],
|
||||
"summary": "Ask a member to review the ticket",
|
||||
"tags": [
|
||||
"Issues"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/issues/{issue}/reviews/{review}/answer": {
|
||||
"post": {
|
||||
"operationId": "IssuesController_answerReview",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "issue",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"description": "Ticket id or key",
|
||||
"schema": {
|
||||
"example": "WEB-12",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "review",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/AnswerReviewDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CommandResultDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid input",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Missing or rejected Pireon token",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not a member of the project (or not allowed)",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Someone changed it at the same time: retry",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Business rule (e.g. a transition the workflow forbids)",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"pireon-oauth": []
|
||||
},
|
||||
{
|
||||
"pireon": []
|
||||
}
|
||||
],
|
||||
"summary": "Answer a review I was asked for (all good, or changes)",
|
||||
"tags": [
|
||||
"Issues"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/issues/{issue}/reviews/{review}": {
|
||||
"delete": {
|
||||
"operationId": "IssuesController_cancelReview",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "issue",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"description": "Ticket id or key",
|
||||
"schema": {
|
||||
"example": "WEB-12",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "review",
|
||||
"required": true,
|
||||
"in": "path",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CommandResultDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid input",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Missing or rejected Pireon token",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Not a member of the project (or not allowed)",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"409": {
|
||||
"description": "Someone changed it at the same time: retry",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Business rule (e.g. a transition the workflow forbids)",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiErrorDto"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"pireon-oauth": []
|
||||
},
|
||||
{
|
||||
"pireon": []
|
||||
}
|
||||
],
|
||||
"summary": "Withdraw a review request I made",
|
||||
"tags": [
|
||||
"Issues"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/issues/{issue}/follow-tree": {
|
||||
"put": {
|
||||
"description": "Told of its changes and of every ticket hanging from it, at any depth, also the ones added later. Private to me.",
|
||||
@@ -3774,6 +4116,15 @@
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reviewing",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Only the tickets I was asked to review and have not answered",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"required": false,
|
||||
@@ -14605,6 +14956,65 @@
|
||||
"commentId"
|
||||
]
|
||||
},
|
||||
"ReviewVerdict": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"APPROVED",
|
||||
"CHANGES"
|
||||
],
|
||||
"description": "Null while waiting for an answer"
|
||||
},
|
||||
"IssueReviewDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"requester": {
|
||||
"$ref": "#/components/schemas/UserRefDto"
|
||||
},
|
||||
"reviewer": {
|
||||
"$ref": "#/components/schemas/UserRefDto"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"requestedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"verdict": {
|
||||
"nullable": true,
|
||||
"description": "Null while waiting for an answer",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ReviewVerdict"
|
||||
}
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"answeredAt": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"requester",
|
||||
"reviewer",
|
||||
"note",
|
||||
"requestedAt",
|
||||
"verdict",
|
||||
"answer",
|
||||
"answeredAt"
|
||||
]
|
||||
},
|
||||
"IssueParentDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -14880,6 +15290,13 @@
|
||||
"$ref": "#/components/schemas/UserRefDto"
|
||||
}
|
||||
},
|
||||
"reviews": {
|
||||
"description": "Reviews asked, open and answered, oldest first",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/IssueReviewDto"
|
||||
}
|
||||
},
|
||||
"parent": {
|
||||
"nullable": true,
|
||||
"description": "The epic or ticket this one breaks down",
|
||||
@@ -14971,6 +15388,7 @@
|
||||
"links",
|
||||
"attachments",
|
||||
"watchers",
|
||||
"reviews",
|
||||
"parent",
|
||||
"blockedBy",
|
||||
"votes",
|
||||
@@ -16724,6 +17142,42 @@
|
||||
"at"
|
||||
]
|
||||
},
|
||||
"RequestReviewDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"reviewer": {
|
||||
"type": "string",
|
||||
"description": "Reviewer's user id (a member of the project)"
|
||||
},
|
||||
"note": {
|
||||
"type": "string",
|
||||
"maxLength": 1000,
|
||||
"description": "What to look at"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"reviewer"
|
||||
]
|
||||
},
|
||||
"AnswerReviewDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"verdict": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ReviewVerdict"
|
||||
}
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"maxLength": 1000
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"verdict"
|
||||
]
|
||||
},
|
||||
"IssuePageDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -17986,7 +18440,9 @@
|
||||
"PROPOSED",
|
||||
"WATCHED",
|
||||
"ADDED_TO_PROJECT",
|
||||
"REMINDER"
|
||||
"REMINDER",
|
||||
"REVIEW_REQUESTED",
|
||||
"REVIEW_ANSWERED"
|
||||
]
|
||||
},
|
||||
"NotificationDto": {
|
||||
|
||||
@@ -725,6 +725,9 @@ type Issue {
|
||||
rank: String!
|
||||
release: ReleaseRef
|
||||
reporter: UserRef!
|
||||
|
||||
"""Reviews asked, open and answered, oldest first"""
|
||||
reviews: [IssueReview!]!
|
||||
sprint: SprintRef
|
||||
|
||||
"""When work should start (roadmap)"""
|
||||
@@ -855,6 +858,20 @@ type IssueReminder {
|
||||
note: String
|
||||
}
|
||||
|
||||
"""A review someone asked on the ticket"""
|
||||
type IssueReview {
|
||||
answer: String
|
||||
answeredAt: String
|
||||
id: ID!
|
||||
note: String
|
||||
requestedAt: String!
|
||||
requester: UserRef!
|
||||
reviewer: UserRef!
|
||||
|
||||
"""Null while waiting for an answer"""
|
||||
verdict: ReviewVerdict
|
||||
}
|
||||
|
||||
"""RECENT: last updated first. RANK: backlog order."""
|
||||
enum IssueSort {
|
||||
RANK
|
||||
@@ -960,6 +977,9 @@ type Mutation {
|
||||
"""Add tickets to «Mi día» (10 at most)"""
|
||||
addToMyDay(day: String!, issueIds: [ID!]!): Boolean!
|
||||
|
||||
"""Answer a review I was asked for: all good, or changes"""
|
||||
answerReview(answer: String, issueId: ID!, reviewId: ID!, verdict: ReviewVerdict!): CommandResult!
|
||||
|
||||
"""
|
||||
Archive the project (owner only): everything stays readable, nothing changes until it is unarchived
|
||||
"""
|
||||
@@ -980,6 +1000,9 @@ type Mutation {
|
||||
"""
|
||||
bulkUpdateIssues(input: BulkUpdateIssuesInput!): BulkResult!
|
||||
|
||||
"""Withdraw a review request I made (or, as admin, any)"""
|
||||
cancelReview(issueId: ID!, reviewId: ID!): CommandResult!
|
||||
|
||||
"""Move a ticket through the workflow (incl. QA)"""
|
||||
changeIssueStatus(input: ChangeIssueStatusInput!): CommandResult!
|
||||
changeProjectMemberRole(input: ProjectMemberInput!): CommandResult!
|
||||
@@ -1083,6 +1106,11 @@ type Mutation {
|
||||
removeGitRepository(projectId: ID!, repositoryId: ID!): Boolean!
|
||||
removeProjectMember(projectId: ID!, userId: ID!): CommandResult!
|
||||
|
||||
"""
|
||||
Ask a member to review a ticket (with an optional note): they are told and see it in their work
|
||||
"""
|
||||
requestReview(issueId: ID!, note: String, reviewerId: ID!): CommandResult!
|
||||
|
||||
"""
|
||||
Settle a conversation (a top-level comment and its replies) or reopen it (resolved: false). A conclusion is added as a reply marked as a decision. Whoever can change the ticket
|
||||
"""
|
||||
@@ -1311,6 +1339,8 @@ enum NotificationKind {
|
||||
QA_FAILED
|
||||
REMINDER
|
||||
REPLIED
|
||||
REVIEW_ANSWERED
|
||||
REVIEW_REQUESTED
|
||||
STATUS_CHANGED
|
||||
WATCHED
|
||||
}
|
||||
@@ -1679,6 +1709,9 @@ type Query {
|
||||
"""Only these of my projects"""
|
||||
projectIds: [ID!]
|
||||
|
||||
"""Only the tickets I was asked to review (unanswered)"""
|
||||
reviewing: Boolean! = false
|
||||
|
||||
"""Matches key, title or description (global search)"""
|
||||
search: String
|
||||
statuses: [String!]
|
||||
@@ -1841,6 +1874,12 @@ type ReminderOnIssue {
|
||||
reminder: IssueReminder!
|
||||
}
|
||||
|
||||
"""APPROVED: all good. CHANGES: something to change"""
|
||||
enum ReviewVerdict {
|
||||
APPROVED
|
||||
CHANGES
|
||||
}
|
||||
|
||||
"""Tickets to look at now (worst first)"""
|
||||
type Risks {
|
||||
blocked: [InsightIssue!]!
|
||||
|
||||
Reference in New Issue
Block a user