Skip to content

Commit 1447006

Browse files
fix(search): preserve field_values presence and add nested schema fixtures
Address review findings on the typed search/list projected-output tools (search_code, search_issues, search_pull_requests, list_issues, list_pull_requests, list_branches, list_tags): - issues.go/pullrequests.go: change FieldValues to a pointer-to-slice (*[]MinimalFieldValue) so a successful-but-empty [] is preserved in structuredContent, matching legacy text output instead of being dropped by omitempty. - search.go: related adjustments to keep typed search outputs aligned with the field_values presence fix. - typed_search_outputs_test.go: add representative nested/non-empty projected item fixtures so schema-conformance tests actually exercise item shapes instead of only validating empty collections. - Add/update toolsnaps for list_branches, list_issues, list_pull_requests, list_tags, search_code, search_issues, and search_pull_requests to reflect the schema. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent c8e40de commit 1447006

11 files changed

Lines changed: 1831 additions & 41 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"inputSchema": null,
3+
"name": "list_branches",
4+
"outputSchema": {
5+
"items": {
6+
"additionalProperties": false,
7+
"properties": {
8+
"name": {
9+
"type": "string"
10+
},
11+
"protected": {
12+
"type": "boolean"
13+
},
14+
"sha": {
15+
"type": "string"
16+
}
17+
},
18+
"required": [
19+
"name",
20+
"sha",
21+
"protected"
22+
],
23+
"type": "object"
24+
},
25+
"type": [
26+
"null",
27+
"array"
28+
]
29+
}
30+
}
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
{
2+
"inputSchema": null,
3+
"name": "list_issues",
4+
"outputSchema": {
5+
"additionalProperties": false,
6+
"properties": {
7+
"issues": {
8+
"items": {
9+
"additionalProperties": false,
10+
"properties": {
11+
"assignees": {
12+
"items": {
13+
"type": "string"
14+
},
15+
"type": [
16+
"null",
17+
"array"
18+
]
19+
},
20+
"body": {
21+
"type": [
22+
"null",
23+
"string"
24+
]
25+
},
26+
"comments": {
27+
"description": "Number of comments on the issue.",
28+
"type": [
29+
"null",
30+
"integer"
31+
]
32+
},
33+
"created_at": {
34+
"description": "Creation time in RFC 3339 format.",
35+
"type": [
36+
"null",
37+
"string"
38+
]
39+
},
40+
"field_values": {
41+
"items": {
42+
"additionalProperties": false,
43+
"properties": {
44+
"field": {
45+
"type": "string"
46+
},
47+
"value": {
48+
"type": "string"
49+
},
50+
"values": {
51+
"items": {
52+
"type": "string"
53+
},
54+
"type": [
55+
"null",
56+
"array"
57+
]
58+
}
59+
},
60+
"required": [
61+
"field"
62+
],
63+
"type": "object"
64+
},
65+
"type": [
66+
"null",
67+
"array"
68+
]
69+
},
70+
"labels": {
71+
"items": {
72+
"type": "string"
73+
},
74+
"type": [
75+
"null",
76+
"array"
77+
]
78+
},
79+
"number": {
80+
"type": [
81+
"null",
82+
"integer"
83+
]
84+
},
85+
"state": {
86+
"description": "Issue state: OPEN or CLOSED.",
87+
"type": [
88+
"null",
89+
"string"
90+
]
91+
},
92+
"title": {
93+
"type": [
94+
"null",
95+
"string"
96+
]
97+
},
98+
"updated_at": {
99+
"description": "Last update time in RFC 3339 format.",
100+
"type": [
101+
"null",
102+
"string"
103+
]
104+
},
105+
"user": {
106+
"additionalProperties": false,
107+
"properties": {
108+
"avatar_url": {
109+
"type": "string"
110+
},
111+
"details": {
112+
"additionalProperties": false,
113+
"properties": {
114+
"bio": {
115+
"type": "string"
116+
},
117+
"blog": {
118+
"type": "string"
119+
},
120+
"company": {
121+
"type": "string"
122+
},
123+
"created_at": {
124+
"description": "Account creation time in RFC3339 format.",
125+
"type": "string"
126+
},
127+
"email": {
128+
"type": "string"
129+
},
130+
"followers": {
131+
"type": "integer"
132+
},
133+
"following": {
134+
"type": "integer"
135+
},
136+
"hireable": {
137+
"type": "boolean"
138+
},
139+
"location": {
140+
"type": "string"
141+
},
142+
"name": {
143+
"type": "string"
144+
},
145+
"owned_private_repos": {
146+
"type": "integer"
147+
},
148+
"private_gists": {
149+
"type": "integer"
150+
},
151+
"public_gists": {
152+
"type": "integer"
153+
},
154+
"public_repos": {
155+
"type": "integer"
156+
},
157+
"total_private_repos": {
158+
"type": "integer"
159+
},
160+
"twitter_username": {
161+
"type": "string"
162+
},
163+
"updated_at": {
164+
"description": "Last profile update time in RFC3339 format.",
165+
"type": "string"
166+
}
167+
},
168+
"required": [
169+
"public_repos",
170+
"public_gists",
171+
"followers",
172+
"following",
173+
"created_at",
174+
"updated_at"
175+
],
176+
"type": [
177+
"null",
178+
"object"
179+
]
180+
},
181+
"id": {
182+
"type": "integer"
183+
},
184+
"login": {
185+
"type": "string"
186+
},
187+
"profile_url": {
188+
"type": "string"
189+
}
190+
},
191+
"required": [
192+
"login"
193+
],
194+
"type": [
195+
"null",
196+
"object"
197+
]
198+
}
199+
},
200+
"type": "object"
201+
},
202+
"type": [
203+
"null",
204+
"array"
205+
]
206+
},
207+
"pageInfo": {
208+
"additionalProperties": false,
209+
"properties": {
210+
"endCursor": {
211+
"description": "Cursor for the last issue in this page.",
212+
"type": "string"
213+
},
214+
"hasNextPage": {
215+
"description": "Whether another page of results is available.",
216+
"type": "boolean"
217+
},
218+
"hasPreviousPage": {
219+
"description": "Whether a previous page of results is available.",
220+
"type": "boolean"
221+
},
222+
"startCursor": {
223+
"description": "Cursor for the first issue in this page.",
224+
"type": "string"
225+
}
226+
},
227+
"required": [
228+
"hasNextPage",
229+
"hasPreviousPage"
230+
],
231+
"type": "object"
232+
},
233+
"totalCount": {
234+
"description": "Total number of issues matching the filters.",
235+
"type": "integer"
236+
}
237+
},
238+
"required": [
239+
"issues",
240+
"totalCount",
241+
"pageInfo"
242+
],
243+
"type": "object"
244+
}
245+
}

0 commit comments

Comments
 (0)