triggerpolicy

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(policies []Policy, fallback []string, event Event) bool

func NeedsChangedPaths added in v0.27.0

func NeedsChangedPaths(policies []Policy, fallback []string, event Event) bool

func ResolveManualInputs

func ResolveManualInputs(policies []Policy, provided map[string]string) (map[string]string, error)

Types

type Event

type Event struct {
	Type         string
	Ref          string
	Action       string
	Workflow     string
	ChangedPaths []string
	PathsKnown   bool
}

type Input

type Input struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	Type        string   `json:"type"`
	Required    bool     `json:"required"`
	Default     string   `json:"default,omitempty"`
	Options     []string `json:"options,omitempty"`
}

type Policy

type Policy struct {
	Event          string   `json:"event"`
	Branches       []string `json:"branches,omitempty"`
	BranchesIgnore []string `json:"branchesIgnore,omitempty"`
	Tags           []string `json:"tags,omitempty"`
	TagsIgnore     []string `json:"tagsIgnore,omitempty"`
	Paths          []string `json:"paths,omitempty"`
	PathsIgnore    []string `json:"pathsIgnore,omitempty"`
	Workflows      []string `json:"workflows,omitempty"`
	Actions        []string `json:"actions,omitempty"`
	Schedules      []string `json:"schedules,omitempty"`
	Inputs         []Input  `json:"inputs,omitempty"`
	Condition      string   `json:"condition,omitempty"`
	Evaluable      bool     `json:"evaluable"`
}

func ParseFile

func ParseFile(provider, path string, fallback []string) ([]Policy, error)

Jump to

Keyboard shortcuts

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