Documentation
¶
Index ¶
- func Checkout(repoPath string, event protocol.EventMsg) error
- func EnsureRepo(reposDir, repoName, cloneURL string) (string, error)
- func Run(ctx context.Context, cfg Config)
- func RunHook(ctx context.Context, repoPath, hook string, event protocol.EventMsg) error
- func RunHookWithOutput(ctx context.Context, repoPath, hook string, event protocol.EventMsg) (string, error)
- type Config
- type EventHooks
- type EventicConfig
- type HookSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureRepo ¶
EnsureRepo clones the repo if it doesn't exist, or fetches if it does.
Types ¶
type EventHooks ¶
EventHooks defines pre/post hooks for a specific event or event.action.
type EventicConfig ¶
type EventicConfig struct {
Hooks struct {
Pre string `yaml:"pre"`
Post string `yaml:"post"`
} `yaml:"hooks"`
Events map[string]EventHooks `yaml:"events"`
}
EventicConfig is the in-repo .eventic.yaml format.
Example:
hooks:
pre: "echo preparing..."
post: "echo done"
events:
push:
post: "bruce install .deploy/deploy.yml"
pull_request:
post: "make lint"
pull_request.opened:
post: "claude -p 'Review this PR' --headless"
pull_request.synchronize:
post: "make test"
release.published:
post: "/opt/scripts/notify-release.sh"
workflow_run.completed:
post: "/opt/scripts/on-build-failure.sh"
issues.opened:
post: "claude -p 'Triage this issue' --headless"
check_suite.completed:
post: "/opt/scripts/check-status.sh"
deployment_status:
post: "/opt/scripts/deploy-status.sh"
Click to show internal directories.
Click to hide internal directories.