From 6ddee9114e61f051a53f48b0a10af9eb1b2001bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Chalk?= Date: Tue, 19 Aug 2025 12:03:13 +0200 Subject: [PATCH] fix(ci): prevent invalid startLine 0 when downloading from portal --- packages/ci/src/lib/portal/transform.ts | 26 +++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/packages/ci/src/lib/portal/transform.ts b/packages/ci/src/lib/portal/transform.ts index 760ea3850..10ea21f95 100644 --- a/packages/ci/src/lib/portal/transform.ts +++ b/packages/ci/src/lib/portal/transform.ts @@ -150,18 +150,20 @@ function transformGQLIssue(issue: IssueFragment): Issue { ...(issue.source?.__typename === 'SourceCodeLocation' && { source: { file: issue.source.filePath, - position: { - startLine: issue.source.startLine ?? 0, - ...(issue.source.startColumn != null && { - startColumn: issue.source.startColumn, - }), - ...(issue.source.endLine != null && { - endLine: issue.source.endLine, - }), - ...(issue.source.endColumn != null && { - endColumn: issue.source.endColumn, - }), - }, + ...(issue.source.startLine != null && { + position: { + startLine: issue.source.startLine, + ...(issue.source.startColumn != null && { + startColumn: issue.source.startColumn, + }), + ...(issue.source.endLine != null && { + endLine: issue.source.endLine, + }), + ...(issue.source.endColumn != null && { + endColumn: issue.source.endColumn, + }), + }, + }), }, }), };