 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  
const ( ConditionalLabel labelType = "conditional" GenerateLabels labelType = "generate" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶ added in v0.3.0
type Action scm.EvaluationActionResult
type Config ¶
type Config struct {
	Labels             Labels             `yaml:"label"`
	Actions            Actions            `yaml:"actions"`
	IgnoreActivityFrom IgnoreActivityFrom `yaml:"ignore_activity_from"`
}
    func FromContext ¶ added in v0.10.1
type IgnoreActivityFrom ¶ added in v0.10.1
type Label ¶
type Label struct {
	// Strategy used for the label
	//
	// - "conditional" will, based on the boolean output of [script], control if the label [name] should be added/removed on the MR
	// - "computed" will, based on the list of strings output of [script], add/remove labels on the MR
	Strategy labelType `yaml:"strategy"`
	// Name of the label being generated.
	//
	// May only be used with [conditional] labelling type
	Name string `yaml:"name"`
	// Description for the label being generated.
	//
	// Optional; will be an empty string if omitted
	Description string `yaml:"description"`
	// The HEX color code to use for the label.
	//
	// May use the color variables (e.g., $purple-300) defined in Twitter Bootstrap
	// https://getbootstrap.com/docs/5.3/customize/color/#all-colors
	Color string `yaml:"color"`
	// Priority controls wether the label should be a priority label or regular one.
	//
	// This controls if the label is prioritized (sorted first) in the list.
	Priority types.Value[int] `yaml:"priority"`
	// Script contains the [expr-lang](https://expr-lang.org/) script used to emit labels for the MR.
	//
	// Please see [Type] documentation for more information.
	Script string `yaml:"script"`
	// SkipIf is an optional [expr-lang](https://expr-lang.org/) script, returning a boolean, wether to
	// skip (true) or process (false) this label step.
	SkipIf string `yaml:"skip_if"`
	// contains filtered or unexported fields
}
    func (*Label) Evaluate ¶
func (p *Label) Evaluate(evalContext scm.EvalContext) ([]scm.EvaluationResult, error)
func (*Label) ShouldSkip ¶
func (p *Label) ShouldSkip(evalContext scm.EvalContext) (bool, error)
 Click to show internal directories. 
   Click to hide internal directories.