We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70263b6 commit 96ae8f8Copy full SHA for 96ae8f8
1 file changed
action/index.cjs
@@ -150553,9 +150553,14 @@ const robot = (app) => {
150553
let side = 'RIGHT';
150554
// Extract line number from hunk header if available
150555
if (review.hunk_header) {
150556
- const hunkMatch = review.hunk_header.match(/@@\s+-\d+(?:,\d+)?\s+\+(\d+)(?:,(\d+))?\s+@@/);
150557
- if (hunkMatch) {
150558
- line = parseInt(hunkMatch[2], 10);
+ const c = review.hunk_header.match(/\+\s*(\d+),(\d+)/);
+ if (c) {
+ const [, start, count] = c;
150559
+ line = Number(start) + Number(count) - 1;
150560
+ }
150561
+ else {
150562
+ loglevel_1.default.error(`Failed to parse hunk header: ${review.hunk_header}`);
150563
+ continue;
150564
}
150565
150566
ress.push({
0 commit comments