task

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type      ActionType `yaml:"-"`
	Run       string     `yaml:"run,omitempty"`
	Labels    []string   `yaml:"labels,omitempty"`
	Assignees []string   `yaml:"assignees,omitempty"`
	Reviewers []string   `yaml:"reviewers,omitempty"`
	Comment   string     `yaml:"comment,omitempty"`
	State     string     `yaml:"state,omitempty"`
	Notify    string     `yaml:"notify,omitempty"`
	Next      []string   `yaml:"next,omitempty"`
}

type ActionType

type ActionType int
const (
	ActionTypeDo ActionType = iota + 1
	ActionTypeOk
	ActionTypeNg
)

func (ActionType) String

func (t ActionType) String() string

type Task

type Task struct {
	Id   string
	If   string `yaml:"if,omitempty"`
	Do   *Action
	Ok   *Action `yaml:"ok,omitempty"`
	Ng   *Action `yaml:"ng,omitempty"`
	Env  env.Env `yaml:"env,omitempty"`
	Name string  `yaml:"name,omitempty"`
}

func (*Task) CheckActionSyntax

func (t *Task) CheckActionSyntax(a *Action) (bool, []string)

func (*Task) CheckSyntax

func (t *Task) CheckSyntax() (bool, []string)

func (*Task) UnmarshalYAML

func (t *Task) UnmarshalYAML(data []byte) error

type Tasks

type Tasks []*Task

func (Tasks) CheckSyntax

func (tasks Tasks) CheckSyntax() (bool, []string)

func (Tasks) Find

func (tasks Tasks) Find(id string) (*Task, error)

func (Tasks) MaxLengthID

func (tasks Tasks) MaxLengthID() int

Jump to

Keyboard shortcuts

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