Documentation
¶
Index ¶
- func NewAll(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition
- func NewAny(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition
- func NewThatIs(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition
- type All
- type Any
- type ThatIs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAll ¶
func NewAll(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition
func NewAny ¶
func NewAny(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition
func NewThatIs ¶
func NewThatIs(appIO io.IO, conf *configuration.Configuration, repo git.Repo) hooks.Condition
Types ¶
type All ¶
type All struct {
// contains filtered or unexported fields
}
All makes sure an action is only executed if all the configured files are staged. Only applicable for 'pre-commit' hooks.
Example configuration:
{
"run": "echo ARRRRRR",
"conditions": [
{
"run": "CaptainHook::FilesStaged.All",
"options": {
"files": ["foo.txt", "bar.txt"]
}
}
]
}
func (*All) IsApplicableFor ¶
type Any ¶
type Any struct {
// contains filtered or unexported fields
}
Any makes sure an action is only executed if any of the configured files is staged. Only applicable for 'pre-commit' hooks.
Example configuration:
{
"run": "echo ARRRRRR",
"conditions": [
{
"run": "CaptainHook::FilesStaged.Any",
"options": {
"files": ["foo.txt", "bar.txt"]
}
}
]
}
func (*Any) IsApplicableFor ¶
type ThatIs ¶
type ThatIs struct {
// contains filtered or unexported fields
}
ThatIs makes sure an action is only executed if a file with the given configuration is staged. Only applicable for 'pre-commit' hooks.
Example configuration:
{
"run": "echo ARRRRRR",
"conditions": [
{
"run": "CaptainHook::FilesStaged.ThatIs",
"options": {
"of-type": "md",
"in-directory": "docs"
}
}
]
}
func (*ThatIs) IsApplicableFor ¶
Click to show internal directories.
Click to hide internal directories.