Skip to content

Commit 5153c88

Browse files
committed
fix(ci): prevent invalid startLine 0 when downloading from portal
1 parent 2ae961a commit 5153c88

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

packages/ci/src/lib/portal/transform.ts

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,20 @@ function transformGQLIssue(issue: IssueFragment): Issue {
150150
...(issue.source?.__typename === 'SourceCodeLocation' && {
151151
source: {
152152
file: issue.source.filePath,
153-
position: {
154-
startLine: issue.source.startLine ?? 0,
155-
...(issue.source.startColumn != null && {
156-
startColumn: issue.source.startColumn,
157-
}),
158-
...(issue.source.endLine != null && {
159-
endLine: issue.source.endLine,
160-
}),
161-
...(issue.source.endColumn != null && {
162-
endColumn: issue.source.endColumn,
163-
}),
164-
},
153+
...(issue.source.startLine != null && {
154+
position: {
155+
startLine: issue.source.startLine,
156+
...(issue.source.startColumn != null && {
157+
startColumn: issue.source.startColumn,
158+
}),
159+
...(issue.source.endLine != null && {
160+
endLine: issue.source.endLine,
161+
}),
162+
...(issue.source.endColumn != null && {
163+
endColumn: issue.source.endColumn,
164+
}),
165+
},
166+
}),
165167
},
166168
}),
167169
};

0 commit comments

Comments
 (0)