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

View File

@@ -131,7 +131,7 @@ namespace GitHub.Runner.Worker
// Temporary hack for GHES alpha // Temporary hack for GHES alpha
var configurationStore = HostContext.GetService<IConfigurationStore>(); var configurationStore = HostContext.GetService<IConfigurationStore>();
var runnerSettings = configurationStore.GetSettings(); 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 url = new Uri(runnerSettings.GitHubUrl);
var portInfo = url.IsDefaultPort ? string.Empty : $":{url.Port.ToString(CultureInfo.InvariantCulture)}"; var portInfo = url.IsDefaultPort ? string.Empty : $":{url.Port.ToString(CultureInfo.InvariantCulture)}";