mirror of
https://github.com/actions/runner.git
synced 2025-12-12 15:13:30 +00:00
Sending telemetry about actions usage. (#1688)
* Sending telemetry about actions usage. * . * L0 tests. * .
This commit is contained in:
@@ -22,7 +22,7 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
{
|
||||
public ScriptActionExecutionData Data { get; set; }
|
||||
|
||||
public override void PrintActionDetails(ActionRunStage stage)
|
||||
protected override void PrintActionDetails(ActionRunStage stage)
|
||||
{
|
||||
|
||||
if (stage == ActionRunStage.Post)
|
||||
@@ -145,13 +145,6 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
var githubContext = ExecutionContext.ExpressionValues["github"] as GitHubContext;
|
||||
ArgUtil.NotNull(githubContext, nameof(githubContext));
|
||||
|
||||
// Add Telemetry to JobContext to send with JobCompleteMessage
|
||||
if (stage == ActionRunStage.Main)
|
||||
{
|
||||
ExecutionContext.StepTelemetry.IsEmbedded = ExecutionContext.IsEmbedded;
|
||||
ExecutionContext.StepTelemetry.Type = "run";
|
||||
}
|
||||
|
||||
var tempDirectory = HostContext.GetDirectory(WellKnownDirectory.Temp);
|
||||
|
||||
Inputs.TryGetValue("script", out var contents);
|
||||
@@ -219,6 +212,11 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(shellCommand))
|
||||
{
|
||||
ExecutionContext.StepTelemetry.Action = shellCommand;
|
||||
}
|
||||
|
||||
// No arg format was given, shell must be a built-in
|
||||
if (string.IsNullOrEmpty(argFormat) || !argFormat.Contains("{0}"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user