inconfig

package
v0.0.0-...-832881f Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCustomValueIsFalsy

func NewCustomValueIsFalsy(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition

func NewCustomValueIsTruthy

func NewCustomValueIsTruthy(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition

Types

type CustomValueIsFalsy

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

CustomValueIsFalsy prevents an action from being executed if a config 'custom' value is not falsy

Example configuration:

{
  "run": "echo ARRRRRRR",
  "conditions": [
    {
      "run": "CaptainHook::InConfig.CustomValueIsFalsy",
      "options": {
        "value": "my-custom-value-that-must-be-falsy"
      }
    }
  ]
}

func (*CustomValueIsFalsy) IsApplicableFor

func (c *CustomValueIsFalsy) IsApplicableFor(hook string) bool

func (*CustomValueIsFalsy) IsTrue

func (c *CustomValueIsFalsy) IsTrue(condition *configuration.Condition) bool

type CustomValueIsTruthy

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

CustomValueIsTruthy prevents an action from being executed if a config 'custom' value is not truthy

Example configuration:

{
  "run": "echo ARRRRRRR",
  "conditions": [
    {
      "run": "CaptainHook::InConfig.CustomValueIsTruthy",
      "options": {
        "value": "my-custom-value-that-must-be-truthy"
      }
    }
  ]
}

func (*CustomValueIsTruthy) IsApplicableFor

func (c *CustomValueIsTruthy) IsApplicableFor(hook string) bool

func (*CustomValueIsTruthy) IsTrue

func (c *CustomValueIsTruthy) IsTrue(condition *configuration.Condition) bool

Jump to

Keyboard shortcuts

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