ci

package
v1.14.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEventContext added in v1.14.0

func BuildEventContext(getenv func(string) string, readFile func(string) ([]byte, error)) *model.EventContext

BuildEventContext detects the current CI environment and returns a provider-neutral EventContext. Returns nil when no CI is detected.

func LoadEventContextFromFile added in v1.14.0

func LoadEventContextFromFile(path string) (*model.EventContext, error)

LoadEventContextFromFile reads a JSON file and unmarshals it into an EventContext.

Types

type DetectedRefs

type DetectedRefs struct {
	Provider  Provider
	EventType string
	Base      string
	Head      string
	Reason    string
	EnvVars   map[string]string
}

func DetectRefs

func DetectRefs(getenv func(string) string, readFile func(string) ([]byte, error)) DetectedRefs

type Provider

type Provider string
const (
	ProviderNone          Provider = ""
	ProviderGitHubActions Provider = "github-actions"
	ProviderGitLabCI      Provider = "gitlab-ci"
	ProviderBuildkite     Provider = "buildkite"
)

Jump to

Keyboard shortcuts

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