mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 15:20:29 +00:00
Fix API
This commit is contained in:
1 parent
113c3e98fb
commit
b9a9812ad9
2 files changed
+3
-2
No files matched your search
@@ -31,3 +31,4 @@ coverage.txt
|
||||
|
||||
# megalinter
|
||||
report/
|
||||
act
|
||||
@@ -591,11 +591,11 @@ func (rc *RunContext) withGithubEnv(ctx context.Context, github *model.GithubCon
|
||||
hasProtocol := strings.HasPrefix(rc.Config.GitHubInstance, "http://") || strings.HasPrefix(rc.Config.GitHubInstance, "https://")
|
||||
if hasProtocol {
|
||||
env["GITHUB_SERVER_URL"] = rc.Config.GitHubInstance
|
||||
env["GITHUB_API_URL"] = fmt.Sprintf("%s/api/v3", rc.Config.GitHubInstance) // FIXME: gitea is v1 not v3
|
||||
env["GITHUB_API_URL"] = fmt.Sprintf("%s/api/v1", rc.Config.GitHubInstance) // FIXME: gitea is v1 not v3
|
||||
env["GITHUB_GRAPHQL_URL"] = fmt.Sprintf("%s/api/graphql", rc.Config.GitHubInstance)
|
||||
} else {
|
||||
env["GITHUB_SERVER_URL"] = fmt.Sprintf("https://%s", rc.Config.GitHubInstance)
|
||||
env["GITHUB_API_URL"] = fmt.Sprintf("https://%s/api/v3", rc.Config.GitHubInstance)
|
||||
env["GITHUB_API_URL"] = fmt.Sprintf("https://%s/api/v1", rc.Config.GitHubInstance)
|
||||
env["GITHUB_GRAPHQL_URL"] = fmt.Sprintf("https://%s/api/graphql", rc.Config.GitHubInstance)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user