8000 Address PR comments · github/codeql-action@46dd699 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46dd699

Browse files
committed
Address PR comments
1 parent 7d707c9 commit 46dd699

File tree

3 files changed

+10
-24
lines changed

3 files changed

+10
-24
lines changed

lib/init-action.js

Lines changed: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/init-action.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ interface InitWithConfigStatusReport extends InitStatusReport {
8585
/** Fields of the init status report populated when the tools source is `download`. */
8686
interface InitToolsDownloadFields {
8787
/** Time taken to download the bundle, in milliseconds. */
88-
tools_download_duration_ms: number;
88+
tools_download_duration_ms?: number;
8989
/** Whether the relevant tools dotcom feature flags have been misconfigured. Only populated if we attempt to determine the default version based on FBC7 the dotcom feature flags. */
90-
tools_feature_flags_valid: boolean;
90+
tools_feature_flags_valid?: boolean;
9191
}
9292

9393
async function sendInitStatusReport(
9494
actionStatus: ActionStatus,
9595
startedAt: Date,
96-
config: configUtils.Config,
96+
config: configUtils.Config | undefined,
9797
toolsDownloadDurationMs: number | undefined,
9898
toolsFeatureFlagsValid: boolean | undefined,
9999
toolsSource: ToolsSource,
@@ -116,19 +116,12 @@ async function sendInitStatusReport(
116116
workflow_languages: workflowLanguages || "",
117117
};
118118

119-
let initToolsDownloadFields: InitToolsDownloadFields = {
120-
tools_download_duration_ms: -1, // Placeholder value in case field is undefined.
121-
tools_feature_flags_valid: false, // Report invalid in case field is undefined.
122-
};
119+
let initToolsDownloadFields: InitToolsDownloadFields = {};
123120

124121
if (toolsSource === ToolsSource.Download) {
125122
initToolsDownloadFields = {
126-
tools_download_duration_ms: toolsDownloadDurationMs
127-
? toolsDownloadDurationMs
128-
: -1,
129-
tools_feature_flags_valid: toolsFeatureFlagsValid
130-
? toolsFeatureFlagsValid
131-
: false,
123+
tools_download_duration_ms: toolsDownloadDurationMs,
124+
tools_feature_flags_valid: toolsFeatureFlagsValid,
132125
};
133126
}
134127

0 commit comments

Comments
 (0)
0