Skip to content

Commit

Permalink
fix: see if trimming the string works
Browse files Browse the repository at this point in the history
Trying to work out why we can't detect the empty line properly, seeing
if `trim()` will fix the issue

Version 1.0.10

Relates to SRE-225
  • Loading branch information
lovek323 committed Aug 30, 2022
1 parent 01d6015 commit 9612d9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-pr-linter",
"version": "1.0.9",
"version": "1.0.10",
"description": "Finder's GitHub commit linter, runs as a GitHub Action",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ 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] !== '') {
if (bodyLines[bodyLines.length - 2].trim() !== '') {
for (let i = 0; i < bodyLines.length; i++) {
infoCallback('Body line ' + i + ': ' + bodyLines[i]);
}
Expand Down

0 comments on commit 9612d9e

Please sign in to comment.