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

action

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package action is the GitHub Action entrypoint: it routes a workflow event to scoring or to the human-approval flip.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, env Env) (int, error)

Run handles one event and returns the job's exit code. In enforce mode it is non-zero for anything but approve, so a required job gates like the check run does.

Types

type Env

type Env struct {
	EventName string
	Event     []byte
	GH        *github.Client
	// NewDecider builds the model client once config is known. An error
	// becomes a needs-human result, not a crash.
	NewDecider    func(*config.Config) (jev.Decider, error)
	CommentAuthor string
	Log           io.Writer
	StepSummary   io.Writer // may be nil
	SetOutput     func(name, value string)
}

Env is everything Run needs from the runner.

Jump to

Keyboard shortcuts

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