( item: Item, context: ItemContext, )
| 12810 | | null; |
| 12811 | |
| 12812 | function sourcePrCloseCoveragePullRequestView( |
| 12813 | item: Item, |
| 12814 | context: ItemContext, |
| 12815 | ): PrCloseCoverageProofPullRequestView { |
| 12816 | const issue = asRecord(context.issue); |
| 12817 | const pull = asRecord(context.pullRequest); |
| 12818 | return { |
| 12819 | number: item.number, |
| 12820 | title: stringOrUndefined(pull.title) ?? stringOrUndefined(issue.title) ?? item.title, |
| 12821 | url: item.url, |
| 12822 | state: "open", |
| 12823 | mergedAt: null, |
| 12824 | body: compactPrCloseCoverageProofText( |
| 12825 | stringOrUndefined(pull.body) ?? stringOrUndefined(issue.body) ?? "", |
| 12826 | ), |
| 12827 | updatedAt: item.updatedAt, |
| 12828 | comments: (context.comments ?? []).map(compactPrCloseCoverageProofComment), |
| 12829 | commentsTruncated: Boolean(context.counts?.commentsTruncated), |
| 12830 | }; |
| 12831 | } |
| 12832 | |
| 12833 | function coveringPrCloseCoveragePullRequestView( |
| 12834 | number: number, |
no test coverage detected