Drop workflow kinds, deliver reviews when done, rename/delete workflows

This commit is contained in:
Ian Gulliver
2026-10-20 20:09:38 -07:00
parent 51df9adf61
commit 35f59246f7
17 changed files with 671 additions and 531 deletions
+11 -14
View File
@@ -1226,7 +1226,10 @@ paths:
operationId: putWorkflow
description: >
Creates or replaces the workflow from its file, a WorkflowDefinition as YAML or JSON. The name is one line of
1 to 100 characters. Tasks that already froze the workflow keep their copy.
1 to 100 characters. Tasks that already froze the workflow keep their copy. With from, it renames workflow
from to name, which must not be taken, and projects that review with from review with name instead.
parameters:
- { name: from, in: query, required: false, schema: { type: string } }
requestBody:
required: true
content:
@@ -1241,6 +1244,8 @@ paths:
application/json:
schema: { $ref: "#/components/schemas/WorkflowSummary" }
"400": { $ref: "#/components/responses/Error" }
"404": { $ref: "#/components/responses/Error" }
"409": { $ref: "#/components/responses/Error" }
delete:
operationId: deleteWorkflow
responses:
@@ -1325,7 +1330,7 @@ components:
type: object
required: [workflow]
properties:
workflow: { type: string, description: "A saved workflow of kind review, or empty for no reviews." }
workflow: { type: string, description: "A saved workflow, or empty for no reviews." }
ProjectCreate:
type: object
@@ -1443,28 +1448,20 @@ components:
WorkflowSummary:
type: object
required: [name, description, kind]
required: [name, description]
properties:
name: { type: string }
description: { type: string }
kind: { type: string, enum: [task, review] }
WorkflowDefinition:
type: object
description: >
A workflow's file, which holds everything but its name: its steps, run in order. Each stage runs as its own
task once the steps before it have finished. Sent and returned as YAML.
A workflow's file, which holds everything but its name: its steps, run in order. Run on a brief, each stage
runs as its own task once the steps before it have finished; as a project's review workflow, each stage is a
reviewer of a snapshot and gets the earlier stages' reviews. Sent and returned as YAML.
required: [steps]
properties:
description: { type: string, x-go-type-skip-optional-pointer: true }
kind:
type: string
enum: [task, review]
x-enum-varnames: [WorkflowKindTask, WorkflowKindReview]
x-go-type-skip-optional-pointer: true
description: >
task (the default): each stage runs as its own task. review: each stage is a reviewer of a snapshot, run
when a project names the workflow as its review workflow; a stage gets the earlier stages' reviews.
steps:
type: array
minItems: 1