mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Include proxy version in telemetry
This commit is contained in:
6
lib/entry-points.js
generated
6
lib/entry-points.js
generated
@@ -187528,7 +187528,7 @@ var toolcache4 = __toESM(require_tool_cache());
|
||||
|
||||
// src/start-proxy/status-report.ts
|
||||
var core23 = __toESM(require_core());
|
||||
async function sendSuccessStatusReport(startedAt, config, registry_types, logger2) {
|
||||
async function sendSuccessStatusReport(startedAt, config, registry_types, status, logger2) {
|
||||
const statusReportBase = await createStatusReportBase(
|
||||
"start-proxy" /* StartProxy */,
|
||||
"success",
|
||||
@@ -187540,7 +187540,8 @@ async function sendSuccessStatusReport(startedAt, config, registry_types, logger
|
||||
if (statusReportBase !== void 0) {
|
||||
const statusReport = {
|
||||
...statusReportBase,
|
||||
registry_types: registry_types.join(",")
|
||||
registry_types: registry_types.join(","),
|
||||
start_proxy: status
|
||||
};
|
||||
await sendStatusReport(statusReport);
|
||||
}
|
||||
@@ -188250,6 +188251,7 @@ async function run7(action) {
|
||||
languages: language === void 0 ? void 0 : [language]
|
||||
},
|
||||
proxyConfig.all_credentials.map((c) => c.type),
|
||||
{ proxy_version: proxyBin.version },
|
||||
logger2
|
||||
);
|
||||
} catch (unwrappedError) {
|
||||
|
||||
@@ -122,6 +122,7 @@ async function run(action: ActionState<["Base", "Logger", "Env", "Actions"]>) {
|
||||
languages: language === undefined ? undefined : [language],
|
||||
},
|
||||
proxyConfig.all_credentials.map((c) => c.type),
|
||||
{ proxy_version: proxyBin.version },
|
||||
logger,
|
||||
);
|
||||
} catch (unwrappedError) {
|
||||
|
||||
@@ -12,18 +12,30 @@ import {
|
||||
} from "../status-report";
|
||||
import * as util from "../util";
|
||||
|
||||
/** Additional status report data from `start-proxy`. */
|
||||
export interface StartProxyStatus {
|
||||
proxy_version: string;
|
||||
}
|
||||
|
||||
/** The type of successful status reports from `start-proxy`. */
|
||||
type StartProxySuccessReport = StatusReportBase & {
|
||||
start_proxy: StartProxyStatus;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sends a status report for the `start-proxy` action indicating a successful outcome.
|
||||
*
|
||||
* @param startedAt When the action was started.
|
||||
* @param config The configuration used.
|
||||
* @param registry_types The types of registries that are configured.
|
||||
* @param status Status information.
|
||||
* @param logger The logger to use.
|
||||
*/
|
||||
export async function sendSuccessStatusReport(
|
||||
startedAt: Date,
|
||||
config: Partial<Config>,
|
||||
registry_types: string[],
|
||||
status: StartProxyStatus,
|
||||
logger: Logger,
|
||||
) {
|
||||
const statusReportBase = await createStatusReportBase(
|
||||
@@ -35,9 +47,10 @@ export async function sendSuccessStatusReport(
|
||||
logger,
|
||||
);
|
||||
if (statusReportBase !== undefined) {
|
||||
const statusReport: StatusReportBase = {
|
||||
const statusReport: StartProxySuccessReport = {
|
||||
...statusReportBase,
|
||||
registry_types: registry_types.join(","),
|
||||
start_proxy: status,
|
||||
};
|
||||
await sendStatusReport(statusReport);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user