Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultMaxLogLines is the default maximum number of log lines to include in context.
DefaultMaxLogLines = 50
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assembler ¶
type Assembler struct {
// contains filtered or unexported fields
}
Assembler builds context data for LLM analysis from pipeline and event information.
func NewAssembler ¶
func NewAssembler(run *params.Run, kinteract kubeinteraction.Interface, logger *zap.SugaredLogger) *Assembler
NewAssembler creates a new context assembler.
func (*Assembler) BuildCELContext ¶
func (a *Assembler) BuildCELContext( pipelineRun *tektonv1.PipelineRun, event *info.Event, repo *v1alpha1.Repository, ) (map[string]any, error)
BuildCELContext builds context data for CEL expression evaluation.
This function exposes a carefully curated subset of event data to CEL expressions. The following fields are EXCLUDED for security or internal implementation reasons:
- event.Provider (contains API tokens and webhook secrets)
- event.Request (contains raw HTTP headers and payload which may include secrets)
- event.InstallationID, AccountID, GHEURL, CloneURL (provider-specific internal IDs/URLs)
- event.SourceProjectID, TargetProjectID (GitLab-specific internal IDs)
- event.State (internal state management fields)
- event.Event (raw event object, already represented in structured fields)
func (*Assembler) BuildContext ¶
func (a *Assembler) BuildContext( ctx context.Context, pipelineRun *tektonv1.PipelineRun, event *info.Event, contextConfig *v1alpha1.ContextConfig, provider provider.Interface, ) (map[string]any, error)
BuildContext assembles context data based on the provided configuration.
Click to show internal directories.
Click to hide internal directories.