Documentation
¶
Index ¶
- Constants
- type Aider
- type CodingAgents
- type Config
- type Contexts
- type IssueType
- type IssueTypeName
- type IssueTypes
- type Job
- type Jobs
- type LlmModel
- type LlmModels
- type NextTransition
- type Priorities
- type Priority
- type Project
- type ProjectCommand
- type ProjectCommands
- type Projects
- type Settings
- type State
- type StateName
- type States
- type Step
- type StepPrompt
- type Steps
- type Transition
- type Transitions
- type Trigger
- type TriggerIf
- type TriggerTransition
- type Triggers
- type UseAI
- type Workflow
Constants ¶
const ( // TriggerTransitionWhoParent is used to indicate that the transition should be applied to the parent issue. TriggerTransitionWhoParent = "parent" // TriggerTransitionWhoChildren is used to indicate that the transition should be applied to children issues. TriggerTransitionWhoChildren = "children" )
const ContextAffectedFiles = "affected-files"
ContextAffectedFiles provides all files that were touched in children and siblings branches.
const ContextChildren = "children"
ContextChildren matches the children
const ContextComments = "comments"
ContextComments matches comments
const ContextFifeComment = "last-5-comments"
ContextFifeComment matches the last fife comment
const ContextFourComment = "last-4-comments"
ContextFourComment matches the last four comment
const ContextIssueTypes = "issue_types"
ContextIssueTypes explains what each issue represents
const ContextLastComment = "last-comment"
ContextLastComment matches the last comment
const ContextParent = "parent"
ContextParent matches the parent
const ContextParentComments = "parent-comments"
ContextParentComments matches the parent comments
const ContextParents = "parents"
ContextParents matches the parents
const ContextProject = "project"
ContextProject matches the project
const ContextProjectWiki = "wiki"
ContextProjectWiki matches the project wiki
const ContextSiblings = "siblings"
ContextSiblings matches the siblings
const ContextSiblingsComments = "siblings-comments"
ContextSiblingsComments matches the siblings comments
const ContextThreeComment = "last-3-comments"
ContextThreeComment matches the last three comment
const ContextTicket = "ticket"
ContextTicket matches the ticket
const ContextTwoComment = "last-2-comments"
ContextTwoComment matches the last two comment
const LlmModelNormal = "normal"
LlmModelNormal is the name of the normal model
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodingAgents ¶ added in v0.9.1
type CodingAgents struct {
Aider Aider `yaml:"aider"`
}
type IssueType ¶
type IssueType struct {
Name IssueTypeName `yaml:"-"` // Exclude from YAML unmarshalling
Jobs Jobs `yaml:"jobs"`
Description string `yaml:"description"`
}
type IssueTypeName ¶
type IssueTypeName string
type IssueTypes ¶
type IssueTypes map[IssueTypeName]IssueType
func (*IssueTypes) Get ¶
func (s *IssueTypes) Get(name IssueTypeName) IssueType
type LlmModel ¶
type LlmModel struct {
Name string `yaml:"name"`
Model string `yaml:"model"`
Provider string `yaml:"provider"`
APIKey string `yaml:"api_key"`
Temperature float64 `yaml:"temperature"`
BaseURL string `yaml:"base_url"`
MaxTokens int `yaml:"max_tokens"`
MaxRetries int `yaml:"max_retries"`
Commands []string `yaml:"commands"`
}
type NextTransition ¶
type NextTransition struct {
Valid bool
Single bool
Success Transition
Failure Transition
}
func (*NextTransition) GetTarget ¶
func (n *NextTransition) GetTarget(success bool) StateName
func (*NextTransition) LogPrint ¶
func (n *NextTransition) LogPrint()
type Priorities ¶
type Priorities []Priority
type Priority ¶
type Priority struct {
Type IssueTypeName `yaml:"type"`
State StateName `yaml:"state"`
}
type Project ¶
type Project struct {
Identifier string `yaml:"identifier"`
Name string `yaml:"name"`
Description string `yaml:"description"`
GitPath string `yaml:"git_path"`
LocalGitPath string `yaml:"git_local_dir"`
FinalBranch string `yaml:"final_branch"`
DeleteBranchAfterMerge bool `yaml:"delete_branch_after_merge"` // will delete source (child) branch after merge into parent
Wiki string `yaml:"wiki"`
Commands ProjectCommands `yaml:"commands"`
}
type ProjectCommand ¶
type ProjectCommands ¶
type ProjectCommands []ProjectCommand
func (ProjectCommands) Find ¶
func (p ProjectCommands) Find(identifier string) (ProjectCommand, error)
type Settings ¶
type Settings struct {
Workflow Workflow `yaml:"workflow"`
Projects Projects `yaml:"projects"`
LlmModels LlmModels `yaml:"llm_models"`
CodingAgents CodingAgents `yaml:"coding_agents"`
}
type State ¶
type State struct {
Name StateName `yaml:"-"` // Exclude from YAML unmarshalling
Description string `yaml:"description"`
UseAI UseAI `yaml:"ai"`
Prompt string `yaml:"prompt,omitempty"`
IsDefault bool `yaml:"is_default"`
IsFirst bool `yaml:"is_first"`
IsClosed bool `yaml:"is_closed"`
}
State represents a single state within the workflow.
type Step ¶
type Step struct {
Command string `yaml:"command"`
Action string `yaml:"action"`
Comment bool `yaml:"comment"`
Remember bool `yaml:"remember"`
Context Contexts `yaml:"context"`
Prompt StepPrompt `yaml:"prompt"`
Summarize bool `yaml:"summarize"`
CommentSummary bool `yaml:"comment-summary"`
History []string
ContextFiles []string
}
type StepPrompt ¶
type StepPrompt string
func (*StepPrompt) ForCli ¶
func (p *StepPrompt) ForCli() string
type Transition ¶
type Transition struct {
Source StateName `yaml:"source"` // Initial, Backlog, In Progress, etc
Target StateName `yaml:"target"` // Initial, Testing, etc
Success bool `yaml:"success"` // Transition on success if multiple transitions available
Fail bool `yaml:"fail"` // Transition on fail if multiple transitions available
}
func (*Transition) GetIDs ¶
func (t *Transition) GetIDs(statuses []redmine.IssueStatus) (from int, to int)
type Transitions ¶
type Transitions []Transition
func (*Transitions) FailTransition ¶
func (t *Transitions) FailTransition() (transition Transition)
func (*Transitions) GetNextTransition ¶
func (t *Transitions) GetNextTransition(source StateName) NextTransition
func (*Transitions) GetTransitions ¶
func (t *Transitions) GetTransitions(source StateName) (transitions Transitions)
func (*Transitions) SuccessTransition ¶
func (t *Transitions) SuccessTransition() (transition Transition)
type Trigger ¶
type Trigger struct {
IssueType IssueTypeName `yaml:"issue_type"`
TriggerIf []TriggerIf `yaml:"if"`
}
func (Trigger) GetTriggerIf ¶
type TriggerIf ¶
type TriggerIf struct {
MovedTo StateName `yaml:"moved_to"`
AllSiblingsStatus StateName `yaml:"all_siblings_status"`
TriggerTransition TriggerTransition `yaml:"transition"`
}
func (TriggerIf) AllSiblingsCheck ¶
type TriggerTransition ¶
type Triggers ¶
type Triggers []Trigger
func (Triggers) GetTriggers ¶
func (t Triggers) GetTriggers(issueType IssueTypeName) []Trigger
type UseAI ¶
type UseAI []IssueTypeName
func (*UseAI) Yes ¶
func (a *UseAI) Yes(name IssueTypeName) bool
type Workflow ¶
type Workflow struct {
States States `yaml:"states"`
IssueTypes IssueTypes `yaml:"issue_types"`
Transitions Transitions `yaml:"transitions"`
Priorities Priorities `yaml:"priorities"`
Triggers Triggers `yaml:"triggers"`
LlmModels LlmModels `yaml:"llm_models"`
Aider Aider `yaml:"aider"`
}
Workflow represents
func (*Workflow) UnmarshalYAML ¶
UnmarshalYAML implements custom unmarshalling for the Workflow struct.