@@ -451,21 +451,17 @@ class Utils {
451451 }
452452 Utils . setUsageEnvVars ( ) ;
453453 }
454- // Set usage variables to be captured by JFrog CLI.
454+ // Set usage variables to be captured by JFrog CLI visibility metric service .
455455 static setUsageEnvVars ( ) {
456- // Repository name, defaulting to an empty string if undefined.
457- const repoName = process . env . GITHUB_REPOSITORY || '' ;
458- // Workflow name, defaulting to an empty string if undefined.
459- const jobId = process . env . GITHUB_WORKFLOW || '' ;
460- // Run ID, defaulting to an empty string if undefined.
461- const runId = process . env . GITHUB_RUN_ID || '' ;
462- // Boolean flag indicating if JF_GIT_TOKEN is set.
463- const jfGitTokenSet = ! ! process . env . JF_GIT_TOKEN ;
464- // Export environment variables for JFrog CLI usage.
465- core . exportVariable ( 'JFROG_CLI_USAGE_JOB_ID' , jobId ) ;
466- core . exportVariable ( 'JFROG_CLI_USAGE_RUN_ID' , runId ) ;
467- core . exportVariable ( 'JFROG_CLI_USAGE_GIT_REPO' , repoName ) ;
468- core . exportVariable ( 'JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED' , jfGitTokenSet ) ;
456+ var _a , _b , _c ;
457+ // Set the GitHub repository name or default to an empty string.
458+ core . exportVariable ( 'JFROG_CLI_USAGE_GIT_REPO' , ( _a = process . env . GITHUB_REPOSITORY ) !== null && _a !== void 0 ? _a : '' ) ;
459+ // Set the GitHub workflow name or default to an empty string.
460+ core . exportVariable ( 'JFROG_CLI_USAGE_JOB_ID' , ( _b = process . env . GITHUB_WORKFLOW ) !== null && _b !== void 0 ? _b : '' ) ;
461+ // Set the GitHub run ID or default to an empty string.
462+ core . exportVariable ( 'JFROG_CLI_USAGE_RUN_ID' , ( _c = process . env . GITHUB_RUN_ID ) !== null && _c !== void 0 ? _c : '' ) ;
463+ // Indicate if JF_GIT_TOKEN is provided as an environment variable.
464+ core . exportVariable ( 'JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED' , ! ! process . env . JF_GIT_TOKEN ) ;
469465 }
470466 /**
471467 * Enabling job summary is done by setting the output dir for the summaries.
0 commit comments