in scripts/github-pr-title-lint.js [202:233]
async function runChangelogLinting() {
try {
const commits = getGitBranchCommits();
let message;
if (commits.length === 1 && !TEST_FORCE_PR_LINT) {
console.log(
'There is only one commit in this pull request,',
'we are going to check the single commit message...',
);
message = getGitCommitMessage(commits[0]);
} else {
console.log(
'There is more than one commit in this pull request,',
'we are going to check the pull request title...',
);
message = await getPullRequestTitle();
}
lintMessage(message);
} catch (err) {
var errMessage = `${err.stack || err}`.trim();
console.error(
`Failures during changelog linting the pull request:\n\n${errMessage}`,
);
console.log(DONT_PANIC_MESSAGE);
process.exit(1);
}
console.log('Changelog linting completed successfully.');
}