Documentation
¶
Overview ¶
Package cmd implements CLI commands for the dark-factory tool.
Index ¶
- func FindPromptFile(ctx context.Context, dir, id string) (string, error)
- func FindSpecFile(ctx context.Context, specsDir, id string) (string, error)
- func FindSpecFileInDirs(ctx context.Context, id string, dirs ...string) (string, error)
- type ApproveCommand
- type CombinedListCommand
- type CombinedStatusCommand
- type ListCommand
- type PromptEntry
- type PromptShowCommand
- type PromptShowOutput
- type PromptVerifyCommand
- type RequeueCommand
- type SpecApproveCommand
- type SpecCompleteCommand
- type SpecEntry
- type SpecListCommand
- type SpecShowCommand
- type SpecShowOutput
- type SpecStatusCommand
- type StatusCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindPromptFile ¶ added in v0.54.1
FindPromptFile finds a prompt file by id in dir, supporting: - absolute or relative path with directory component (checked directly) - exact filename with .md extension - filename without .md extension - numeric prefix match (e.g. "122" matches "122-some-name.md")
func FindSpecFile ¶ added in v0.54.1
FindSpecFile finds a spec by absolute/relative path, exact filename, or numeric prefix match within specsDir.
Types ¶
type ApproveCommand ¶ added in v0.54.1
ApproveCommand executes the approve subcommand.
func NewApproveCommand ¶ added in v0.54.1
func NewApproveCommand( inboxDir string, queueDir string, promptManager prompt.Manager, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) ApproveCommand
NewApproveCommand creates a new ApproveCommand.
type CombinedListCommand ¶ added in v0.54.1
CombinedListCommand shows combined prompt and spec list.
func NewCombinedListCommand ¶ added in v0.54.1
func NewCombinedListCommand( inboxDir string, queueDir string, completedDir string, lister spec.Lister, counter prompt.Counter, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) CombinedListCommand
NewCombinedListCommand creates a new CombinedListCommand.
type CombinedStatusCommand ¶ added in v0.54.1
CombinedStatusCommand shows combined prompt and spec status.
type ListCommand ¶ added in v0.54.1
ListCommand executes the list subcommand.
func NewListCommand ¶ added in v0.54.1
func NewListCommand( inboxDir string, queueDir string, completedDir string, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) ListCommand
NewListCommand creates a new ListCommand.
type PromptEntry ¶ added in v0.54.1
PromptEntry represents a single prompt entry in the list output.
type PromptShowCommand ¶ added in v0.54.1
PromptShowCommand executes the prompt show subcommand.
func NewPromptShowCommand ¶ added in v0.54.1
func NewPromptShowCommand( inboxDir, inProgressDir, completedDir, logDir string, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) PromptShowCommand
NewPromptShowCommand creates a new PromptShowCommand.
type PromptShowOutput ¶ added in v0.54.1
type PromptShowOutput struct {
File string `json:"file"`
Status string `json:"status"`
Specs []string `json:"specs,omitempty"`
Summary string `json:"summary,omitempty"`
Created string `json:"created,omitempty"`
Queued string `json:"queued,omitempty"`
Started string `json:"started,omitempty"`
Completed string `json:"completed,omitempty"`
LogPath string `json:"log_path,omitempty"`
}
PromptShowOutput holds all fields for JSON output.
type PromptVerifyCommand ¶ added in v0.54.1
PromptVerifyCommand executes the prompt verify subcommand.
func NewPromptVerifyCommand ¶ added in v0.54.1
func NewPromptVerifyCommand( queueDir string, completedDir string, promptManager prompt.Manager, releaser git.Releaser, pr bool, brancher git.Brancher, prCreator git.PRCreator, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) PromptVerifyCommand
NewPromptVerifyCommand creates a new PromptVerifyCommand.
type RequeueCommand ¶ added in v0.54.1
RequeueCommand executes the requeue subcommand.
func NewRequeueCommand ¶ added in v0.54.1
func NewRequeueCommand( queueDir string, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) RequeueCommand
NewRequeueCommand creates a new RequeueCommand.
type SpecApproveCommand ¶ added in v0.54.1
SpecApproveCommand executes the spec approve subcommand.
func NewSpecApproveCommand ¶ added in v0.54.1
func NewSpecApproveCommand( inboxDir string, inProgressDir string, completedDir string, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) SpecApproveCommand
NewSpecApproveCommand creates a new SpecApproveCommand.
type SpecCompleteCommand ¶ added in v0.54.1
SpecCompleteCommand executes the spec complete subcommand.
func NewSpecCompleteCommand ¶ added in v0.54.1
func NewSpecCompleteCommand( inboxDir string, inProgressDir string, completedDir string, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) SpecCompleteCommand
NewSpecCompleteCommand creates a new SpecCompleteCommand.
type SpecEntry ¶ added in v0.54.1
type SpecEntry struct {
Status string `json:"status"`
File string `json:"file"`
PromptsCompleted int `json:"prompts_completed"`
PromptsTotal int `json:"prompts_total"`
}
SpecEntry represents a single spec entry in the list output.
type SpecListCommand ¶ added in v0.54.1
SpecListCommand executes the spec list subcommand.
func NewSpecListCommand ¶ added in v0.54.1
func NewSpecListCommand(lister specpkg.Lister, counter prompt.Counter) SpecListCommand
NewSpecListCommand creates a new SpecListCommand.
type SpecShowCommand ¶ added in v0.54.1
SpecShowCommand executes the spec show subcommand.
func NewSpecShowCommand ¶ added in v0.54.1
func NewSpecShowCommand( inboxDir, inProgressDir, completedDir string, counter prompt.Counter, currentDateTimeGetter libtime.CurrentDateTimeGetter, ) SpecShowCommand
NewSpecShowCommand creates a new SpecShowCommand.
type SpecShowOutput ¶ added in v0.54.1
type SpecShowOutput struct {
File string `json:"file"`
Status string `json:"status"`
Approved string `json:"approved,omitempty"`
Prompted string `json:"prompted,omitempty"`
Verifying string `json:"verifying,omitempty"`
Completed string `json:"completed,omitempty"`
PromptsCompleted int `json:"prompts_completed"`
PromptsTotal int `json:"prompts_total"`
}
SpecShowOutput holds all fields for JSON output.
type SpecStatusCommand ¶ added in v0.54.1
SpecStatusCommand executes the spec status subcommand.
func NewSpecStatusCommand ¶ added in v0.54.1
func NewSpecStatusCommand(lister spec.Lister, counter prompt.Counter) SpecStatusCommand
NewSpecStatusCommand creates a new SpecStatusCommand.
type StatusCommand ¶
StatusCommand executes the status subcommand.
func NewStatusCommand ¶
func NewStatusCommand(checker status.Checker, formatter status.Formatter) StatusCommand
NewStatusCommand creates a new StatusCommand.