steps

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package steps provides the action executor step.

Package steps provides the auto-closer logic for confirmed duplicate issues.

Package steps contains the modular "Lego block" pipeline steps. Each step implements the pipeline.Step interface.

Package steps provides the indexer step for adding issues to the vector database.

Package steps provides the response builder step.

Package steps provides the similarity search step.

Package steps provides the transfer check step.

Package steps provides the triage step.

Package steps provides the VectorDB preparation step.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAll

func RegisterAll(r *pipeline.Registry)

RegisterAll registers all built-in steps with the registry.

Types

type ActionExecutor

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

ActionExecutor executes the decided actions (posting comments, transferring, etc).

func NewActionExecutor

func NewActionExecutor(deps *pipeline.Dependencies) *ActionExecutor

NewActionExecutor creates a new action executor step.

func (*ActionExecutor) Name

func (s *ActionExecutor) Name() string

Name returns the step name.

func (*ActionExecutor) Run

func (s *ActionExecutor) Run(ctx *pipeline.Context) error

Run executes the actions.

type AutoCloseDetail added in v0.1.7

type AutoCloseDetail struct {
	Number int    `json:"number"`
	Action string `json:"action"` // "closed", "skipped_grace", "skipped_human", "error"
	Reason string `json:"reason,omitempty"`
}

AutoCloseDetail records the outcome for a single issue.

type AutoCloseResult added in v0.1.7

type AutoCloseResult struct {
	Processed    int               `json:"processed"`
	Closed       int               `json:"closed"`
	SkippedGrace int               `json:"skipped_grace_period"`
	SkippedHuman int               `json:"skipped_human_activity"`
	Errors       []string          `json:"errors,omitempty"`
	Details      []AutoCloseDetail `json:"details,omitempty"`
}

AutoCloseResult holds the summary of an auto-close run.

type AutoCloser added in v0.1.7

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

AutoCloser scans issues with the potential-duplicate label and closes those whose grace period has expired and have no human activity.

func NewAutoCloser added in v0.1.7

func NewAutoCloser(gh *github.Client, cfg *config.Config, dryRun, verbose bool) *AutoCloser

NewAutoCloser creates a new AutoCloser.

func (*AutoCloser) Run added in v0.1.7

func (ac *AutoCloser) Run(ctx context.Context, org, repo string) (*AutoCloseResult, error)

Run processes all open issues with the "potential-duplicate" label.

type CommandHandler added in v0.1.0

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

CommandHandler processes bot commands like /undo.

func NewCommandHandler added in v0.1.0

func NewCommandHandler(deps *pipeline.Dependencies) *CommandHandler

NewCommandHandler creates a new command handler step.

func (*CommandHandler) Name added in v0.1.0

func (s *CommandHandler) Name() string

Name returns the step name.

func (*CommandHandler) Run added in v0.1.0

func (s *CommandHandler) Run(ctx *pipeline.Context) error

Run checks for commands in issue comments.

type DuplicateDetector added in v0.1.0

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

DuplicateDetector analyzes similarity results for duplicates using LLM.

func NewDuplicateDetector added in v0.1.0

func NewDuplicateDetector(deps *pipeline.Dependencies) *DuplicateDetector

NewDuplicateDetector creates a new duplicate detector step.

func (*DuplicateDetector) Name added in v0.1.0

func (s *DuplicateDetector) Name() string

Name returns the step name.

func (*DuplicateDetector) Run added in v0.1.0

func (s *DuplicateDetector) Run(ctx *pipeline.Context) error

Run analyzes similar issues for duplicates.

type Gatekeeper

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

Gatekeeper checks if the issue's repository is enabled and applies cooldown logic.

func NewGatekeeper

func NewGatekeeper(deps *pipeline.Dependencies) *Gatekeeper

NewGatekeeper creates a new gatekeeper step.

func (*Gatekeeper) Name

func (s *Gatekeeper) Name() string

Name returns the step name.

func (*Gatekeeper) Run

func (s *Gatekeeper) Run(ctx *pipeline.Context) error

Run checks repository configuration and permissions.

type Indexer

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

Indexer adds/updates the issue in the vector database.

func NewIndexer

func NewIndexer(deps *pipeline.Dependencies) *Indexer

NewIndexer creates a new indexer step.

func (*Indexer) Name

func (s *Indexer) Name() string

Name returns the step name.

func (*Indexer) Run

func (s *Indexer) Run(ctx *pipeline.Context) error

Run adds the issue to the vector database.

type LLMRouter added in v0.1.0

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

