Help us shape the future of Go! Take the 2026 Go Developer Survey

matcher

package
v0.48.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRepositoryNameConflict = errors.New("multiple repositories exist with the given name")

Functions

func GetRepoByName added in v0.39.0

func GetRepoByName(ctx context.Context, cs *params.Run, repoName, ns string) (*apipac.Repository, error)

GetRepoByName get a repo by name anywhere on a cluster. Parameter 'ns' may optionally be supplied in case of a naming conflict.

func GrabPipelineFromAnnotations added in v0.28.0

func GrabPipelineFromAnnotations(annotations map[string]string) (string, error)

func GrabTasksFromAnnotations added in v0.28.0

func GrabTasksFromAnnotations(annotations map[string]string) ([]string, error)

func IncomingWebhookRule

func IncomingWebhookRule(branch string, incomingWebhooks []apipac.Incoming) *apipac.Incoming

IncomingWebhookRule will match a rule to an incoming rule, currently a rule is a target branch. Supports both exact string matching and glob patterns. Uses first-match-wins strategy: returns the first webhook with a matching target.

func MatchEventURLRepo

func MatchEventURLRepo(ctx context.Context, cs *params.Run, event *info.Event, ns string) (*apipac.Repository, error)

func MatchRunningPipelineRunForIncomingWebhook added in v0.21.0

func MatchRunningPipelineRunForIncomingWebhook(eventType, incomingPipelineRun string, prs []*tektonv1.PipelineRun) []*tektonv1.PipelineRun

Types

type Match

type Match struct {
	PipelineRun *tektonv1.PipelineRun
	Repo        *apipac.Repository
	Config      map[string]string
}

func MatchPipelinerunByAnnotation

func MatchPipelinerunByAnnotation(ctx context.Context, logger *zap.SugaredLogger, pruns []*tektonv1.PipelineRun, cs *params.Run, event *info.Event, vcx provider.Interface, eventEmitter *events.EventEmitter, repo *apipac.Repository, reportErrors bool) ([]Match, error)

type NoFailedPipelineToRetestError added in v0.44.0

type NoFailedPipelineToRetestError string

NoFailedPipelineToRetestError is an error type returned when /retest or /ok-to-test is used but all matching pipelines have already succeeded for this commit. The underlying string value is the gitops comment prefix used to construct the user-facing error message with the correct command syntax.

func (NoFailedPipelineToRetestError) Error added in v0.44.0

func (NoFailedPipelineToRetestError) Is added in v0.44.0

type NodeMatcher added in v0.41.0

type NodeMatcher func(expr *exprpb.Expr) bool

NodeMatcher is a predicate function that inspects a CEL AST node. It returns true if the node matches the criteria being searched for.

type RemoteTasks

type RemoteTasks struct {
	Run                    *params.Run
	ProviderInterface      provider.Interface
	Event                  *info.Event
	Logger                 *zap.SugaredLogger
	DeprecatedHubResources []string // tracks resources resolved from deprecated tektonhub catalogs
}

func (*RemoteTasks) GetPipelineFromAnnotationName added in v0.28.0

func (rt *RemoteTasks) GetPipelineFromAnnotationName(ctx context.Context, name string) (*tektonv1.Pipeline, error)

func (*RemoteTasks) GetTaskFromAnnotationName added in v0.28.0

func (rt *RemoteTasks) GetTaskFromAnnotationName(ctx context.Context, name string) (*tektonv1.Task, error)

Jump to

Keyboard shortcuts

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