task

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) AddFilters added in v0.12.0

func (tw *Task) AddFilters(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) Filters

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

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) IsWithinSchedule added in v0.12.0

func (tw *Task) IsWithinSchedule() bool

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) 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) 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