@@ -28864,7 +28864,7 @@ function wrappy (fn, cb) {
2886428864
2886528865/***/ }),
2886628866
28867- /***/ 6442 :
28867+ /***/ 1385 :
2886828868/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
2886928869
2887028870"use strict";
@@ -28893,32 +28893,37 @@ var __importStar = (this && this.__importStar) || function (mod) {
2889328893 return result;
2889428894};
2889528895Object.defineProperty(exports, "__esModule", ({ value: true }));
28896+ exports.run = void 0;
2889628897const core = __importStar(__nccwpck_require__(115));
2889728898const github = __importStar(__nccwpck_require__(3007));
28898- function doChecks() {
28899- if (github.context.eventName === "pull_request") {
28900- const pullPayload = github.context.payload;
28901- const body = pullPayload.body;
28902- core.info(`BODY IS: ${body}`);
28903- if (!body) {
28904- core.setFailed("No PR body provided. Please ensure you include the PR template.");
28905- return 1;
28906- }
28907- const lower = body.toLowerCase();
28908- const content = core.getInput("content").toLowerCase();
28909- if (!lower.includes(content)) {
28910- core.setFailed(`Content check for "${content}" was not successful.`);
28911- return 1;
28899+ async function run() {
28900+ try {
28901+ if (github.context.eventName === "pull_request") {
28902+ core.debug(`CONTEXT IS: ${github.context}`);
28903+ core.debug(`PAYLOAD IS: ${github.context.payload}`);
28904+ const pullPayload = github.context.payload;
28905+ const body = pullPayload.body;
28906+ core.info(`BODY IS: ${body}`);
28907+ if (!body) {
28908+ core.setFailed("No PR body provided. Please ensure you include the PR template.");
28909+ return 1;
28910+ }
28911+ const lower = body.toLowerCase();
28912+ const content = core.getInput("content").toLowerCase();
28913+ if (!lower.includes(content)) {
28914+ core.setFailed(`Content check for "${content}" was not successful.`);
28915+ return 1;
28916+ }
28917+ core.setOutput("passed", "All content checks were successful!");
2891228918 }
28913- core.setOutput("passed", "All content checks were successful!");
28919+ }
28920+ catch (error) {
28921+ // Fail the workflow run if an error occurs
28922+ if (error instanceof Error)
28923+ core.setFailed(error.message);
2891428924 }
2891528925}
28916- try {
28917- doChecks();
28918- }
28919- catch (error) {
28920- core.setFailed(error.message);
28921- }
28926+ exports.run = run;
2892228927
2892328928
2892428929/***/ }),
@@ -30812,12 +30817,22 @@ module.exports = parseParams
3081230817/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
3081330818/******/
3081430819/************************************************************************/
30815- /******/
30816- /******/ // startup
30817- /******/ // Load entry module and return exports
30818- /******/ // This entry module is referenced by other modules so it can't be inlined
30819- /******/ var __webpack_exports__ = __nccwpck_require__(6442);
30820- /******/ module.exports = __webpack_exports__;
30821- /******/
30820+ var __webpack_exports__ = {};
30821+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
30822+ (() => {
30823+ "use strict";
30824+ var exports = __webpack_exports__;
30825+
30826+ Object.defineProperty(exports, "__esModule", ({ value: true }));
30827+ /**
30828+ * The entrypoint for the action.
30829+ */
30830+ const main_1 = __nccwpck_require__(1385);
30831+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
30832+ (0, main_1.run)();
30833+
30834+ })();
30835+
30836+ module.exports = __webpack_exports__;
3082230837/******/ })()
3082330838;
0 commit comments