aboutsummaryrefslogtreecommitdiff
path: root/packages/api/src/commit.d.ts
blob: 0a76f8ae146bf440c0232c9bbfa4ad0e6e234bd7 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Author } from "./misc";

export type Hunk = {
	new_start: number,
	new_lines_cnt: number,
	new_lines: number[],
	old_start: number,
	old_lines_cnt: number,
	deleted_lines: number[],
	hunk: string
}

export type Patch = {
	additions: number,
	deletions: number,
	from: string,
	to: string,
	too_large: boolean,
	hunks: Hunk[]
}
export interface CommitAuthor extends Author {
	fingerprint: string | null
}
export interface Commit {
	message: string,
	author: CommitAuthor,
	isSigned: boolean,
	date: number,
	insertions: number,
	deletions: number,
	files_changed: number,
	diff: Patch[]
}

export type LogCommit = {
	id: string,
	author: CommitAuthor,
	isSigned: boolean,
	message: string,
	date: number,
	insertions: number,
	deletions: number,
	files_changed: number
}

export type LatestCommit = {
	id: string,
	message: string,
	date: number
}