Skip to content

Commit 3e406ea

Browse files
committed
Some type changes
1 parent 69b2583 commit 3e406ea

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

dist/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28896,23 +28896,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
2889628896
exports.run = void 0;
2889728897
const core = __importStar(__nccwpck_require__(115));
2889828898
const github = __importStar(__nccwpck_require__(3007));
28899+
/**
28900+
* The main function for the action.
28901+
* @returns {Promise<void>} Resolves when the action is complete.
28902+
*/
2889928903
async function run() {
2890028904
try {
2890128905
if (github.context.eventName === "pull_request") {
28902-
core.debug(`CONTEXT IS: ${github.context}`);
28903-
core.debug(`PAYLOAD IS: ${github.context.payload}`);
2890428906
const pullPayload = github.context.payload.pull_request;
2890528907
const body = pullPayload.body;
28906-
core.info(`BODY IS: ${body}`);
2890728908
if (!body) {
2890828909
core.setFailed("No PR body provided. Please ensure you include the PR template.");
28909-
return 1;
28910+
return;
2891028911
}
2891128912
const lower = body.toLowerCase();
2891228913
const content = core.getInput("content").toLowerCase();
2891328914
if (!lower.includes(content)) {
2891428915
core.setFailed(`Content check for "${content}" was not successful.`);
28915-
return 1;
28916+
return;
2891628917
}
2891728918
core.setOutput("passed", "All content checks were successful!");
2891828919
}

main.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@ import * as github from "@actions/github";
33
import { PullRequest } from "@octokit/webhooks-types";
44

55

6-
export async function run() {
6+
/**
7+
* The main function for the action.
8+
* @returns {Promise<void>} Resolves when the action is complete.
9+
*/
10+
export async function run(): Promise<void> {
711
try {
812
if (github.context.eventName === "pull_request") {
9-
core.debug(`CONTEXT IS: ${github.context}`);
10-
core.debug(`PAYLOAD IS: ${github.context.payload}`);
11-
1213
const pullPayload = github.context.payload.pull_request as PullRequest;
1314
const body: string | null = pullPayload.body;
1415

15-
core.info(`BODY IS: ${body}`);
16-
1716
if (!body) {
1817
core.setFailed("No PR body provided. Please ensure you include the PR template.");
19-
return 1;
18+
return;
2019
}
2120

2221
const lower: string = body.toLowerCase();
2322
const content: string = core.getInput("content").toLowerCase();
2423

2524
if (!lower.includes(content)) {
2625
core.setFailed(`Content check for "${content}" was not successful.`);
27-
return 1;
26+
return;
2827
}
2928

3029
core.setOutput("passed", "All content checks were successful!");

0 commit comments

Comments
 (0)