Add background audits of the default branch's newest commit
This commit is contained in:
+28
-5
@@ -249,7 +249,27 @@ paths:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/ReviewWorkflow" }
|
||||
schema: { $ref: "#/components/schemas/ProjectWorkflow" }
|
||||
responses:
|
||||
"200":
|
||||
description: The updated project.
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/Project" }
|
||||
"400": { $ref: "#/components/responses/Error" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/projects/{projectId}/audit-workflow:
|
||||
parameters:
|
||||
- { name: projectId, in: path, required: true, schema: { type: string } }
|
||||
put:
|
||||
operationId: setAuditWorkflow
|
||||
description: Sets the audit workflow that byre runs in the background on the default branch's newest commit; empty turns audits off. Records project.updated, and starts an audit when the newest commit hasn't had one. Refused when the project's creator, whom audits run as, has no git identity.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/ProjectWorkflow" }
|
||||
responses:
|
||||
"200":
|
||||
description: The updated project.
|
||||
@@ -1315,7 +1335,7 @@ components:
|
||||
|
||||
Project:
|
||||
type: object
|
||||
required: [id, name, repo_path, default_branch, remote, created_by, created_at, review_workflow]
|
||||
required: [id, name, repo_path, default_branch, remote, created_by, created_at, review_workflow, audit_workflow]
|
||||
properties:
|
||||
id: { type: string }
|
||||
name: { type: string }
|
||||
@@ -1325,12 +1345,13 @@ components:
|
||||
created_by: { type: string }
|
||||
created_at: { type: string, format: date-time }
|
||||
review_workflow: { type: string, description: "The review workflow whose stages review every snapshot of the project's tasks; empty for no reviews." }
|
||||
audit_workflow: { type: string, description: "The workflow byre runs in the background, one run at a time, on the default branch's newest commit; empty for no audits." }
|
||||
|
||||
ReviewWorkflow:
|
||||
ProjectWorkflow:
|
||||
type: object
|
||||
required: [workflow]
|
||||
properties:
|
||||
workflow: { type: string, description: "A saved workflow, or empty for no reviews." }
|
||||
workflow: { type: string, description: "A saved workflow, or empty for none." }
|
||||
|
||||
ProjectCreate:
|
||||
type: object
|
||||
@@ -1341,7 +1362,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, merge_after_review, 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, background]
|
||||
properties:
|
||||
id: { type: string }
|
||||
project_id: { type: string }
|
||||
@@ -1367,6 +1388,8 @@ components:
|
||||
workflow: { type: string, description: "The name of the workflow the task froze at creation (getTaskWorkflow has its copy); absent for a task without one." }
|
||||
workflow_run: { type: string, description: "With workflow: the id every task of one run of the workflow shares." }
|
||||
workflow_stage: { type: string, description: "With workflow: the name of the stage this task runs." }
|
||||
audit: { type: string, description: "The default branch commit this task audits, for a task of a run of its project's audit workflow; absent for other tasks." }
|
||||
background: { type: boolean, description: "Whether the task is an audit that hasn't asked for attention yet: no question, ready_for_merge or error so far. The app keeps it out of the task switcher and shows it muted on the Project tab, and the lead gets no signals about it." }
|
||||
state:
|
||||
type: string
|
||||
description: "The one state the task is in, kept by the store in the same transaction as every change to it (a task.state event carries each change). The first that holds: merged or discarded once closed; discarding; asking while it has an open question; merging while a Merge or a merge into its parent is under way; merge_held while its Merge waits for another merge in the project; merge_after_review while a Merge with after_review waits for its review; running while one of its agents is mid-turn or has subagents running; reviewing while a review runs; review_pending between a turn's end and its snapshot's review starting or being skipped; ready_to_merge or discard_suggested when the agent's latest ready_for_merge or suggest_discard still stands; idle; no_agent when it has no live agent."
|
||||
|
||||
Reference in New Issue
Block a user