Skip to content

Commit

Permalink
Set end_line to line if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
ataylorme committed Nov 19, 2019
1 parent 7a1cd91 commit 4aad36f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4245,7 +4245,7 @@ function processReport(lintedFiles, errorsOnly) {
const annotation = {
path: filePath.replace(`${GITHUB_WORKSPACE}/`, ''),
start_line: line,
end_line: endLine,
end_line: endLine ? endLine : line,
annotation_level: isWarning ? 'warning' : 'failure',
message: `[${ruleId}] ${message}`,
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-annotate-action",
"version": "1.0.0",
"version": "1.0.2",
"description": "A GitHub action that takes ESLint results from a JSON file and adds them as annotated pull request comments",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/eslint-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function processReport(lintedFiles: Array<ESLintEntry>, errorsOnly: boolean): Pa
const annotation: ChecksUpdateParamsOutputAnnotations = {
path: filePath.replace(`${GITHUB_WORKSPACE}/`, ''),
start_line: line,
end_line: endLine,
end_line: endLine ? endLine : line,
annotation_level: isWarning ? 'warning' : 'failure',
message: `[${ruleId}] ${message}`,
};
Expand Down

0 comments on commit 4aad36f

Please sign in to comment.