MCPcopy Index your code
hub / github.com/cli/cli / IsCI

Function IsCI

internal/ci/ci.go:8–12  ·  view source on GitHub ↗

IsCI determines if the current execution context is within a known CI/CD system. This is based on https://github.com/watson/ci-info/blob/HEAD/index.js.

()

Source from the content-addressed store, hash-verified

6// IsCI determines if the current execution context is within a known CI/CD system.
7// This is based on https://github.com/watson/ci-info/blob/HEAD/index.js.
8func IsCI() bool {
9 return os.Getenv("CI") != "" || // GitHub Actions, Travis CI, CircleCI, Cirrus CI, GitLab CI, AppVeyor, CodeShip, dsari
10 os.Getenv("BUILD_NUMBER") != "" || // Jenkins, TeamCity
11 os.Getenv("RUN_ID") != "" // TaskCluster, dsari
12}
13
14// IsGitHubActions determines if the current execution context is within GitHub Actions.
15// GitHub Actions sets the GITHUB_ACTIONS environment variable to "true" for all steps.

Callers 6

runCopilotFunction · 0.92
officialExtensionStubRunFunction · 0.92
MainFunction · 0.92
ShouldCheckForUpdateFunction · 0.92
TestIsCIFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsCIFunction · 0.68