ci

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Branch      = gitRefType("branch")
	Tag         = gitRefType("tag")
	PullRequest = gitRefType("pull_request")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Introspector

type Introspector interface {
	// Returns the URL of the repository for which the CI job is running
	GetRepositoryURL() (url.URL, error)

	// Returns the repository name for which the CI job is running
	GetRepositoryName() (string, error)

	// Returns the event that triggered the CI job
	GetEvent() (gitRefType, error)

	// Returns the GitRef for which the CI job is running
	// This is fulled formed e.g. refs/heads/master
	GetGitRef() (string, error)

	// Get the ref name for which the CI job is running
	// This is the short form of the GitRef e.g. master
	GetRefName() (string, error)

	// Get the git ref type for which the CI job is running
	GetRefType() (string, error)

	// GitSHA returns the commit SHA for which the CI job is running
	GetGitSHA() (string, error)
}

Introspector defines a contract for implementing runtime information collector from various CI environments. This is modeled based on the default environments in GHA. But we will keep this minimal and add extended interfaces for additional CI specific information. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables

Jump to

Keyboard shortcuts

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