Skip to content

Commit

Permalink
Optionally send tools download telemetry (#1538)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelapwen authored Feb 13, 2023
1 parent e187d07 commit a25536b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
13 changes: 7 additions & 6 deletions lib/init-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init-action.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions src/init-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@ async function sendInitStatusReport(
workflow_languages: workflowLanguages || "",
};

let initToolsDownloadFields: InitToolsDownloadFields = {};
const initToolsDownloadFields: InitToolsDownloadFields = {};

if (toolsSource === ToolsSource.Download) {
initToolsDownloadFields = {
tools_download_duration_ms: toolsDownloadDurationMs,
tools_feature_flags_valid: toolsFeatureFlagsValid,
};
if (toolsDownloadDurationMs !== undefined) {
initToolsDownloadFields.tools_download_duration_ms =
toolsDownloadDurationMs;
}
if (toolsFeatureFlagsValid !== undefined) {
initToolsDownloadFields.tools_feature_flags_valid = toolsFeatureFlagsValid;
}

if (config !== undefined) {
Expand Down

0 comments on commit a25536b

Please sign in to comment.