Skip to content

Commit

Permalink
Trying rerun attempt from context
Browse files Browse the repository at this point in the history
  • Loading branch information
darpanLalwani committed Sep 23, 2024
1 parent ae4e43a commit e788407
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions setup-env/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9330,10 +9330,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_INTEGRATIONS } = __nccwpck_require__(1468);
const github = __nccwpck_require__(5438);

const {
INPUT,
Expand Down Expand Up @@ -9368,7 +9368,9 @@ class ActionInput {
this.rerunAttempt = process?.env?.GITHUB_RUN_ATTEMPT;
this.runId = process?.env?.GITHUB_RUN_ID;
this.repository = `${github?.context?.repo?.owner}/${github?.context?.repo?.repo}`;
core.info(`Darpan the github object has - ${JSON.stringify(github.context)}`);
// core.info(`Darpan the github object has - ${JSON.stringify(github.context)}`);
const rerunAttempt = github.context?.payload?.workflow_run?.rerun_attempt;
core.info(`Darpan rerunAttempt - ${rerunAttempt}`);
} catch (e) {
throw Error(`Action input failed for reason: ${e.message}`);
}
Expand Down
6 changes: 4 additions & 2 deletions setup-env/src/actionInput/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +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_INTEGRATIONS } = require("../../config/constants");
const github = require("@actions/github");

const {
INPUT,
Expand Down Expand Up @@ -38,7 +38,9 @@ class ActionInput {
this.rerunAttempt = process?.env?.GITHUB_RUN_ATTEMPT;
this.runId = process?.env?.GITHUB_RUN_ID;
this.repository = `${github?.context?.repo?.owner}/${github?.context?.repo?.repo}`;
core.info(`Darpan the github object has - ${JSON.stringify(github.context)}`);
// core.info(`Darpan the github object has - ${JSON.stringify(github.context)}`);
const rerunAttempt = github.context?.payload?.workflow_run?.rerun_attempt;
core.info(`Darpan rerunAttempt - ${rerunAttempt}`);
} catch (e) {
throw Error(`Action input failed for reason: ${e.message}`);
}
Expand Down

0 comments on commit e788407

Please sign in to comment.