Skip to content

Commit

Permalink
fix: ghc assignment typo (nektos#1729)
Browse files Browse the repository at this point in the history
* fix: ghc assignment typo

* fixup server_url
  • Loading branch information
ChristopherHX authored Apr 13, 2023
1 parent d70b225 commit 97749a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/model/github_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type GithubContext struct {
RetentionDays string `json:"retention_days"`
RunnerPerflog string `json:"runner_perflog"`
RunnerTrackingID string `json:"runner_tracking_id"`
ServerURL string `json:"server_url "`
ServerURL string `json:"server_url"`
APIURL string `json:"api_url"`
GraphQLURL string `json:"graphql_url"`
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/runner/run_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ func (rc *RunContext) getGithubContext(ctx context.Context) *model.GithubContext
ghc.ServerURL = rc.Config.Env["GITHUB_SERVER_URL"]
}
if rc.Config.Env["GITHUB_API_URL"] != "" {
ghc.ServerURL = rc.Config.Env["GITHUB_API_URL"]
ghc.APIURL = rc.Config.Env["GITHUB_API_URL"]
}
if rc.Config.Env["GITHUB_GRAPHQL_URL"] != "" {
ghc.ServerURL = rc.Config.Env["GITHUB_GRAPHQL_URL"]
ghc.GraphQLURL = rc.Config.Env["GITHUB_GRAPHQL_URL"]
}

return ghc
Expand Down

0 comments on commit 97749a2

Please sign in to comment.