Skip to content

Commit c4ed8cb

Browse files
SamMorrowDrumsCopilotgithub-actions[bot]
authored
feat(repos): add typed commit tool outputs (#3389)
* feat(repos): add typed commit tool outputs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(repos): restore commit pagination defaults Normalize omitted and explicit zero pagination to page 1 and perPage 30 for get_commit and list_commits. Cover legacy and modern wire calls and direct handlers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(repos): return typed projected commit lists Use an optional-field commit DTO for full and projected modern outputs while retaining exact legacy text. Cover SHA and nested commit projections, empty lists, and output schema conformance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore: regenerate license files Auto-generated by license-check workflow * test(repos): snapshot modern commit tools and strengthen wire coverage Capture canonical modern schemas, exercise null lists and error suppression with IFC labels, and drop unrelated generated Linux license drift noted by Copilot review. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(repos): distinguish legacy and modern commit text Keep exact-main byte assertions for the legacy protocol and verify modern text represents the same typed DTO as structured content. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(repos): sync commit snapshots with parent DTO metadata Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 8b2656a commit c4ed8cb

6 files changed

Lines changed: 928 additions & 86 deletions

File tree

‎pkg/github/__toolsnaps__/get_commit.snap‎

Lines changed: 323 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
"title": "Get commit details"
66
},
77
"description": "Get details for a commit from a GitHub repository",
8+
"icons": [
9+
{
10+
"mimeType": "image/png",
11+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAABTklEQVRIie2UPUvDUBSGn5PW2qnYwUXExWhNpY2CUKT+BB10E3R0dnbrppuKLgouHbr5X5qlKRIFB+cuguBHj4O05KYfNsVJ+m7n3Hue54ZcrhDKQqGQTX1YVwg7QIbx0gh8b7VTJMMrqS+5RtgD7oDX2GhhC6UcbhkCVLZVuX1sesex4YCdX6uAGgIrsicjlrTGgQ9KVPDnmQgmgongPwgkXNiOq8ADMAtkx4UGvtflJvus20ANeIlN/vW5/kkt8L3D2HD6P9dRgSI8dQcc9w1IR3acBE3vbFSp8ZMVnoFSqJ/unZDe3pAYXyDIJarn9opbDZrewaAh2y7Oy5S1r6h5QG2Xxbw3piDw6xe244oKyxFmC5ihc+tS1qaqngKJyAEBGmZvSGzHVYT790T7aPozsaFoFZGboFGvDJsbOYuOuxuuc7n1uaV8sRSH8Q1DUVLnYLty3gAAAABJRU5ErkJggg==",
12+
"theme": "light"
13+
},
14+
{
15+
"mimeType": "image/png",
16+
"src": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAA+ElEQVRIie2WLU5DQRRGzwUEirQCQ9BsoSGtZQHgSFgIsg4JXQCGP8V2QCBIEATZkJDgOJi+MJnMo30TFHmfmzvzfeeKyZ2BROpQvVHfrddDmhkZ4BY4Ai6BD7prAowjIoq7i85nFcGNf6qa1tayM1vAvBZQUg74c/WAHtAD/gMgn6YCT8A2MKwOTaZpCfAF3AGvFdlLx7XqdUVw4186rgWeE8Nn4cU67QLNAS/ASG3qmwVPqdaqjWw9A86BK+CkzaTuAseFBse/AiLiQg1gLzs3Bwb8XIp94AxYL/Af2xordap6v/htHKhv6nTlgBUAh9l6Rx11yfgG8ne/zwh2OysAAAAASUVORK5CYII=",
17+
"theme": "dark"
18+
}
19+
],
820
"inputSchema": {
921
"properties": {
1022
"detail": {
@@ -19,7 +31,8 @@
1931
},
2032
"owner": {
2133
"description": "Repository owner",
22-
"type": "string"
34+
"type": "string",
35+
"x-mcp-header": "owner"
2336
},
2437
"page": {
2538
"description": "Page number for pagination (min 1)",
@@ -34,7 +47,8 @@
3447
},
3548
"repo": {
3649
"description": "Repository name",
37-
"type": "string"
50+
"type": "string",
51+
"x-mcp-header": "repo"
3852
},
3953
"sha": {
4054
"description": "Commit SHA, branch name, or tag name",
@@ -48,5 +62,311 @@
4862
],
4963
"type": "object"
5064
},
51-
"name": "get_commit"
65+
"name": "get_commit",
66+
"outputSchema": {
67+
"additionalProperties": false,
68+
"properties": {
69+
"author": {
70+
"additionalProperties": false,
71+
"properties": {
72+
"avatar_url": {
73+
"type": "string"
74+
},
75+
"details": {
76+
"additionalProperties": false,
77+
"properties": {
78+
"bio": {
79+
"type": "string"
80+
},
81+
"blog": {
82+
"type": "string"
83+
},
84+
"company": {
85+
"type": "string"
86+
},
87+
"created_at": {
88+
"description": "Account creation time in RFC3339 format.",
89+
"type": "string"
90+
},
91+
"email": {
92+
"type": "string"
93+
},
94+
"followers": {
95+
"type": "integer"
96+
},
97+
"following": {
98+
"type": "integer"
99+
},
100+
"hireable": {
101+
"type": "boolean"
102+
},
103+
"location": {
104+
"type": "string"
105+
},
106+
"name": {
107+
"type": "string"
108+
},
109+
"owned_private_repos": {
110+
"type": "integer"
111+
},
112+
"private_gists": {
113+
"type": "integer"
114+
},
115+
"public_gists": {
116+
"type": "integer"
117+
},
118+
"public_repos": {
119+
"type": "integer"
120+
},
121+
"total_private_repos": {
122+
"type": "integer"
123+
},
124+
"twitter_username": {
125+
"type": "string"
126+
},
127+
"updated_at": {
128+
"description": "Last profile update time in RFC3339 format.",
129+
"type": "string"
130+
}
131+
},
132+
"required": [
133+
"public_repos",
134+
"public_gists",
135+
"followers",
136+
"following",
137+
"created_at",
138+
"updated_at"
139+
],
140+
"type": [
141+
"null",
142+
"object"
143+
]
144+
},
145+
"id": {
146+
"type": "integer"
147+
},
148+
"login": {
149+
"type": "string"
150+
},
151+
"profile_url": {
152+
"type": "string"
153+
}
154+
},
155+
"required": [
156+
"login"
157+
],
158+
"type": [
159+
"null",
160+
"object"
161+
]
162+
},
163+
"commit": {
164+
"additionalProperties": false,
165+
"properties": {
166+
"author": {
167+
"additionalProperties": false,
168+
"properties": {
169+
"date": {
170+
"type": "string"
171+
},
172+
"email": {
173+
"type": "string"
174+
},
175+
"name": {
176+
"type": "string"
177+
}
178+
},
179+
"type": [
180+
"null",
181+
"object"
182+
]
183+
},
184+
"committer": {
185+
"additionalProperties": false,
186+
"properties": {
187+
"date": {
188+
"type": "string"
189+
},
190+
"email": {
191+
"type": "string"
192+
},
193+
"name": {
194+
"type": "string"
195+
}
196+
},
197+
"type": [
198+
"null",
199+
"object"
200+
]
201+
},
202+
"message": {
203+
"type": "string"
204+
}
205+
},
206+
"required": [
207+
"message"
208+
],
209+
"type": [
210+
"null",
211+
"object"
212+
]
213+
},
214+
"committer": {
215+
"additionalProperties": false,
216+
"properties": {
217+
"avatar_url": {
218+
"type": "string"
219+
},
220+
"details": {
221+
"additionalProperties": false,
222+
"properties": {
223+
"bio": {
224+
"type": "string"
225+
},
226+
"blog": {
227+
"type": "string"
228+
},
229+
"company": {
230+
"type": "string"
231+
},
232+
"created_at": {
233+
"description": "Account creation time in RFC3339 format.",
234+
"type": "string"
235+
},
236+
"email": {
237+
"type": "string"
238+
},
239+
"followers": {
240+
"type": "integer"
241+
},
242+
"following": {
243+
"type": "integer"
244+
},
245+
"hireable": {
246+
"type": "boolean"
247+
},
248+
"location": {
249+
"type": "string"
250+
},
251+
"name": {
252+
"type": "string"
253+
},
254+
"owned_private_repos": {
255+
"type": "integer"
256+
},
257+
"private_gists": {
258+
"type": "integer"
259+
},
260+
"public_gists": {
261+
"type": "integer"
262+
},
263+
"public_repos": {
264+
"type": "integer"
265+
},
266+
"total_private_repos": {
267+
"type": "integer"
268+
},
269+
"twitter_username": {
270+
"type": "string"
271+
},
272+
"updated_at": {
273+
"description": "Last profile update time in RFC3339 format.",
274+
"type": "string"
275+
}
276+
},
277+
"required": [
278+
"public_repos",
279+
"public_gists",
280+
"followers",
281+
"following",
282+
"created_at",
283+
"updated_at"
284+
],
285+
"type": [
286+
"null",
287+
"object"
288+
]
289+
},
290+
"id": {
291+
"type": "integer"
292+
},
293+
"login": {
294+
"type": "string"
295+
},
296+
"profile_url": {
297+
"type": "string"
298+
}
299+
},
300+
"required": [
301+
"login"
302+
],
303+
"type": [
304+
"null",
305+
"object"
306+
]
307+
},
308+
"files": {
309+
"items": {
310+
"additionalProperties": false,
311+
"properties": {
312+
"additions": {
313+
"type": "integer"
314+
},
315+
"changes": {
316+
"type": "integer"
317+
},
318+
"deletions": {
319+
"type": "integer"
320+
},
321+
"filename": {
322+
"type": "string"
323+
},
324+
"patch": {
325+
"type": "string"
326+
},
327+
"status": {
328+
"type": "string"
329+
}
330+
},
331+
"required": [
332+
"filename"
333+
],
334+
"type": "object"
335+
},
336+
"type": [
337+
"null",
338+
"array"
339+
]
340+
},
341+
"html_url": {
342+
"type": "string"
343+
},
344+
"sha": {
345+
"type": "string"
346+
},
347+
"stats": {
348+
"additionalProperties": false,
349+
"properties": {
350+
"additions": {
351+
"type": "integer"
352+
},
353+
"deletions": {
354+
"type": "integer"
355+
},
356+
"total": {
357+
"type": "integer"
358+
}
359+
},
360+
"type": [
361+
"null",
362+
"object"
363+
]
364+
}
365+
},
366+
"required": [
367+
"sha",
368+
"html_url"
369+
],
370+
"type": "object"
371+
}
52372
}

0 commit comments

Comments
 (0)