Skip to content

Commit 33b2a7b

Browse files
committed
Use GitClient in the GitHub Release Source to support GitHub enterprise
1 parent a0544f5 commit 33b2a7b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

internal/component/github_release_source.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ func NewGithubReleaseSource(c cargo.ReleaseSourceConfig) *GithubReleaseSource {
4343
if c.Org == "" {
4444
panic("no github org passed for github release source")
4545
}
46-
githubClient, err := gh.Client(context.TODO(), c.GithubToken)
46+
47+
// The GitClient should be initialized with the proper host according to
48+
// the release repository URL instead. This function doesn't have access
49+
// to each release, so this will do for now.
50+
//
51+
host := ""
52+
if c.Org == "TNZ" {
53+
host = "https://github.gwd.broadcom.net"
54+
}
55+
56+
githubClient, err := gh.GitClient(context.TODO(), host, c.GithubToken, c.GithubToken)
4757
if err != nil {
4858
panic(err)
4959
}

0 commit comments

Comments
 (0)