Documentation
¶
Index ¶
Constants ¶
View Source
const ( OnErrorFail = "fail" OnErrorWarn = "warn" )
View Source
const RepoHooksPath = ".workset/hooks.yaml"
Variables ¶
This section is empty.
Functions ¶
func RepoHooksFile ¶
Types ¶
type Context ¶
type ExecRunner ¶
type ExecRunner struct{}
func (ExecRunner) Run ¶
func (ExecRunner) Run(ctx context.Context, req RunRequest) error
type Hook ¶
type Hook struct {
ID string `yaml:"id" json:"id"`
On []Event `yaml:"on" json:"on"`
Run []string `yaml:"run" json:"run"`
Cwd string `yaml:"cwd,omitempty" json:"cwd,omitempty"`
Env map[string]string `yaml:"env,omitempty" json:"env,omitempty"`
OnError string `yaml:"on_error,omitempty" json:"on_error,omitempty"`
}
type HookFailedError ¶
func (HookFailedError) Error ¶
func (e HookFailedError) Error() string
type HookProgress ¶
type HookProgress struct {
Phase HookPhase
Event Event
HookID string
WorkspaceName string
RepoName string
WorktreePath string
Reason string
Status RunStatus
LogPath string
Err error
}
HookProgress reports hook execution lifecycle updates.
type RunObserver ¶
type RunObserver interface {
OnHookProgress(progress HookProgress)
}
RunObserver can receive live hook progress events.
type RunRequest ¶
Click to show internal directories.
Click to hide internal directories.