Renamed variable

This commit is contained in:
Tonye Jack 2023-05-23 00:39:36 -06:00
parent ccc8ec423b
commit 90ac7a910d
3 changed files with 7 additions and 7 deletions

6
dist/index.js generated vendored
View File

@ -543,10 +543,10 @@ exports.getEnv = void 0;
const fs_1 = __nccwpck_require__(7147);
const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
var _a, _b, _c, _d, _e, _f, _g, _h;
const eventJsonPath = process.env.GITHUB_EVENT_PATH;
const eventPath = process.env.GITHUB_EVENT_PATH;
let eventJson = {};
if (eventJsonPath) {
eventJson = JSON.parse(yield fs_1.promises.readFile(eventJsonPath, { encoding: 'utf8' }));
if (eventPath) {
eventJson = JSON.parse(yield fs_1.promises.readFile(eventPath, { encoding: 'utf8' }));
}
return {
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: ((_b = (_a = eventJson.pull_request) === null || _a === void 0 ? void 0 : _a.head) === null || _b === void 0 ? void 0 : _b.ref) || '',

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -15,11 +15,11 @@ export type Env = {
}
export const getEnv = async (): Promise<Env> => {
const eventJsonPath = process.env.GITHUB_EVENT_PATH
const eventPath = process.env.GITHUB_EVENT_PATH
let eventJson: any = {}
if (eventJsonPath) {
eventJson = JSON.parse(await fs.readFile(eventJsonPath, {encoding: 'utf8'}))
if (eventPath) {
eventJson = JSON.parse(await fs.readFile(eventPath, {encoding: 'utf8'}))
}
return {