mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 01:27:22 +00:00
Rename TEST_MODE to specific variable for CodeQL Action
This allows us to set it automatically in the workflow generator, simplifying things and reducing the scope for error.
This commit is contained in:
@@ -8,3 +8,6 @@ export const CODEQL_WORKFLOW_STARTED_AT = "CODEQL_WORKFLOW_STARTED_AT";
|
||||
|
||||
export const CODEQL_ACTION_TESTING_ENVIRONMENT =
|
||||
"CODEQL_ACTION_TESTING_ENVIRONMENT";
|
||||
|
||||
/** Used to disable uploading SARIF results or status reports to the GitHub API */
|
||||
export const CODEQL_ACTION_TEST_MODE = "CODEQL_ACTION_TEST_MODE";
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
import { Feature, FeatureEnablement } from "./feature-flags";
|
||||
import { Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
import { CODEQL_ACTION_TEST_MODE } from "./shared-environment";
|
||||
|
||||
/**
|
||||
* Specifies bundle versions that are known to be broken
|
||||
@@ -664,7 +665,7 @@ export async function checkActionVersion(version: string) {
|
||||
* In test mode, we don't upload SARIF results or status reports to the GitHub API.
|
||||
*/
|
||||
export function isInTestMode(): boolean {
|
||||
return process.env["TEST_MODE"] === "true";
|
||||
return process.env[CODEQL_ACTION_TEST_MODE] === "true";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user