-
Notifications
You must be signed in to change notification settings - Fork 0
/
repo_commits.cr
81 lines (68 loc) · 1.55 KB
/
repo_commits.cr
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
module Octokit
module Models
struct RepositoryCommit
Octokit.rest_model(
node_id: String,
sha: String,
commit: Commit,
author: User,
committer: User,
parents: Array(Commit),
html_url: String,
url: String,
comments_url: String,
stats: CommitStats,
files: Array(CommitFile)
)
end
struct CommitStats
Octokit.rest_model(
additions: Int32,
deletions: Int32,
total: Int32
)
end
struct CommitFile
Octokit.rest_model(
sha: String,
filename: String,
additions: Int32,
deletions: Int32,
changes: Int32,
status: String,
patch: String,
blob_url: String,
raw_url: String,
contents_url: String,
previous_filename: String
)
end
struct CommitsComparison
Octokit.rest_model(
base_commit: RepositoryCommit,
merge_base_commit: RepositoryCommit,
status: String,
ahead_by: Int32,
behind_by: Int32,
total_commits: Int32,
commits: Array(RepositoryCommit),
files: Array(CommitFile),
html_url: String,
permalink: String,
diff_url: String,
patch_url: String,
url: String
)
end
struct CommitListOptions
Octokit.rest_model({
sha: String,
path: String,
author: String,
since: String,
until: String,
# }.merge(ListOptions::FIELDS))
})
end
end
end