triage

package
v0.11.9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedAreas

func AllowedAreas() []string

func AllowedComplexities

func AllowedComplexities() []string

func AllowedDispatches

func AllowedDispatches() []string

func AllowedKinds

func AllowedKinds() []string

func AllowedLabelUniverse

func AllowedLabelUniverse() []string

func BuildPrompt

func BuildPrompt(input Input) string

func LimitPerTick

func LimitPerTick[T any](items []T, max int) []T

func SearchTokens

func SearchTokens(issue Issue) []string

func ShouldReTriage

func ShouldReTriage(issue Issue, cfg Config, _ time.Time) bool

func ShouldTriage

func ShouldTriage(issue Issue, cfg Config, now time.Time) bool

Types

type Comment

type Comment struct {
	ID                int64
	Author            string
	AuthorAssociation string
	Body              string
	CreatedAt         string
	UpdatedAt         string
}

type Config

type Config struct {
	TriagedLabel          string
	MaxIssueAgeDays       int
	MaxPerTick            int
	OutOfScopeLabel       string
	UnclearLabel          string
	ReTriageOnAuthorReply bool
}

type Decision

type Decision struct {
	NoOp               bool
	Disposition        Disposition
	ClearLabelPatterns []string
	RemoveLabels       []string
	ApplyLabels        []string
	CommentBody        string
	MarkTriaged        bool
}

func Decide

func Decide(ctx context.Context, llm LLM, input Input) Decision

func NoOpDecision

func NoOpDecision() Decision

func ReTriageDecision

func ReTriageDecision(cfg Config) Decision

type Disposition

type Disposition string
const (
	DispositionValid      Disposition = "valid"
	DispositionOutOfScope Disposition = "out-of-scope"
	DispositionUnclear    Disposition = "unclear"
)

type Input

type Input struct {
	Issue       Issue
	RepoContext RepoContext
	Config      Config
	Now         time.Time
}

type Issue

type Issue struct {
	Number    int64
	Title     string
	Body      string
	URL       string
	Author    string
	CreatedAt string
	UpdatedAt string
	Labels    []string
	Comments  []Comment
	Timeline  []TimelineEvent
}

type LLM

type LLM interface {
	Complete(context.Context, Request) (string, error)
}

type RepoContext

type RepoContext struct {
	Repo             string
	WorkingDirectory string
	Paths            []string
	Symbols          []string
}

type Request

type Request struct {
	Prompt           string
	WorkingDirectory string
}

type TimelineEvent

type TimelineEvent struct {
	Event     string
	CreatedAt string
	Label     string
}

Jump to

Keyboard shortcuts

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