taskapi

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkDeleteTasksRequest

type BulkDeleteTasksRequest struct {
	TaskIDs []string `json:"task_ids"`
}

BulkDeleteTasksRequest is the request body for bulk-deleting tasks.

func (BulkDeleteTasksRequest) Validate added in v0.1.2

func (r BulkDeleteTasksRequest) Validate() error

type CheckStatusResponse

type CheckStatusResponse struct {
	Status           string                   `json:"status"` // "pending", "success", "failure", "error"
	Summary          string                   `json:"summary,omitempty"`
	FailedNames      []string                 `json:"failed_names,omitempty"`
	CheckRunsSkipped bool                     `json:"check_runs_skipped,omitempty"` // True when GitHub Actions checks couldn't be read (fine-grained PAT)
	Checks           []github.IndividualCheck `json:"checks,omitempty"`
}

CheckStatusResponse is the response body for the task check status endpoint.

type CloseRequest

type CloseRequest struct {
	ID     string `param:"id" json:"-"`
	Reason string `json:"reason,omitempty"`
}

CloseRequest is the request body for closing a task.

func (CloseRequest) Validate added in v0.1.2

func (r CloseRequest) Validate() error

type CreateTaskRequest

type CreateTaskRequest struct {
	RepoID             string   `param:"repo_id" json:"-"`
	Title              string   `json:"title"`
	Description        string   `json:"description"`
	DependsOn          []string `json:"depends_on,omitempty"`
	AcceptanceCriteria []string `json:"acceptance_criteria,omitempty"`
	MaxCostUSD         float64  `json:"max_cost_usd,omitempty"`
	SkipPR             bool     `json:"skip_pr,omitempty"`
	DraftPR            bool     `json:"draft_pr,omitempty"`
	Model              string   `json:"model,omitempty"`
	NotReady           bool     `json:"not_ready,omitempty"`
}

CreateTaskRequest is the request body for creating a task.

func (CreateTaskRequest) Validate added in v0.1.2

func (r CreateTaskRequest) Validate() error

type DiffResponse

type DiffResponse struct {
	Diff string `json:"diff"`
}

DiffResponse is the response body for the task diff endpoint.

type FeedbackRequest

type FeedbackRequest struct {
	ID       string `param:"id" json:"-"`
	Feedback string `json:"feedback"`
}

FeedbackRequest is the request body for providing feedback on a task in review.

func (FeedbackRequest) Validate added in v0.1.2

func (r FeedbackRequest) Validate() error

type HTTPHandler

type HTTPHandler struct {
	// contains filtered or unexported fields
}

HTTPHandler handles task HTTP requests.

func NewHTTPHandler

func NewHTTPHandler(store *task.Store, repoStore *repo.Store, epicStore *epic.Store, githubTokenService *githubtoken.Service, settingService *setting.Service) *HTTPHandler

NewHTTPHandler creates a new HTTPHandler.

func (*HTTPHandler) BulkDeleteTasks

func (h *HTTPHandler) BulkDeleteTasks(c echo.Context) error

BulkDeleteTasks handles POST /tasks/bulk-delete

func (*HTTPHandler) CloseTask

func (h *HTTPHandler) CloseTask(c echo.Context) error

CloseTask handles POST /tasks/:id/close

func (*HTTPHandler) CreateTask

func (h *HTTPHandler) CreateTask(c echo.Context) error

CreateTask handles POST /repos/:repo_id/tasks

func (*HTTPHandler) DeleteTask

func (h *HTTPHandler) DeleteTask(c echo.Context) error

DeleteTask handles DELETE /tasks/:id

func (*HTTPHandler) FeedbackTask

func (h *HTTPHandler) FeedbackTask(c echo.Context) error

FeedbackTask handles POST /tasks/:id/feedback

func (*HTTPHandler) GetTask

func (h *HTTPHandler) GetTask(c echo.Context) error

GetTask handles GET /tasks/:id

func (*HTTPHandler) GetTaskChecks

func (h *HTTPHandler) GetTaskChecks(c echo.Context) error

GetTaskChecks handles GET /tasks/:id/checks

func (*HTTPHandler) GetTaskDiff

func (h *HTTPHandler) GetTaskDiff(c echo.Context) error

GetTaskDiff handles GET /tasks/:id/diff

func (*HTTPHandler) ListTasksByRepo

func (h *HTTPHandler) ListTasksByRepo(c echo.Context) error

ListTasksByRepo handles GET /repos/:repo_id/tasks

func (*HTTPHandler) MoveToReview

func (h *HTTPHandler) MoveToReview(c echo.Context) error

MoveToReview handles POST /tasks/:id/move-to-review

func (*HTTPHandler) Register

func (h *HTTPHandler) Register(g *echo.Group)

Register adds the endpoints to the provided Echo router group.

func (*HTTPHandler) RemoveDependency

