Skip to content

Commit

Permalink
Fix core imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Beamanator committed Apr 4, 2024
1 parent 3b15f92 commit 094b66a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import core from '@actions/core';
import * as core from '@actions/core';
import format from 'date-fns/format';
import fs from 'fs';
import CONST from '@github/libs/CONST';
Expand Down
27 changes: 25 additions & 2 deletions .github/actions/javascript/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14181,11 +14181,34 @@ function wrappy (fn, cb) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core_1 = __importDefault(__nccwpck_require__(2186));
const core = __importStar(__nccwpck_require__(2186));
const format_1 = __importDefault(__nccwpck_require__(2168));
const fs_1 = __importDefault(__nccwpck_require__(7147));
const CONST_1 = __importDefault(__nccwpck_require__(9873));
Expand Down Expand Up @@ -14299,7 +14322,7 @@ async function run() {
}
catch (err) {
console.error('An unknown error occurred!', err);
core_1.default.setFailed(err);
core.setFailed(err);
}
}
if (require.main === require.cache[eval('__filename')]) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import core from '@actions/core';
import * as core from '@actions/core';
import github from '@actions/github';
import {getJSONInput} from '@github/libs/ActionUtils';
import GithubUtils from '@github/libs/GithubUtils';
Expand Down
31 changes: 27 additions & 4 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11470,18 +11470,41 @@ function wrappy (fn, cb) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core_1 = __importDefault(__nccwpck_require__(2186));
const core = __importStar(__nccwpck_require__(2186));
const github_1 = __importDefault(__nccwpck_require__(5438));
const ActionUtils_1 = __nccwpck_require__(6981);
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296));
const GitUtils_1 = __importDefault(__nccwpck_require__(1547));
async function run() {
try {
const inputTag = core_1.default.getInput('TAG', { required: true });
const inputTag = core.getInput('TAG', { required: true });
const isProductionDeploy = (0, ActionUtils_1.getJSONInput)('IS_PRODUCTION_DEPLOY', { required: false }, false);
const deployEnv = isProductionDeploy ? 'production' : 'staging';
console.log(`Looking for PRs deployed to ${deployEnv} in ${inputTag}...`);
Expand All @@ -11497,11 +11520,11 @@ async function run() {
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils_1.default.getPullRequestsMergedBetween(priorTag ?? '', inputTag);
console.log('Found the pull request list: ', prList);
core_1.default.setOutput('PR_LIST', prList);
core.setOutput('PR_LIST', prList);
}
catch (error) {
console.error(error.message);
core_1.default.setFailed(error);
core.setFailed(error);
}
}
if (require.main === require.cache[eval('__filename')]) {
Expand Down

0 comments on commit 094b66a

Please sign in to comment.