Skip to content

Commit

Permalink
don't emit start_line if same lines
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 1, 2024
1 parent 11505d5 commit 212414d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,11 @@ async function githubCreatePullRequestReview(
body: appendGeneratedComment(script, info, annotation.message),
commit_id: sha,
path: annotation.filename,
start_line: annotation.range?.[0]?.[0],
line: annotation.range?.[1]?.[0],
start_line:
annotation.range?.[0]?.[0] !== annotation.range?.[1]?.[0]
? annotation.range?.[0]?.[0]
: undefined,
subject_type: "line",
}
logVerbose(JSON.stringify(body, null, 2))
Expand Down

0 comments on commit 212414d

Please sign in to comment.