summaryrefslogtreecommitdiff
path: root/src/lib/git/types.ts
blob: 672d242d35539a7105dbc3fafb7ae7017a23f03e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
export type CommitFile = {
  path: URL;
  status: "added" | "modified" | "deleted";
};

export type Hash = { long: string; short: string };

export type Contributor = {
  name: string;
  email: string;
  date: Date;
};

export type SignatureType = "ssh" | "gpg" | "x509";

export type Commit = {
  files: CommitFile[];
  hash: Hash;
  author: Contributor;
  committer: Contributor;
  signature?: {
    type: SignatureType;
    signer: string;
    key: Hash;
    rawMessage: string;
  };
};