@@ -1337,7 +1337,6 @@ function run() {
1337
1337
const commitsListed = yield octokit.rest.pulls.listCommits({
1338
1338
owner: repo.owner.login,
1339
1339
repo: repo.name,
1340
- // eslint-disable-next-line @typescript-eslint/camelcase
1341
1340
pull_number: pr.number
1342
1341
});
1343
1342
let commits = commitsListed.data;
@@ -1352,11 +1351,11 @@ function run() {
1352
1351
// const commitsString = core.getInput('commits')
1353
1352
// const commits = JSON.parse(commitsString)
1354
1353
const checkerArguments = inputHelper.getInputs();
1354
+ inputHelper.checkArgs(checkerArguments);
1355
1355
const preErrorMsg = core.getInput('pre_error');
1356
1356
const postErrorMsg = core.getInput('post_error');
1357
1357
const failed = [];
1358
1358
for (const { commit, sha } of commits) {
1359
- inputHelper.checkArgs(checkerArguments);
1360
1359
const errMsg = commitMessageChecker.checkCommitMessages(checkerArguments, commit.message);
1361
1360
if (errMsg) {
1362
1361
failed.push({ sha, message: errMsg });
@@ -1365,6 +1364,10 @@ function run() {
1365
1364
if (onePassAllPass === 'true' && commits.length > failed.length) {
1366
1365
return;
1367
1366
}
1367
+ const errMsg = commitMessageChecker.checkCommitMessages(checkerArguments, pr.title);
1368
+ if (errMsg) {
1369
+ failed.push({ sha: 'pull request title', message: errMsg });
1370
+ }
1368
1371
if (failed.length > 0) {
1369
1372
const summary = inputHelper.genOutput(failed, preErrorMsg, postErrorMsg);
1370
1373
core.setFailed(summary);
0 commit comments