kin: KIN-049 Кнопка Deploy на странице задачи после approve. Для каждого проекта настраивается deploy-команда (git push, scp, ssh restart). В Settings проекта.
This commit is contained in:
parent
860ef3f6c9
commit
d50bd703ae
11 changed files with 517 additions and 61 deletions
|
|
@ -42,6 +42,7 @@ export interface Project {
|
|||
execution_mode: string | null
|
||||
autocommit_enabled: number | null
|
||||
obsidian_vault_path: string | null
|
||||
deploy_command: string | null
|
||||
created_at: string
|
||||
total_tasks: number
|
||||
done_tasks: number
|
||||
|
|
@ -76,6 +77,7 @@ export interface Task {
|
|||
execution_mode: string | null
|
||||
blocked_reason: string | null
|
||||
dangerously_skipped: number | null
|
||||
category: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
|
@ -116,9 +118,18 @@ export interface PipelineStep {
|
|||
created_at: string
|
||||
}
|
||||
|
||||
export interface DeployResult {
|
||||
success: boolean
|
||||
exit_code: number
|
||||
stdout: string
|
||||
stderr: string
|
||||
duration_seconds: number
|
||||
}
|
||||
|
||||
export interface TaskFull extends Task {
|
||||
pipeline_steps: PipelineStep[]
|
||||
related_decisions: Decision[]
|
||||
project_deploy_command: string | null
|
||||
}
|
||||
|
||||
export interface PendingAction {
|
||||
|
|
@ -161,7 +172,7 @@ export const api = {
|
|||
cost: (days = 7) => get<CostEntry[]>(`/cost?days=${days}`),
|
||||
createProject: (data: { id: string; name: string; path: string; tech_stack?: string[]; priority?: number }) =>
|
||||
post<Project>('/projects', data),
|
||||
createTask: (data: { project_id: string; title: string; priority?: number; route_type?: string }) =>
|
||||
createTask: (data: { project_id: string; title: string; priority?: number; route_type?: string; category?: string }) =>
|
||||
post<Task>('/tasks', data),
|
||||
approveTask: (id: string, data?: { decision_title?: string; decision_description?: string; decision_type?: string; create_followups?: boolean }) =>
|
||||
post<{ status: string; followup_tasks: Task[]; needs_decision: boolean; pending_actions: PendingAction[] }>(`/tasks/${id}/approve`, data || {}),
|
||||
|
|
@ -181,8 +192,10 @@ export const api = {
|
|||
post<{ updated: string[]; count: number }>(`/projects/${projectId}/audit/apply`, { task_ids: taskIds }),
|
||||
patchTask: (id: string, data: { status?: string; execution_mode?: string; priority?: number; route_type?: string; title?: string; brief_text?: string }) =>
|
||||
patch<Task>(`/tasks/${id}`, data),
|
||||
patchProject: (id: string, data: { execution_mode?: string; autocommit_enabled?: boolean; obsidian_vault_path?: string }) =>
|
||||
patchProject: (id: string, data: { execution_mode?: string; autocommit_enabled?: boolean; obsidian_vault_path?: string; deploy_command?: string }) =>
|
||||
patch<Project>(`/projects/${id}`, data),
|
||||
deployProject: (projectId: string) =>
|
||||
post<DeployResult>(`/projects/${projectId}/deploy`, {}),
|
||||
syncObsidian: (projectId: string) =>
|
||||
post<ObsidianSyncResult>(`/projects/${projectId}/sync/obsidian`, {}),
|
||||
deleteDecision: (projectId: string, decisionId: number) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue