From c2497439e0bfb83f681c03a89f33df52f28ed5c2 Mon Sep 17 00:00:00 2001 From: Jason O'Conal Date: Tue, 30 Aug 2022 16:35:20 +0930 Subject: [PATCH] fix: more logging 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 --- src/lint.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lint.js b/src/lint.js index ab6d77c..c9a4de6 100644 --- a/src/lint.js +++ b/src/lint.js @@ -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] + ')' + ); } };