From bb580e079b168455ff4d9416e50c29bd894e2af1 Mon Sep 17 00:00:00 2001 From: Darpan Lalwani Date: Thu, 19 Sep 2024 15:43:49 +0530 Subject: [PATCH] logs for direct instead of input --- setup-env/dist/index.js | 8 +++++++- setup-env/src/actionInput/index.js | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/setup-env/dist/index.js b/setup-env/dist/index.js index ca998de..dca8901 100644 --- a/setup-env/dist/index.js +++ b/setup-env/dist/index.js @@ -9332,9 +9332,10 @@ function wrappy (fn, cb) { const core = __nccwpck_require__(2186); const axios = __nccwpck_require__(8757); +const github = __nccwpck_require__(5438); const InputValidator = __nccwpck_require__(4881); const constants = __nccwpck_require__(1468); -const {BROWSERSTACK_TEMPLATE} = __nccwpck_require__(1468); +const { BROWSERSTACK_TEMPLATE} = __nccwpck_require__(1468); const { INPUT, @@ -9409,6 +9410,11 @@ class ActionInput { core.info(`${ENV_VARS.BROWSERSTACK_BUILD_NAME} environment variable set as: ${this.buildName}`); core.info(`Use ${ENV_VARS.BROWSERSTACK_BUILD_NAME} environment variable for your build name capability in your tests\n`); + const runIdDirect = process.env.GITHUB_RUN_ID; + const rerunAttemptDirect = process.env.GITHUB_RUN_ATTEMPT; + const repositoryDirect = github.context.repo.repo; + core.info(`Direct values are - runIdDirect: ${runIdDirect}, rerunAttemptDirect: ${rerunAttemptDirect}, repositoryDirect: ${repositoryDirect}`); + core.info(`Values of Bstack creds are: username - ${this.username}, accessKey - ${this.accessKey}`); core.info(`Values of extractable vars are: rerunAttempt - ${this.rerunAttempt}, runId - ${this.runId}, repository - ${this.repository}`); core.info(`Values of mandatory parms are: github_token - ${this.githubToken}, githubApp - ${this.githubApp}`); diff --git a/setup-env/src/actionInput/index.js b/setup-env/src/actionInput/index.js index 0a8832f..135ace9 100644 --- a/setup-env/src/actionInput/index.js +++ b/setup-env/src/actionInput/index.js @@ -1,8 +1,9 @@ const core = require('@actions/core'); const axios = require('axios'); +const github = require('@actions/github'); const InputValidator = require('./inputValidator'); const constants = require('../../config/constants'); -const {BROWSERSTACK_TEMPLATE} = require("../../config/constants"); +const { BROWSERSTACK_TEMPLATE} = require("../../config/constants"); const { INPUT, @@ -77,6 +78,11 @@ class ActionInput { core.info(`${ENV_VARS.BROWSERSTACK_BUILD_NAME} environment variable set as: ${this.buildName}`); core.info(`Use ${ENV_VARS.BROWSERSTACK_BUILD_NAME} environment variable for your build name capability in your tests\n`); + const runIdDirect = process.env.GITHUB_RUN_ID; + const rerunAttemptDirect = process.env.GITHUB_RUN_ATTEMPT; + const repositoryDirect = github.context.repo.repo; + core.info(`Direct values are - runIdDirect: ${runIdDirect}, rerunAttemptDirect: ${rerunAttemptDirect}, repositoryDirect: ${repositoryDirect}`); + core.info(`Values of Bstack creds are: username - ${this.username}, accessKey - ${this.accessKey}`); core.info(`Values of extractable vars are: rerunAttempt - ${this.rerunAttempt}, runId - ${this.runId}, repository - ${this.repository}`); core.info(`Values of mandatory parms are: github_token - ${this.githubToken}, githubApp - ${this.githubApp}`);