Skip to content
17 linesCodeBlameRaw
1import type { Pull } from "@g1t/contracts";
2
3import type { Drift } from "../lib/branches";
4import 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. */
7export 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};