branchfilter

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchFilter

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

BranchFilter matches branch names against a set of comma-separated glob patterns. An empty filter matches all branches.

func New

func New(filterStr string) *BranchFilter

New creates a BranchFilter from a comma-separated list of glob patterns (e.g. "main,release-*,feature/*"). An empty string matches everything.

func (*BranchFilter) FilterBranches

func (f *BranchFilter) FilterBranches(branches []string) []string

FilterBranches returns only the branches that match the filter.

func (*BranchFilter) IsEmpty

func (f *BranchFilter) IsEmpty() bool

IsEmpty reports whether the filter has no patterns (matches everything).

func (*BranchFilter) Match

func (f *BranchFilter) Match(branchName string) bool

Match reports whether branchName matches any of the filter's patterns. Returns true (matches everything) when the filter has no patterns.

func (*BranchFilter) Patterns

func (f *BranchFilter) Patterns() []string

Patterns returns the raw glob patterns that were used to create this filter.

Jump to

Keyboard shortcuts

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