LLMRouter analyzes issue intent and routes to best repository using LLM.

func NewLLMRouter added in v0.1.0

func NewLLMRouter(deps *pipeline.Dependencies) *LLMRouter

NewLLMRouter creates a new LLM router step.

func (*LLMRouter) Name added in v0.1.0

func (s *LLMRouter) Name() string

Name returns the step name.

func (*LLMRouter) Run added in v0.1.0

func (s *LLMRouter) Run(ctx *pipeline.Context) error

Run analyzes issue and routes to best repository.

type PendingAction

type PendingAction struct {
	IssueNumber    int       `json:"issue_number"`
	Org            string    `json:"org"`
	Repo           string    `json:"repo"`
	TransferTarget string    `json:"transfer_target,omitempty"`
	Reason         string    `json:"reason"`
	CreatedAt      time.Time `json:"created_at"`
	ExpiresAt      time.Time `json:"expires_at"`
}

PendingAction represents an action that needs to be executed later.

type PendingActionScheduler

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

PendingActionScheduler schedules actions that could not be executed immediately.

func NewPendingActionScheduler

func NewPendingActionScheduler(deps *pipeline.Dependencies) *PendingActionScheduler

NewPendingActionScheduler creates a new PendingActionScheduler step.

func (*PendingActionScheduler) Name

func (s *PendingActionScheduler) Name() string

Name returns the step name.

func (*PendingActionScheduler) Run

Run executes the scheduler logic.

type QualityChecker added in v0.1.0

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

QualityChecker assesses issue quality using LLM.

func NewQualityChecker added in v0.1.0

func NewQualityChecker(deps *pipeline.Dependencies) *QualityChecker

NewQualityChecker creates a new quality checker step.

func (*QualityChecker) Name added in v0.1.0

func (s *QualityChecker) Name() string

Name returns the step name.

func (*QualityChecker) Run added in v0.1.0

func (s *QualityChecker) Run(ctx *pipeline.Context) error

Run assesses issue quality.

type ResponseBuilder

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

ResponseBuilder constructs the comment to post on the issue.

func NewResponseBuilder

func NewResponseBuilder(deps *pipeline.Dependencies) *ResponseBuilder

NewResponseBuilder creates a new response builder step.

func (*ResponseBuilder) Name

func (s *ResponseBuilder) Name() string

Name returns the step name.

func (*ResponseBuilder) Run

func (s *ResponseBuilder) Run(ctx *pipeline.Context) error

Run builds the comprehensive triage summary comment.

type SimilaritySearch

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

SimilaritySearch finds similar issues using the vector database.

func NewSimilaritySearch

func NewSimilaritySearch(deps *pipeline.Dependencies) *SimilaritySearch

NewSimilaritySearch creates a new similarity search step.

func (*SimilaritySearch) Name

func (s *SimilaritySearch) Name() string

Name returns the step name.

func (*SimilaritySearch) Run

func (s *SimilaritySearch) Run(ctx *pipeline.Context) error

Run searches for similar issues.

type TransferCheck

type TransferCheck struct{}

TransferCheck evaluates if an issue should be transferred to another repository.

func NewTransferCheck

func NewTransferCheck(deps *pipeline.Dependencies) *TransferCheck

NewTransferCheck creates a new transfer check step.

func (*TransferCheck) Name

func (s *TransferCheck) Name() string

Name returns the step name.

func (*TransferCheck) Run

func (s *TransferCheck) Run(ctx *pipeline.Context) error

Run checks if the issue should be transferred using transfer rules.

type Triage

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

Triage uses LLM to suggest labels for the issue.

func NewTriage

func NewTriage(deps *pipeline.Dependencies) *Triage

NewTriage creates a new triage step.

func (*Triage) Name

func (s *Triage) Name() string

Name returns the step name.

func (*Triage) Run

func (s *Triage) Run(ctx *pipeline.Context) error

Run analyzes the issue for label suggestions. Quality assessment is now handled by the quality_checker step.

type VectorDBPrep

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

VectorDBPrep ensures the vector database collection exists and is ready.

func NewVectorDBPrep

func NewVectorDBPrep(deps *pipeline.Dependencies) *VectorDBPrep

NewVectorDBPrep creates a new vector DB preparation step.

func (*VectorDBPrep) Name

func (s *VectorDBPrep) Name() string

Name returns the step name.

func (*VectorDBPrep) Run

func (s *VectorDBPrep) Run(ctx *pipeline.Context) error

Run ensures the collection exists.

Jump to

Keyboard shortcuts

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