Skip to content

Commit

Permalink
fix: more logging
Browse files Browse the repository at this point in the history
Attempting to understand why the checker doesn't detect the newline when
running on a site PR, so adding some more debug logging

Relates to SRE-225
  • Loading branch information
lovek323 committed Aug 30, 2022
1 parent 61e5aba commit c249743
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ module.exports = function (body, title, failureCallback, infoCallback) {
// Ensure that there is a blank line before the Jira reference
infoCallback('Checking PR body empty line');
if (bodyLines[bodyLines.length - 2] !== '') {
failureCallback('Invalid PR body. Needs a blank line before the Jira reference.');
failureCallback(
'Invalid PR body. Needs a blank line before the Jira reference. ' +
'(Expected blank line, found ' + bodyLines[bodyLines.length - 2] + ')'
);
}
};

0 comments on commit c249743

Please sign in to comment.