Offer "After review" in the Merge dialog while a review runs
This commit is contained in:
+22
-3
@@ -389,7 +389,10 @@ paths:
|
||||
merge it (queued if it is mid-turn), and the subtask closes as merged once its branch is in the parent's
|
||||
HEAD at the end of one of the parent's turns (merging_into_parent is set until then). Refused while the
|
||||
subtask's turn is running or it is already merging into its parent. Either target is refused while the
|
||||
task has active subtasks of its own.
|
||||
task has active subtasks of its own. With after_review, nothing starts yet: the request is recorded
|
||||
(merge_after_review is set) and made, as this caller and with this target, when the review of the
|
||||
task's latest snapshot finishes with no findings, that snapshot is still the latest and no turn is
|
||||
running; otherwise it is dropped with a transcript note. Refused (409) unless that review is running.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
@@ -404,9 +407,10 @@ paths:
|
||||
enum: [main, parent]
|
||||
x-enum-varnames: [MergeTargetMain, MergeTargetParent]
|
||||
description: "main (the default): squash onto the project's default branch. parent: merge into the parent task's branch; only for a subtask."
|
||||
after_review: { type: boolean, description: "Merge once the running review of the latest snapshot finishes with no findings, instead of now." }
|
||||
responses:
|
||||
"202":
|
||||
description: The merge was started or held.
|
||||
description: The merge was started, held, or set to start after the review.
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/Task" }
|
||||
@@ -414,6 +418,20 @@ paths:
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/merge-after-review:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
delete:
|
||||
operationId: cancelMergeAfterReview
|
||||
description: Withdraws a Merge with after_review that is still waiting for its review; nothing is merged.
|
||||
responses:
|
||||
"200":
|
||||
description: The request was withdrawn.
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/Task" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/merge-in:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
@@ -1029,7 +1047,7 @@ components:
|
||||
|
||||
Task:
|
||||
type: object
|
||||
required: [id, project_id, title, merge_title, branch, worktree_path, base_ref, port_base, color, status, created_by, created_at, state, merging, discarding, merging_into_parent, summary_seq]
|
||||
required: [id, project_id, title, merge_title, branch, worktree_path, base_ref, port_base, color, status, created_by, created_at, state, merging, discarding, merging_into_parent, merge_after_review, summary_seq]
|
||||
properties:
|
||||
id: { type: string }
|
||||
project_id: { type: string }
|
||||
@@ -1064,6 +1082,7 @@ components:
|
||||
discarding: { type: boolean, description: "Whether a Discard was started and the task isn't closed yet: its summary turn is waiting for the running turn, running, or done and the task is being removed." }
|
||||
parent_task_id: { type: string, description: "The task whose agent created this one as its subtask; absent for other tasks." }
|
||||
merging_into_parent: { type: boolean, description: "Whether a merge of this subtask into its parent was requested and the parent hasn't merged it yet." }
|
||||
merge_after_review: { type: boolean, description: "Whether a Merge with after_review is waiting for the running review of the latest snapshot to finish." }
|
||||
summary_seq: { type: integer, format: int64, description: "The seq of the task's latest turn.ended event with summary: true; 0 when it has none." }
|
||||
|
||||
Todo:
|
||||
|
||||
Reference in New Issue
Block a user