diff --git a/src/utils.ts b/src/utils.ts index 4b798ff3f..607a3e261 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -522,17 +522,17 @@ export class Utils { Utils.setUsageEnvVars() } - + // Set usage variables to be captured by JFrog CLI visibility metric service. public static setUsageEnvVars(): void { - // Set the GitHub repository name or default to an empty string. - core.exportVariable('JFROG_CLI_USAGE_GIT_REPO', process.env.GITHUB_REPOSITORY ?? ''); - // Set the GitHub workflow name or default to an empty string. - core.exportVariable('JFROG_CLI_USAGE_JOB_ID', process.env.GITHUB_WORKFLOW ?? ''); - // Set the GitHub run ID or default to an empty string. - core.exportVariable('JFROG_CLI_USAGE_RUN_ID', process.env.GITHUB_RUN_ID ?? ''); - // Indicate if JF_GIT_TOKEN is provided as an environment variable. - core.exportVariable('JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED', !!process.env.JF_GIT_TOKEN); + // Set the GitHub repository name or default to an empty string. + core.exportVariable('JFROG_CLI_USAGE_GIT_REPO', process.env.GITHUB_REPOSITORY ?? ''); + // Set the GitHub workflow name or default to an empty string. + core.exportVariable('JFROG_CLI_USAGE_JOB_ID', process.env.GITHUB_WORKFLOW ?? ''); + // Set the GitHub run ID or default to an empty string. + core.exportVariable('JFROG_CLI_USAGE_RUN_ID', process.env.GITHUB_RUN_ID ?? ''); + // Indicate if JF_GIT_TOKEN is provided as an environment variable. + core.exportVariable('JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED', !!process.env.JF_GIT_TOKEN); } /**