@@ -245,7 +245,7 @@ class Utils {
245245 return Utils . SETUP_JFROG_CLI_SERVER_ID ;
246246 }
247247 static setCliEnv ( ) {
248- var _a , _b , _c , _d , _e ;
248+ var _a , _b , _c , _d , _e , _f , _g , _h , _j ;
249249 Utils . exportVariableIfNotSet ( 'JFROG_CLI_ENV_EXCLUDE' , '*password*;*secret*;*key*;*token*;*auth*;JF_ARTIFACTORY_*;JF_ENV_*;JF_URL;JF_USER;JF_PASSWORD;JF_ACCESS_TOKEN' ) ;
250250 Utils . exportVariableIfNotSet ( 'JFROG_CLI_OFFER_CONFIG' , 'false' ) ;
251251 Utils . exportVariableIfNotSet ( 'CI' , 'true' ) ;
@@ -274,6 +274,14 @@ class Utils {
274274 }
275275 // Indicate if JF_GIT_TOKEN is provided as an environment variable, used by Xray usage.
276276 Utils . exportVariableIfNotSet ( 'JFROG_CLI_USAGE_GH_TOKEN_FOR_CODE_SCANNING_ALERTS_PROVIDED' , ( _e = process . env . JF_GIT_TOKEN ) !== null && _e !== void 0 ? _e : '' ) ;
277+ Utils . exportVariableIfNotSet ( 'JFROG_CLI_CI_VCS_REVISION' , ( _g = ( _f = process . env . GITHUB_SHA ) !== null && _f !== void 0 ? _f : '' ) !== null && _g !== void 0 ? _g : '' ) ;
278+ Utils . exportVariableIfNotSet ( 'JFROG_CLI_CI_BRANCH' , ( _j = ( _h = process . env . GITHUB_REF_NAME ) !== null && _h !== void 0 ? _h : '' ) !== null && _j !== void 0 ? _j : '' ) ;
279+ Utils . exportVariableIfNotSet ( 'JFROG_CLI_CI_VCS_URL' , Utils . buildVcsUrl ( ) ) ;
280+ }
281+ static buildVcsUrl ( ) {
282+ const serverUrl = process . env . GITHUB_SERVER_URL ;
283+ const repo = process . env . GITHUB_REPOSITORY ;
284+ return serverUrl && repo ? `${ serverUrl } /${ repo } ` : '' ;
277285 }
278286 static exportVariableIfNotSet ( key , value ) {
279287 if ( ! process . env [ key ] ) {
0 commit comments