task

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateInputs added in v0.20.0

func ValidateInputs(data map[string]string, t *Task) []error

ValidateInputs validates the values in data. It returns a list of errors where each error details a failed validation.

Types

type Registry

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

Registry contains all tasks.

func NewRegistry

func NewRegistry(opts options.Opts) *Registry

func (*Registry) GetTasks

func (tr *Registry) GetTasks() []*Task

GetTasks returns all tasks registered with the Registry. Should be called only after ReadAll() has been called at least once.

func (*Registry) ReadAll

func (tr *Registry) ReadAll(taskFiles []string) error

ReadAll takes a list of paths to task files and reads all tasks from the files.

func (*Registry) ReadTasks added in v0.14.0

func (tr *Registry) ReadTasks(taskFile string) error

ReadTasks reads all tasks defined in taskFile and adds them to the registry.

func (*Registry) Stop

func (tr *Registry) Stop()

Stop notifies every task that this Registry is being stopped. This usually happens at the end of a run. Every task can then execute code to clean itself up.

type Task

type Task struct {
	schema.Task
	// contains filtered or unexported fields
}

func (*Task) Actions

func (tw *Task) Actions() []action.Action

func (*Task) AddPreCloneFilters added in v0.18.0

func (tw *Task) AddPreCloneFilters(f ...filter.Filter)

func (*Task) CalcAutoMergeAfter added in v0.12.0

func (tw *Task) CalcAutoMergeAfter() time.Duration

func (*Task) Checksum

func (tw *Task) Checksum() string

func (*Task) FiltersPostClone added in v0.18.0

func (tw *Task) FiltersPostClone() []filter.Filter

func (*Task) FiltersPreClone added in v0.18.0

func (tw *Task) FiltersPreClone() []filter.Filter

func (*Task) HasFilters added in v0.18.0

func (tw *Task) HasFilters() bool

func (*Task) HasReachMaxOpenPRs added in v0.5.0

func (tw *Task) HasReachMaxOpenPRs() bool

func (*Task) HasReachedChangeLimit added in v0.5.0

func (tw *Task) HasReachedChangeLimit() bool

func (*Task) IncChangeLimitCount added in v0.5.0

func (tw *Task) IncChangeLimitCount()

func (*Task) IncOpenPRsCount added in v0.5.0

func (tw *Task) IncOpenPRsCount()

func (*Task) InputData added in v0.16.0

func (tw *Task) InputData() map[string]string

InputData returns a map where every key is an input defined by the task and every value is what has been set via the command-line for that key.

func (*Task) OnPrClosed

func (tw *Task) OnPrClosed(ctx context.Context) error

func (*Task) OnPrCreated

func (tw *Task) OnPrCreated(ctx context.Context) error

func (*Task) OnPrMerged

func (tw *Task) OnPrMerged(ctx context.Context) error

func (*Task) Path added in v0.16.0

func (tw *Task) Path() string

func (*Task) RenderBranchName added in v0.12.0

func (tw *Task) RenderBranchName(data template.Data) (string, error)

func (*Task) RenderPrTitle added in v0.12.0

func (tw *Task) RenderPrTitle(data template.Data) (string, error)

func (*Task) SetInputs added in v0.16.0

func (tw *Task) SetInputs(cliInputs map[string]string) error

SetInputs takes inputs supplied via the command-line and stores them for later processing. It returns an error if an expected input isn't supplied and no default value for the input has been set.

func (*Task) Stop

func (tw *Task) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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