Documentation
¶
Index ¶
- Constants
- func AllStatusLabels() []string
- func AllTypeLabels() []string
- func HasLabel(labels []string, label string) bool
- func IsStatusLabel(label string) bool
- func RenderBody(body IssueBody) string
- func StatusLabel(labels []string) string
- func ValidateTransition(from, to string) error
- type FrontMatter
- type IssueBody
- type LabelDef
Constants ¶
View Source
const ( StatusReady = "herd/status:ready" StatusInProgress = "herd/status:in-progress" StatusDone = "herd/status:done" StatusFailed = "herd/status:failed" StatusBlocked = "herd/status:blocked" StatusCancelled = "herd/status:cancelled" )
Status labels (mutually exclusive)
View Source
const ( // CIFixPending is added to a batch PR when the monitor posts /herd fix-ci. // It is removed once CI passes, allowing future failures to re-trigger the command. CIFixPending = "herd/ci-fix-pending" // RetryPending is added to a failed issue when the monitor posts /herd retry. // It is removed by the retry handler, preventing duplicate retry comments // when two patrol runs execute before the first retry is processed. RetryPending = "herd/retry-pending" // RebasePending is added to a batch PR when the monitor detects a merge // conflict with the base branch and dispatches a rebase conflict resolution // worker. It is removed once the conflict is resolved (PR becomes mergeable // again), preventing duplicate dispatches from concurrent patrol runs. RebasePending = "herd/rebase-pending" )
PR state labels
View Source
const ( TypeFeature = "herd/type:feature" TypeBugfix = "herd/type:bugfix" TypeFix = "herd/type:fix" TypeManual = "herd/type:manual" )
Type labels
Variables ¶
This section is empty.
Functions ¶
func IsStatusLabel ¶
IsStatusLabel returns true if the label is a herd status label.
func RenderBody ¶
RenderBody generates the full issue body from structured data.
func StatusLabel ¶
StatusLabel returns the status label from a list of labels, or empty string.
func ValidateTransition ¶
ValidateTransition checks whether transitioning from one status to another is allowed.
Types ¶
type FrontMatter ¶
type FrontMatter struct {
Version int `yaml:"version"`
Batch int `yaml:"batch,omitempty"`
DependsOn []int `yaml:"depends_on,omitempty"`
Scope []string `yaml:"scope,omitempty"`
EstimatedComplexity string `yaml:"estimated_complexity,omitempty"`
RunnerLabel string `yaml:"runner_label,omitempty"`
// Integrator-generated fields
Type string `yaml:"type,omitempty"`
FixCycle int `yaml:"fix_cycle,omitempty"`
BatchPR int `yaml:"batch_pr,omitempty"`
CIFixCycle int `yaml:"ci_fix_cycle,omitempty"`
ConflictResolution bool `yaml:"conflict_resolution,omitempty"`
ConflictingBranches []string `yaml:"conflicting_branches,omitempty"`
}
FrontMatter holds the YAML front matter fields for a herd issue.
Click to show internal directories.
Click to hide internal directories.