| 1 | import type { Pull } from "@g1t/contracts"; |
| 2 | |
| 3 | import type { Drift } from "../lib/branches"; |
| 4 | import type { CommitPerson } from "../lib/commit-people"; |
| 5 | |
| 6 | /** A branch other than the default as Branches lists it: its head, how far it has moved, its pull request and preview. */ |
| 7 | export type ActiveBranch = { |
| 8 | name: string; |
| 9 | /** The commit it points to. */ |
| 10 | head: string; |
| 11 | commit: { hash: string; message: string; author: CommitPerson; coAuthors: CommitPerson[]; at: string } | null; |
| 12 | /** Null when the two histories were not read far enough to meet. */ |
| 13 | drift: Drift | null; |
| 14 | /** The open pull request from it, else the newest merged or closed one. */ |
| 15 | pull: { number: number; title: string; checkStatus: Pull["checkStatus"]; draft: boolean; status: Pull["status"] } | null; |
| 16 | preview: string | null; |
| 17 | }; |