We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0cd2bd1 commit 5535064Copy full SHA for 5535064
1 file changed
main.go
@@ -54,6 +54,10 @@ func init() {
54
githubRepo = os.Getenv("GITHUB_REPO")
55
githubAPIEndpoint = os.Getenv("GITHUB_API")
56
57
+ if githubAPIEndpoint == "" {
58
+ githubAPIEndpoint = "https://api.github.com"
59
+ }
60
+
61
flag.BoolVar(&verFlag, "version", false, "-version")
62
flag.Parse()
63
}
@@ -113,7 +117,7 @@ Please refer to https://help.github.com/articles/creating-an-access-token-for-co
113
117
114
118
githubUser = userRepo[0]
115
119
githubRepo = userRepo[1]
116
- githubAPIEndpoint = fmt.Sprintf("https://api.github.com/repos/%s/%s", githubUser, githubRepo)
120
+ githubAPIEndpoint = fmt.Sprintf("%s/repos/%s/%s", githubAPIEndpoint, githubUser, githubRepo)
121
122
if debug {
123
log.Println("Glob pattern received: ")
0 commit comments