fix feature flag check; omit context for generated context names (#638)

This commit is contained in:
eric sciple
2020-08-04 11:12:40 -04:00
committed by GitHub
parent 7b608e3e92
commit 7d4bbf46de
2 changed files with 5 additions and 14 deletions

View File

@@ -104,16 +104,7 @@ namespace GitHub.Runner.Worker
if (step is IActionRunner actionStep)
{
// Set GITHUB_ACTION
// Warning: Do not turn on FF DistributedTask.UseContextNameForGITHUBACTION until after M271-ish. After M271-ish
// the server will never send an empty context name. Generated context names start with "__"
if (step.ExecutionContext.Global.Variables.GetBoolean("DistributedTask.UseContextNameForGITHUBACTION") ?? false)
{
step.ExecutionContext.SetGitHubContext("action", actionStep.Action.Name);
}
else
{
step.ExecutionContext.SetGitHubContext("action", step.ExecutionContext.GetFullyQualifiedContextName());
}
step.ExecutionContext.SetGitHubContext("action", actionStep.Action.Name);
try
{