Skip to content

Commit 2611d03

Browse files
committed
De-duplicate InitToolsDownloadFIelds definition
1 parent d02f50e commit 2611d03

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

src/init-action.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import { ToolsSource } from "./setup-codeql";
5656
import {
5757
ActionName,
5858
InitStatusReport,
59+
InitToolsDownloadFields,
5960
InitWithConfigStatusReport,
6061
createInitWithConfigStatusReport,
6162
createStatusReportBase,
@@ -86,16 +87,6 @@ import {
8687
} from "./util";
8788
import { validateWorkflow } from "./workflow";
8889

89-
/** Fields of the init status report populated when the tools source is `download`. */
90-
interface InitToolsDownloadFields {
91-
/** Time taken to download the bundle, in milliseconds. */
92-
tools_download_duration_ms?: number;
93-
/**
94-
* Whether the relevant tools dotcom feature flags have been misconfigured.
95-
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
96-
tools_feature_flags_valid?: boolean;
97-
}
98-
9990
async function sendCompletedStatusReport(
10091
startedAt: Date,
10192
config: configUtils.Config | undefined,

src/setup-codeql-action.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { ToolsSource } from "./setup-codeql";
1818
import {
1919
ActionName,
2020
InitStatusReport,
21+
InitToolsDownloadFields,
2122
createStatusReportBase,
2223
getActionsStatus,
2324
sendStatusReport,
@@ -35,16 +36,6 @@ import {
3536
getErrorMessage,
3637
} from "./util";
3738

38-
/** Fields of the init status report populated when the tools source is `download`. */
39-
interface InitToolsDownloadFields {
40-
/** Time taken to download the bundle, in milliseconds. */
41-
tools_download_duration_ms?: number;
42-
/**
43-
* Whether the relevant tools dotcom feature flags have been misconfigured.
44-
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
45-
tools_feature_flags_valid?: boolean;
46-
}
47-
4839
/**
4940
* Helper function to send a full status report for this action.
5041
*/

src/status-report.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,16 @@ export interface InitWithConfigStatusReport extends InitStatusReport {
517517
config_file: string;
518518
}
519519

520+
/** Fields of the init status report populated when the tools source is `download`. */
521+
export interface InitToolsDownloadFields {
522+
/** Time taken to download the bundle, in milliseconds. */
523+
tools_download_duration_ms?: number;
524+
/**
525+
* Whether the relevant tools dotcom feature flags have been misconfigured.
526+
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
527+
tools_feature_flags_valid?: boolean;
528+
}
529+
520530
/**
521531
* Composes a `InitWithConfigStatusReport` from the given values.
522532
*

0 commit comments

Comments
 (0)