fix: bug with errors from fork prs (#1239)

Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Tonye Jack
2023-06-07 18:29:48 -06:00
committed by GitHub
parent c784b6f1c4
commit e208eb429a
3 changed files with 11 additions and 9 deletions

10
dist/index.js generated vendored
View File

@@ -573,7 +573,7 @@ exports.getEnv = void 0;
const fs_1 = __nccwpck_require__(7147);
const core = __importStar(__nccwpck_require__(2186));
const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
const eventPath = process.env.GITHUB_EVENT_PATH;
let eventJson = {};
if (eventPath) {
@@ -587,10 +587,10 @@ const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
GITHUB_EVENT_BEFORE: eventJson.before || '',
GITHUB_EVENT_BASE_REF: eventJson.base_ref || '',
GITHUB_EVENT_RELEASE_TARGET_COMMITISH: ((_e = eventJson.release) === null || _e === void 0 ? void 0 : _e.target_commitish) || '',
GITHUB_EVENT_HEAD_REPO_FORK: ((_f = eventJson.head_repo) === null || _f === void 0 ? void 0 : _f.fork) || '',
GITHUB_EVENT_PULL_REQUEST_NUMBER: ((_g = eventJson.pull_request) === null || _g === void 0 ? void 0 : _g.number) || '',
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ((_j = (_h = eventJson.pull_request) === null || _h === void 0 ? void 0 : _h.base) === null || _j === void 0 ? void 0 : _j.sha) || '',
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ((_l = (_k = eventJson.pull_request) === null || _k === void 0 ? void 0 : _k.head) === null || _l === void 0 ? void 0 : _l.sha) || '',
GITHUB_EVENT_HEAD_REPO_FORK: ((_g = (_f = eventJson.head) === null || _f === void 0 ? void 0 : _f.repo) === null || _g === void 0 ? void 0 : _g.fork) || '',
GITHUB_EVENT_PULL_REQUEST_NUMBER: ((_h = eventJson.pull_request) === null || _h === void 0 ? void 0 : _h.number) || '',
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ((_k = (_j = eventJson.pull_request) === null || _j === void 0 ? void 0 : _j.base) === null || _k === void 0 ? void 0 : _k.sha) || '',
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ((_m = (_l = eventJson.pull_request) === null || _l === void 0 ? void 0 : _l.head) === null || _m === void 0 ? void 0 : _m.sha) || '',
GITHUB_EVENT_FORCED: eventJson.forced || '',
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',
GITHUB_REF: process.env.GITHUB_REF || '',