| 1 | /** Branch health and deployed-code checks refer to different commits after a no-op deploy. */ |
| 2 | export function projectCheckSections(head: string | null | undefined, branch: string | null | undefined, deployed: string | null | undefined) { |
| 3 | const sections: { kind: "branch" | "production"; label: string; sha: string }[] = []; |
| 4 | if (head) sections.push({ kind: "branch", label: `Latest on ${branch ?? "default branch"}`, sha: head }); |
| 5 | if (deployed && deployed !== head) sections.push({ kind: "production", label: "Checks for deployed commit", sha: deployed }); |
| 6 | return sections; |
| 7 | } |