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

integrations

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package integrations provides functionality for integrating Stackit with external tools and hooks.

Package integrations provides functionality for integrating Stackit with external tools and hooks.

Package integrations provides functionality for integrating Stackit with external tools and hooks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrecommitInstallAction

func PrecommitInstallAction(deps Deps) error

PrecommitInstallAction installs the pre-commit hook

func PrecommitInstallActionWithOutput

func PrecommitInstallActionWithOutput(repoRoot string, writer io.Writer) error

PrecommitInstallActionWithOutput installs the pre-commit hook with a custom writer. This is a convenience function for use during init where we don't have full Deps.

func PrecommitUninstallAction

func PrecommitUninstallAction(deps Deps) error

PrecommitUninstallAction uninstalls the pre-commit hook

func PrecommitVerifyAction

func PrecommitVerifyAction(ctx context.Context, deps Deps) error

PrecommitVerifyAction checks if the current branch can be modified

func PrepushInstallAction

func PrepushInstallAction(deps Deps) error

PrepushInstallAction installs the pre-push hook

func PrepushUninstallAction

func PrepushUninstallAction(deps Deps) error

PrepushUninstallAction uninstalls the pre-push hook

func PrepushVerifyAction

func PrepushVerifyAction(deps Deps) error

PrepushVerifyAction verifies that branches being pushed are not locked. It reads the refs being pushed from stdin (git pre-push hook protocol).

func PrepushVerifyFromReader

func PrepushVerifyFromReader(deps Deps, reader io.Reader) error

PrepushVerifyFromReader verifies branches from a reader (for testing).

Types

type Deps added in v0.30.1

type Deps struct {
	Engine   Engine
	Out      output.Output
	RepoRoot string
}

Deps are the collaborators the hook integrations need. Adapters build them from their own runtime state; the actions never see bootstrap types.

type Engine added in v0.30.1

type Engine interface {
	engine.BranchLookup
	CurrentBranch(ctx context.Context) *engine.Branch
}

Engine lists exactly the engine methods the hook integrations call.

Jump to

Keyboard shortcuts

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