-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-commit-schema.json
More file actions
270 lines (270 loc) · 7.69 KB
/
github-commit-schema.json
File metadata and controls
270 lines (270 loc) · 7.69 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/schemas/github/commit.json",
"title": "GitHub Commit",
"description": "A Git commit in a GitHub repository, including metadata about the author, committer, tree, parents, and verification status.",
"type": "object",
"required": ["sha", "commit"],
"properties": {
"sha": {
"type": "string",
"pattern": "^[0-9a-f]{40}$",
"description": "The SHA-1 hash of the commit."
},
"node_id": {
"type": "string",
"description": "The GraphQL node ID for the commit."
},
"url": {
"type": "string",
"format": "uri",
"description": "The API URL for the commit."
},
"html_url": {
"type": "string",
"format": "uri",
"description": "The URL of the commit on GitHub."
},
"comments_url": {
"type": "string",
"format": "uri",
"description": "The API URL for the commit's comments."
},
"commit": {
"$ref": "#/$defs/GitCommit"
},
"author": {
"oneOf": [
{ "$ref": "#/$defs/SimpleUser" },
{ "type": "null" }
],
"description": "The GitHub user who authored the commit."
},
"committer": {
"oneOf": [
{ "$ref": "#/$defs/SimpleUser" },
{ "type": "null" }
],
"description": "The GitHub user who committed the changes."
},
"parents": {
"type": "array",
"description": "The parent commits of this commit.",
"items": {
"$ref": "#/$defs/ParentCommit"
}
},
"stats": {
"type": "object",
"description": "Statistics about the commit changes.",
"properties": {
"additions": {
"type": "integer",
"minimum": 0,
"description": "The number of lines added."
},
"deletions": {
"type": "integer",
"minimum": 0,
"description": "The number of lines deleted."
},
"total": {
"type": "integer",
"minimum": 0,
"description": "The total number of lines changed."
}
}
},
"files": {
"type": "array",
"description": "The files changed in the commit.",
"items": {
"$ref": "#/$defs/CommitFile"
}
}
},
"$defs": {
"GitCommit": {
"type": "object",
"description": "The underlying Git commit object data.",
"required": ["message", "tree", "author", "committer"],
"properties": {
"message": {
"type": "string",
"description": "The commit message."
},
"tree": {
"type": "object",
"description": "The tree object the commit points to.",
"properties": {
"sha": {
"type": "string",
"pattern": "^[0-9a-f]{40}$",
"description": "The SHA of the tree."
},
"url": {
"type": "string",
"format": "uri",
"description": "The API URL for the tree."
}
}
},
"author": {
"$ref": "#/$defs/GitUser"
},
"committer": {
"$ref": "#/$defs/GitUser"
},
"verification": {
"$ref": "#/$defs/Verification"
},
"comment_count": {
"type": "integer",
"minimum": 0,
"description": "The number of comments on the commit."
}
}
},
"GitUser": {
"type": "object",
"description": "A Git user (author or committer) with name, email, and timestamp.",
"properties": {
"name": {
"type": "string",
"description": "The name of the Git user."
},
"email": {
"type": "string",
"format": "email",
"description": "The email address of the Git user."
},
"date": {
"type": "string",
"format": "date-time",
"description": "The timestamp of the action."
}
}
},
"SimpleUser": {
"type": "object",
"description": "A simplified representation of a GitHub user.",
"required": ["login", "id"],
"properties": {
"login": {
"type": "string",
"description": "The username of the user."
},
"id": {
"type": "integer",
"description": "The unique identifier for the user."
},
"node_id": {
"type": "string",
"description": "The GraphQL node ID."
},
"avatar_url": {
"type": "string",
"format": "uri",
"description": "URL to the user's avatar image."
},
"html_url": {
"type": "string",
"format": "uri",
"description": "URL to the user's GitHub profile."
},
"type": {
"type": "string",
"enum": ["User", "Organization", "Bot"],
"description": "The type of account."
}
}
},
"ParentCommit": {
"type": "object",
"description": "A reference to a parent commit.",
"required": ["sha", "url"],
"properties": {
"sha": {
"type": "string",
"pattern": "^[0-9a-f]{40}$",
"description": "The SHA of the parent commit."
},
"url": {
"type": "string",
"format": "uri",
"description": "The API URL for the parent commit."
},
"html_url": {
"type": "string",
"format": "uri",
"description": "The URL of the parent commit on GitHub."
}
}
},
"CommitFile": {
"type": "object",
"description": "A file changed in a commit.",
"properties": {
"sha": {
"type": "string",
"description": "The SHA of the file blob."
},
"filename": {
"type": "string",
"description": "The path and name of the file."
},
"status": {
"type": "string",
"enum": ["added", "removed", "modified", "renamed", "copied", "changed", "unchanged"],
"description": "The status of the file change."
},
"additions": {
"type": "integer",
"minimum": 0,
"description": "The number of lines added."
},
"deletions": {
"type": "integer",
"minimum": 0,
"description": "The number of lines deleted."
},
"changes": {
"type": "integer",
"minimum": 0,
"description": "The total number of changes."
},
"patch": {
"type": "string",
"description": "The unified diff patch for the file."
},
"previous_filename": {
"type": "string",
"description": "The previous filename if the file was renamed."
}
}
},
"Verification": {
"type": "object",
"description": "Commit signature verification status.",
"properties": {
"verified": {
"type": "boolean",
"description": "Whether the signature was verified."
},
"reason": {
"type": "string",
"enum": ["expired_key", "not_signing_key", "gpgverify_error", "gpgverify_unavailable", "unsigned", "unknown_signature_type", "no_user", "unverified_email", "bad_email", "unknown_key", "malformed_signature", "invalid", "valid", "bad_cert", "ocsp_pending"],
"description": "The reason for the verification result."
},
"signature": {
"type": ["string", "null"],
"description": "The signature that was extracted from the commit."
},
"payload": {
"type": ["string", "null"],
"description": "The payload that was signed."
}
}
}
}
}