shell

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package shell implements a shell-based approver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Approver

type Approver struct {
	// Label is a human-friendly name.
	Label string
	// Command is the shell command to execute.
	Command string
	// Args are optional command arguments.
	Args []string
	// Env adds environment variables for the command.
	Env map[string]string
	// AllowExitCodes declares additional success exit codes.
	AllowExitCodes []int
}

Approver runs a shell command and decides based on exit code.

func (Approver) Approve

func (a Approver) Approve(ctx context.Context, req approver.Request) (approver.Decision, error)

Approve executes the shell command and returns an approval decision.

func (Approver) Name

func (a Approver) Name() string

Name returns approver name for audit and logging.

Jump to

Keyboard shortcuts

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