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

commit

package
v1.11.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Selector

type Selector interface {
	// MatchesRef returns a boolean value indicating whether or not the Selector
	// would consider a commit referenced by the specified ref to be eligible for
	// selection.
	MatchesRef(string) bool
	// MatchesPaths returns a boolean value indicating whether or not the Selector
	// would consider a commit with the specified changed paths to be eligible for
	// selection.
	MatchesPaths([]string) bool
	// ListRefs returns the raw remote ref state relevant to the Selector's commit
	// selection strategy, obtained via a single git ls-remote round-trip without
	// cloning. Name-based filters (semver and/or regex) are applied; path filters
	// are not, as those are evaluated during Select. The result is suitable for
	// recording in Warehouse status and for a cheap equality check that detects
	// whether anything relevant has moved since the last discovery.
	ListRefs(context.Context) (*kargoapi.GitDiscoveryRefs, error)
	// Select selects images from a container image repository.
	Select(context.Context) ([]kargoapi.DiscoveredCommit, error)
}

Selector is an interface for selecting commits from a Git repository.

func NewSelector

func NewSelector(
	ctx context.Context,
	sub kargoapi.GitSubscription,
	creds *git.RepoCredentials,
) (Selector, error)

NewSelector returns some implementation of the Selector interface that selects commits from a Git repository based on the provided subscription.

Jump to

Keyboard shortcuts

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