Renamed variable
This commit is contained in:
parent
ccc8ec423b
commit
90ac7a910d
6
dist/index.js
generated
vendored
6
dist/index.js
generated
vendored
@ -543,10 +543,10 @@ exports.getEnv = void 0;
|
|||||||
const fs_1 = __nccwpck_require__(7147);
|
const fs_1 = __nccwpck_require__(7147);
|
||||||
const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
|
const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
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 = {};
|
let eventJson = {};
|
||||||
if (eventJsonPath) {
|
if (eventPath) {
|
||||||
eventJson = JSON.parse(yield fs_1.promises.readFile(eventJsonPath, { encoding: 'utf8' }));
|
eventJson = JSON.parse(yield fs_1.promises.readFile(eventPath, { encoding: 'utf8' }));
|
||||||
}
|
}
|
||||||
return {
|
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) || '',
|
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
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -15,11 +15,11 @@ export type Env = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getEnv = async (): Promise<Env> => {
|
export const getEnv = async (): Promise<Env> => {
|
||||||
const eventJsonPath = process.env.GITHUB_EVENT_PATH
|
const eventPath = process.env.GITHUB_EVENT_PATH
|
||||||
let eventJson: any = {}
|
let eventJson: any = {}
|
||||||
|
|
||||||
if (eventJsonPath) {
|
if (eventPath) {
|
||||||
eventJson = JSON.parse(await fs.readFile(eventJsonPath, {encoding: 'utf8'}))
|
eventJson = JSON.parse(await fs.readFile(eventPath, {encoding: 'utf8'}))
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user