Help us shape the future of Go! Take the 2026 Go Developer Survey

hooks

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package hooks provides a hook system for extensibility. Hooks are executable scripts in .beads/hooks/ that run after certain events.

Index

Constants

View Source
const (
	EventCreate = "create"
	EventUpdate = "update"
	EventClose  = "close"
)

Event types

View Source
const (
	HookOnCreate = "on_create"
	HookOnUpdate = "on_update"
	HookOnClose  = "on_close"
)

Hook file names

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

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

Runner handles hook execution

func NewRunner

func NewRunner(hooksDir string) *Runner

NewRunner creates a new hook runner. hooksDir is typically .beads/hooks/ relative to workspace root.

func NewRunnerFromWorkspace

func NewRunnerFromWorkspace(workspaceRoot string) *Runner

NewRunnerFromWorkspace creates a hook runner for a workspace.

func (*Runner) HookExists

func (r *Runner) HookExists(event string) bool

HookExists checks if a hook exists for an event

func (*Runner) Run

func (r *Runner) Run(event string, issue *types.Issue)

Run executes a hook if it exists. Runs asynchronously - returns immediately, hook runs in background.

func (*Runner) RunSync

func (r *Runner) RunSync(event string, issue *types.Issue) error

RunSync executes a hook synchronously and returns any error. Useful for testing or when you need to wait for the hook.

Jump to

Keyboard shortcuts

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