( markdown: string, item: Item, context: ItemContext, promotion: PullRequestClosePromotion, )
| 12228 | } |
| 12229 | |
| 12230 | function upgradePullRequestClosePromotionReport( |
| 12231 | markdown: string, |
| 12232 | item: Item, |
| 12233 | context: ItemContext, |
| 12234 | promotion: PullRequestClosePromotion, |
| 12235 | ): string { |
| 12236 | let upgraded = markdown; |
| 12237 | upgraded = replaceFrontMatterValue(upgraded, "decision", "close"); |
| 12238 | upgraded = replaceFrontMatterValue(upgraded, "close_reason", "duplicate_or_superseded"); |
| 12239 | upgraded = replaceFrontMatterValue(upgraded, "confidence", "high"); |
| 12240 | upgraded = replaceFrontMatterValue(upgraded, "action_taken", "proposed_close"); |
| 12241 | upgraded = replaceFrontMatterValue( |
| 12242 | upgraded, |
| 12243 | "pr_close_coverage_proof_fallback_refs", |
| 12244 | promotion.coverageProofFallbackRefs ? "true" : "false", |
| 12245 | ); |
| 12246 | upgraded = replaceFrontMatterValue(upgraded, "work_candidate", "none"); |
| 12247 | upgraded = replaceFrontMatterValue(upgraded, "work_status", "none"); |
| 12248 | upgraded = replaceFrontMatterValue(upgraded, "item_updated_at", item.updatedAt); |
| 12249 | upgraded = replaceFrontMatterValue( |
| 12250 | upgraded, |
| 12251 | "item_snapshot_hash", |
| 12252 | itemSnapshotHash(item, context), |
| 12253 | ); |
| 12254 | upgraded = replaceSectionValue(upgraded, REVIEW_SECTIONS.bestSolution, promotion.bestSolution); |
| 12255 | upgraded = replaceSectionValue(upgraded, REVIEW_SECTIONS.evidence, promotion.evidence); |
| 12256 | upgraded = replaceSectionValue(upgraded, REVIEW_SECTIONS.closeComment, promotion.closeComment); |
| 12257 | return upgraded; |
| 12258 | } |
| 12259 | |
| 12260 | function closePromotionHasNonAutomationActivityAfterReview( |
| 12261 | markdown: string, |
no test coverage detected