MCPcopy
hub / github.com/openclaw/clawsweeper / sourcePrCloseCoveragePullRequestView

Function sourcePrCloseCoveragePullRequestView

src/clawsweeper.ts:12812–12831  ·  view source on GitHub ↗
(
  item: Item,
  context: ItemContext,
)

Source from the content-addressed store, hash-verified

12810 | null;
12811
12812function 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
12833function coveringPrCloseCoveragePullRequestView(
12834 number: number,

Callers 1

Calls 3

stringOrUndefinedFunction · 0.85
asRecordFunction · 0.70

Tested by

no test coverage detected