Actions status report: Send testing_environment.

The testing environment is taken from the environment variable
CODEQL_ACTION_TESTING_ENVIRONMENT.
This commit is contained in:
Cornelius Riemenschneider 2022-10-25 13:52:31 +02:00
parent 7e2585030f
commit 4b73c4f99e
3 changed files with 12 additions and 1 deletions

2
lib/actions-util.js generated
View file

@ -502,6 +502,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
const runnerOs = (0, util_1.getRequiredEnvParam)("RUNNER_OS");
const codeQlCliVersion = (0, util_1.getCachedCodeQlVersion)();
const actionRef = process.env["GITHUB_ACTION_REF"];
const testingEnvironment = process.env["CODEQL_ACTION_TESTING_ENVIRONMENT"] || "";
const statusReport = {
workflow_run_id: workflowRunID,
workflow_name: workflowName,
@ -515,6 +516,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, cause
started_at: workflowStartedAt,
action_started_at: actionStartedAt.toISOString(),
status,
testing_environment: testingEnvironment,
runner_os: runnerOs,
action_version: pkg.version,
};

File diff suppressed because one or more lines are too long

View file

@ -600,6 +600,12 @@ export interface StatusReportBase {
completed_at?: string;
/** State this action is currently in. */
status: ActionStatus;
/**
* Testing environment: Set if non-production environment.
* The server accepts one of the following values:
* ["", "qa-rc", "qa-rc-1", "qa-rc-2", "qa-experiment-1", "qa-experiment-2", "qa-experiment-3"].
*/
testing_environment: string;
/**
* Information about the enablement of the ML-powered JS query pack.
*
@ -675,6 +681,8 @@ export async function createStatusReportBase(
const runnerOs = getRequiredEnvParam("RUNNER_OS");
const codeQlCliVersion = getCachedCodeQlVersion();
const actionRef = process.env["GITHUB_ACTION_REF"];
const testingEnvironment =
process.env["CODEQL_ACTION_TESTING_ENVIRONMENT"] || "";
const statusReport: StatusReportBase = {
workflow_run_id: workflowRunID,
@ -689,6 +697,7 @@ export async function createStatusReportBase(
started_at: workflowStartedAt,
action_started_at: actionStartedAt.toISOString(),
status,
testing_environment: testingEnvironment,
runner_os: runnerOs,
action_version: pkg.version,
};