Skip to content

Commit cdf489e

Browse files
feat: add support for travis enterprise
1 parent 1c016a9 commit cdf489e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

condition/travis.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ func Travis(token, defaultBranch string, private bool) error {
4242
}
4343

4444
endpoint := travis.TRAVIS_API_DEFAULT_URL
45-
if private {
45+
if travisHost := os.Getenv("TRAVIS_ENTERPRISE_HOST"); travisHost != "" {
46+
logger.Printf("Using Travis CI enterprise host: %s\n", travisHost)
47+
endpoint = fmt.Sprintf("https://%s/api/", travisHost)
48+
} else if private {
4649
logger.Println("repo is private")
4750
endpoint = travis.TRAVIS_API_PRO_URL
4851
}

0 commit comments

Comments
 (0)