post-alpha fixes for github.url github.api_url and github.graphql_url (#451)

This commit is contained in:
eric sciple
2020-04-24 13:38:59 -04:00
committed by GitHub
parent f798f5606b
commit 2fadf430e4
2 changed files with 4 additions and 3 deletions

View File

@@ -10,10 +10,11 @@ namespace GitHub.Runner.Worker
{
"action",
"actor",
"api_url", // temp for GHES alpha release
"api_url",
"base_ref",
"event_name",
"event_path",
"graphql_url",
"head_ref",
"job",
"ref",
@@ -22,7 +23,7 @@ namespace GitHub.Runner.Worker
"run_id",
"run_number",
"sha",
"url", // temp for GHES alpha release
"url",
"workflow",
"workspace",
};

View File

@@ -131,7 +131,7 @@ namespace GitHub.Runner.Worker
// 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)}";