Skip to content

Commit

Permalink
post-alpha fixes for github.url github.api_url and github.graphql_url (
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsciple authored Apr 24, 2020
1 parent f798f56 commit 2fadf43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Runner.Worker/GitHubContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ public sealed class GitHubContext : DictionaryContextData, IEnvironmentContextDa
{
"action",
"actor",
"api_url", // temp for GHES alpha release
"api_url",
"base_ref",
"event_name",
"event_path",
"graphql_url",
"head_ref",
"job",
"ref",
Expand All @@ -22,7 +23,7 @@ public sealed class GitHubContext : DictionaryContextData, IEnvironmentContextDa
"run_id",
"run_number",
"sha",
"url", // temp for GHES alpha release
"url",
"workflow",
"workspace",
};
Expand Down
2 changes: 1 addition & 1 deletion src/Runner.Worker/JobExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public async Task<List<IStep>> InitializeJob(IExecutionContext jobContext, Pipel
// Temporary hack for GHES alpha
var configurationStore = HostContext.GetService<IConfigurationStore>();
var runnerSettings = configurationStore.GetSettings();
if (!runnerSettings.IsHostedServer && !string.IsNullOrEmpty(runnerSettings.GitHubUrl))
if (string.IsNullOrEmpty(context.GetGitHubContext("url")) && !runnerSettings.IsHostedServer && !string.IsNullOrEmpty(runnerSettings.GitHubUrl))
{
var url = new Uri(runnerSettings.GitHubUrl);
var portInfo = url.IsDefaultPort ? string.Empty : $":{url.Port.ToString(CultureInfo.InvariantCulture)}";
Expand Down

0 comments on commit 2fadf43

Please sign in to comment.