return { comments };
}
-function prepareClosed(issue: RawIssue) {
+function prepareClosed(
+ issue: RawIssue,
+ secondaryLocations: FlowLocation[],
+ flows: FlowLocation[][]
+) {
return issue.status === 'CLOSED'
- ? { flows: undefined, line: undefined, textRange: undefined }
- : {};
+ ? { flows: [], line: undefined, textRange: undefined, secondaryLocations: [] }
+ : { flows, secondaryLocations };
}
function ensureTextRange(issue: RawIssue): { textRange?: TextRange } {
...injectRelational(issue, rules, 'rule', 'key'),
...injectRelational(issue, users, 'assignee', 'login'),
...injectCommentsRelational(issue, users),
- ...prepareClosed(issue),
- ...ensureTextRange(issue),
- secondaryLocations,
- flows
+ ...prepareClosed(issue, secondaryLocations, flows),
+ ...ensureTextRange(issue)
} as Issue;
}