func (h *HTTPHandler) RemoveDependency(c echo.Context) error

RemoveDependency handles DELETE /tasks/:id/dependency

func (*HTTPHandler) RetryTask

func (h *HTTPHandler) RetryTask(c echo.Context) error

RetryTask handles POST /tasks/:id/retry

func (*HTTPHandler) SetReady

func (h *HTTPHandler) SetReady(c echo.Context) error

SetReady handles PUT /tasks/:id/ready

func (*HTTPHandler) StartOverTask

func (h *HTTPHandler) StartOverTask(c echo.Context) error

StartOverTask handles POST /tasks/:id/start-over

func (*HTTPHandler) StopTask

func (h *HTTPHandler) StopTask(c echo.Context) error

StopTask handles POST /tasks/:id/stop

func (*HTTPHandler) StreamLogs

func (h *HTTPHandler) StreamLogs(c echo.Context) error

StreamLogs handles GET /tasks/:id/logs as a Server-Sent Events stream.

func (*HTTPHandler) SyncRepoTasks

func (h *HTTPHandler) SyncRepoTasks(c echo.Context) error

SyncRepoTasks handles POST /repos/:repo_id/tasks/sync

func (*HTTPHandler) SyncTaskStatus

func (h *HTTPHandler) SyncTaskStatus(c echo.Context) error

SyncTaskStatus handles POST /tasks/:id/sync

func (*HTTPHandler) UpdateTask

func (h *HTTPHandler) UpdateTask(c echo.Context) error

UpdateTask handles PATCH /tasks/:id

type RemoveDependencyRequest

type RemoveDependencyRequest struct {
	ID        string `param:"id" json:"-"`
	DependsOn string `json:"depends_on"`
}

RemoveDependencyRequest is the request body for removing a dependency from a task.

func (RemoveDependencyRequest) Validate added in v0.1.2

func (r RemoveDependencyRequest) Validate() error

type RepoIDRequest added in v0.1.2

type RepoIDRequest struct {
	RepoID string `param:"repo_id" json:"-"`
}

RepoIDRequest captures the :repo_id path parameter for repo-scoped endpoints.

func (RepoIDRequest) Validate added in v0.1.2

func (r RepoIDRequest) Validate() error

type RetryTaskRequest

type RetryTaskRequest struct {
	ID           string `param:"id" json:"-"`
	Instructions string `json:"instructions,omitempty"`
}

RetryTaskRequest is the request body for retrying a failed task.

func (RetryTaskRequest) Validate added in v0.1.2

func (r RetryTaskRequest) Validate() error

type SetReadyRequest

type SetReadyRequest struct {
	ID    string `param:"id" json:"-"`
	Ready bool   `json:"ready"`
}

SetReadyRequest is the request body for toggling a task's ready state.

func (SetReadyRequest) Validate added in v0.1.2

func (r SetReadyRequest) Validate() error

type StartOverRequest

type StartOverRequest struct {
	ID                 string   `param:"id" json:"-"`
	Title              *string  `json:"title,omitempty"`
	Description        *string  `json:"description,omitempty"`
	AcceptanceCriteria []string `json:"acceptance_criteria,omitempty"`
}

StartOverRequest is the request body for starting a task over from scratch.

func (StartOverRequest) Validate added in v0.1.2

func (r StartOverRequest) Validate() error

type SyncRepoTasksRequest added in v0.1.2

type SyncRepoTasksRequest struct {
	RepoID string `param:"repo_id" json:"-"`
}

SyncRepoTasksRequest captures the :repo_id path parameter.

func (SyncRepoTasksRequest) Validate added in v0.1.2

func (r SyncRepoTasksRequest) Validate() error

type TaskIDRequest added in v0.1.2

type TaskIDRequest struct {
	ID string `param:"id" json:"-"`
}

TaskIDRequest captures the :id path parameter for task endpoints.

func (TaskIDRequest) Validate added in v0.1.2

func (r TaskIDRequest) Validate() error

type UpdateTaskRequest

type UpdateTaskRequest struct {
	ID                 string   `param:"id" json:"-"`
	Title              *string  `json:"title,omitempty"`
	Description        *string  `json:"description,omitempty"`
	DependsOn          []string `json:"depends_on,omitempty"`
	AcceptanceCriteria []string `json:"acceptance_criteria,omitempty"`
	MaxCostUSD         *float64 `json:"max_cost_usd,omitempty"`
	SkipPR             *bool    `json:"skip_pr,omitempty"`
	DraftPR            *bool    `json:"draft_pr,omitempty"`
	Model              *string  `json:"model,omitempty"`
	NotReady           *bool    `json:"not_ready,omitempty"`
}

UpdateTaskRequest is the request body for updating a pending task. All fields are optional — only provided fields are updated.

func (UpdateTaskRequest) Validate added in v0.1.2

func (r UpdateTaskRequest) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL