@ldraney/github-mcp 0.1.0 → 0.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/dist/prompts/activity-summary.d.ts +10 -0
- package/dist/prompts/activity-summary.js +154 -0
- package/dist/prompts/code-review.d.ts +9 -0
- package/dist/prompts/code-review.js +145 -0
- package/dist/prompts/issue-triage.d.ts +9 -0
- package/dist/prompts/issue-triage.js +202 -0
- package/dist/prompts/release-notes.d.ts +9 -0
- package/dist/prompts/release-notes.js +236 -0
- package/dist/server.d.ts +8 -1
- package/dist/server.js +36 -210
- package/dist/tools/categories/actions.d.ts +2 -5
- package/dist/tools/categories/actions.js +640 -369
- package/dist/tools/categories/activity.d.ts +2 -0
- package/dist/tools/categories/activity.js +534 -0
- package/dist/tools/categories/apps.d.ts +2 -0
- package/dist/tools/categories/apps.js +224 -0
- package/dist/tools/categories/billing.d.ts +2 -0
- package/dist/tools/categories/billing.js +145 -0
- package/dist/tools/categories/checks.d.ts +2 -0
- package/dist/tools/categories/checks.js +554 -0
- package/dist/tools/categories/codeScanning.d.ts +2 -0
- package/dist/tools/categories/codeScanning.js +375 -0
- package/dist/tools/categories/codeSecurity.d.ts +2 -0
- package/dist/tools/categories/codeSecurity.js +463 -0
- package/dist/tools/categories/codesOfConduct.d.ts +2 -0
- package/dist/tools/categories/codesOfConduct.js +45 -0
- package/dist/tools/categories/codespaces.d.ts +2 -0
- package/dist/tools/categories/codespaces.js +259 -0
- package/dist/tools/categories/copilot.d.ts +2 -0
- package/dist/tools/categories/copilot.js +187 -0
- package/dist/tools/categories/dependabot.d.ts +2 -0
- package/dist/tools/categories/dependabot.js +454 -0
- package/dist/tools/categories/emojis.d.ts +2 -0
- package/dist/tools/categories/emojis.js +22 -0
- package/dist/tools/categories/gists.d.ts +2 -5
- package/dist/tools/categories/gists.js +474 -285
- package/dist/tools/categories/git.d.ts +2 -0
- package/dist/tools/categories/git.js +520 -0
- package/dist/tools/categories/gitignore.d.ts +2 -0
- package/dist/tools/categories/gitignore.js +45 -0
- package/dist/tools/categories/index.d.ts +33 -0
- package/dist/tools/categories/index.js +33 -0
- package/dist/tools/categories/interactions.d.ts +2 -0
- package/dist/tools/categories/interactions.js +184 -0
- package/dist/tools/categories/issues.d.ts +2 -5
- package/dist/tools/categories/issues.js +692 -390
- package/dist/tools/categories/licenses.d.ts +2 -0
- package/dist/tools/categories/licenses.js +95 -0
- package/dist/tools/categories/markdown.d.ts +2 -0
- package/dist/tools/categories/markdown.js +64 -0
- package/dist/tools/categories/meta.d.ts +2 -0
- package/dist/tools/categories/meta.js +74 -0
- package/dist/tools/categories/migrations.d.ts +2 -0
- package/dist/tools/categories/migrations.js +290 -0
- package/dist/tools/categories/orgs.d.ts +2 -5
- package/dist/tools/categories/orgs.js +585 -417
- package/dist/tools/categories/packages.d.ts +2 -0
- package/dist/tools/categories/packages.js +918 -0
- package/dist/tools/categories/projects.d.ts +2 -0
- package/dist/tools/categories/projects.js +692 -0
- package/dist/tools/categories/pulls.d.ts +2 -5
- package/dist/tools/categories/pulls.js +715 -332
- package/dist/tools/categories/rateLimit.d.ts +2 -0
- package/dist/tools/categories/rateLimit.js +22 -0
- package/dist/tools/categories/reactions.d.ts +2 -0
- package/dist/tools/categories/reactions.js +385 -0
- package/dist/tools/categories/repos.d.ts +2 -5
- package/dist/tools/categories/repos.js +844 -366
- package/dist/tools/categories/search.d.ts +2 -5
- package/dist/tools/categories/search.js +294 -196
- package/dist/tools/categories/secretScanning.d.ts +2 -0
- package/dist/tools/categories/secretScanning.js +324 -0
- package/dist/tools/categories/securityAdvisories.d.ts +2 -0
- package/dist/tools/categories/securityAdvisories.js +407 -0
- package/dist/tools/categories/teams.d.ts +2 -0
- package/dist/tools/categories/teams.js +614 -0
- package/dist/tools/categories/users.d.ts +2 -5
- package/dist/tools/categories/users.js +474 -247
- package/dist/tools/generator.d.ts +35 -15
- package/dist/tools/generator.js +113 -57
- package/dist/tools/types.d.ts +63 -0
- package/dist/tools/types.js +17 -0
- package/package.json +1 -1
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const checksCategory = {
|
|
3
|
+
name: 'checks',
|
|
4
|
+
description: 'GitHub checks tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list_for_ref - List check runs for a Git reference
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_checks_list_for_ref',
|
|
10
|
+
description: 'List check runs for a commit ref (branch name, tag, or SHA)',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
owner: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'Repository owner',
|
|
17
|
+
},
|
|
18
|
+
repo: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Repository name',
|
|
21
|
+
},
|
|
22
|
+
ref: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'The commit reference (branch name, tag, or SHA)',
|
|
25
|
+
},
|
|
26
|
+
check_name: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Filter by check run name',
|
|
29
|
+
},
|
|
30
|
+
status: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
enum: ['queued', 'in_progress', 'completed'],
|
|
33
|
+
description: 'Filter by check run status',
|
|
34
|
+
},
|
|
35
|
+
filter: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
enum: ['latest', 'all'],
|
|
38
|
+
description: 'Filter check runs (latest per check name or all)',
|
|
39
|
+
},
|
|
40
|
+
per_page: {
|
|
41
|
+
type: 'number',
|
|
42
|
+
description: 'Results per page (max 100)',
|
|
43
|
+
},
|
|
44
|
+
page: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
description: 'Page number',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
required: ['owner', 'repo', 'ref'],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
handler: async (octokit, args) => {
|
|
53
|
+
const { data } = await octokit.checks.listForRef({
|
|
54
|
+
owner: args.owner,
|
|
55
|
+
repo: args.repo,
|
|
56
|
+
ref: args.ref,
|
|
57
|
+
check_name: args.check_name,
|
|
58
|
+
status: args.status,
|
|
59
|
+
filter: args.filter,
|
|
60
|
+
per_page: args.per_page,
|
|
61
|
+
page: args.page,
|
|
62
|
+
});
|
|
63
|
+
return successResult(data);
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
// list_for_suite - List check runs in a check suite
|
|
67
|
+
{
|
|
68
|
+
definition: {
|
|
69
|
+
name: 'github_checks_list_for_suite',
|
|
70
|
+
description: 'List check runs in a check suite',
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
properties: {
|
|
74
|
+
owner: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Repository owner',
|
|
77
|
+
},
|
|
78
|
+
repo: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
description: 'Repository name',
|
|
81
|
+
},
|
|
82
|
+
check_suite_id: {
|
|
83
|
+
type: 'number',
|
|
84
|
+
description: 'The unique identifier of the check suite',
|
|
85
|
+
},
|
|
86
|
+
check_name: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'Filter by check run name',
|
|
89
|
+
},
|
|
90
|
+
status: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
enum: ['queued', 'in_progress', 'completed'],
|
|
93
|
+
description: 'Filter by check run status',
|
|
94
|
+
},
|
|
95
|
+
filter: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
enum: ['latest', 'all'],
|
|
98
|
+
description: 'Filter check runs (latest per check name or all)',
|
|
99
|
+
},
|
|
100
|
+
per_page: {
|
|
101
|
+
type: 'number',
|
|
102
|
+
description: 'Results per page (max 100)',
|
|
103
|
+
},
|
|
104
|
+
page: {
|
|
105
|
+
type: 'number',
|
|
106
|
+
description: 'Page number',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
required: ['owner', 'repo', 'check_suite_id'],
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
handler: async (octokit, args) => {
|
|
113
|
+
const { data } = await octokit.checks.listForSuite({
|
|
114
|
+
owner: args.owner,
|
|
115
|
+
repo: args.repo,
|
|
116
|
+
check_suite_id: args.check_suite_id,
|
|
117
|
+
check_name: args.check_name,
|
|
118
|
+
status: args.status,
|
|
119
|
+
filter: args.filter,
|
|
120
|
+
per_page: args.per_page,
|
|
121
|
+
page: args.page,
|
|
122
|
+
});
|
|
123
|
+
return successResult(data);
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
// get - Get a check run
|
|
127
|
+
{
|
|
128
|
+
definition: {
|
|
129
|
+
name: 'github_checks_get',
|
|
130
|
+
description: 'Get a specific check run by ID',
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
owner: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'Repository owner',
|
|
137
|
+
},
|
|
138
|
+
repo: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'Repository name',
|
|
141
|
+
},
|
|
142
|
+
check_run_id: {
|
|
143
|
+
type: 'number',
|
|
144
|
+
description: 'The unique identifier of the check run',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
required: ['owner', 'repo', 'check_run_id'],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
handler: async (octokit, args) => {
|
|
151
|
+
const { data } = await octokit.checks.get({
|
|
152
|
+
owner: args.owner,
|
|
153
|
+
repo: args.repo,
|
|
154
|
+
check_run_id: args.check_run_id,
|
|
155
|
+
});
|
|
156
|
+
return successResult(data);
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
// create - Create a check run
|
|
160
|
+
{
|
|
161
|
+
definition: {
|
|
162
|
+
name: 'github_checks_create',
|
|
163
|
+
description: 'Create a new check run for a specific commit SHA. Requires GitHub App authentication.',
|
|
164
|
+
inputSchema: {
|
|
165
|
+
type: 'object',
|
|
166
|
+
properties: {
|
|
167
|
+
owner: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
description: 'Repository owner',
|
|
170
|
+
},
|
|
171
|
+
repo: {
|
|
172
|
+
type: 'string',
|
|
173
|
+
description: 'Repository name',
|
|
174
|
+
},
|
|
175
|
+
name: {
|
|
176
|
+
type: 'string',
|
|
177
|
+
description: 'The name of the check run',
|
|
178
|
+
},
|
|
179
|
+
head_sha: {
|
|
180
|
+
type: 'string',
|
|
181
|
+
description: 'The SHA of the commit to associate with this check run',
|
|
182
|
+
},
|
|
183
|
+
details_url: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: 'URL with full details of the check run',
|
|
186
|
+
},
|
|
187
|
+
external_id: {
|
|
188
|
+
type: 'string',
|
|
189
|
+
description: 'A reference for the run on the integrator system',
|
|
190
|
+
},
|
|
191
|
+
status: {
|
|
192
|
+
type: 'string',
|
|
193
|
+
enum: ['queued', 'in_progress', 'completed'],
|
|
194
|
+
description: 'The current status of the check run',
|
|
195
|
+
},
|
|
196
|
+
started_at: {
|
|
197
|
+
type: 'string',
|
|
198
|
+
description: 'ISO 8601 timestamp when the check run started',
|
|
199
|
+
},
|
|
200
|
+
conclusion: {
|
|
201
|
+
type: 'string',
|
|
202
|
+
enum: ['action_required', 'cancelled', 'failure', 'neutral', 'success', 'skipped', 'stale', 'timed_out'],
|
|
203
|
+
description: 'The final conclusion of the check (required if status is completed)',
|
|
204
|
+
},
|
|
205
|
+
completed_at: {
|
|
206
|
+
type: 'string',
|
|
207
|
+
description: 'ISO 8601 timestamp when the check run completed',
|
|
208
|
+
},
|
|
209
|
+
output_title: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
description: 'Title of the check run output',
|
|
212
|
+
},
|
|
213
|
+
output_summary: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
description: 'Summary of the check run output (supports Markdown)',
|
|
216
|
+
},
|
|
217
|
+
output_text: {
|
|
218
|
+
type: 'string',
|
|
219
|
+
description: 'Details of the check run output (supports Markdown)',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
required: ['owner', 'repo', 'name', 'head_sha'],
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
handler: async (octokit, args) => {
|
|
226
|
+
const params = {
|
|
227
|
+
owner: args.owner,
|
|
228
|
+
repo: args.repo,
|
|
229
|
+
name: args.name,
|
|
230
|
+
head_sha: args.head_sha,
|
|
231
|
+
};
|
|
232
|
+
if (args.details_url)
|
|
233
|
+
params.details_url = args.details_url;
|
|
234
|
+
if (args.external_id)
|
|
235
|
+
params.external_id = args.external_id;
|
|
236
|
+
if (args.status)
|
|
237
|
+
params.status = args.status;
|
|
238
|
+
if (args.started_at)
|
|
239
|
+
params.started_at = args.started_at;
|
|
240
|
+
if (args.conclusion)
|
|
241
|
+
params.conclusion = args.conclusion;
|
|
242
|
+
if (args.completed_at)
|
|
243
|
+
params.completed_at = args.completed_at;
|
|
244
|
+
// Build output object if any output fields are provided
|
|
245
|
+
if (args.output_title || args.output_summary) {
|
|
246
|
+
const output = {
|
|
247
|
+
title: args.output_title,
|
|
248
|
+
summary: args.output_summary,
|
|
249
|
+
};
|
|
250
|
+
if (args.output_text)
|
|
251
|
+
output.text = args.output_text;
|
|
252
|
+
params.output = output;
|
|
253
|
+
}
|
|
254
|
+
const { data } = await octokit.checks.create(params);
|
|
255
|
+
return successResult(data);
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
// update - Update a check run
|
|
259
|
+
{
|
|
260
|
+
definition: {
|
|
261
|
+
name: 'github_checks_update',
|
|
262
|
+
description: 'Update an existing check run. Requires GitHub App authentication.',
|
|
263
|
+
inputSchema: {
|
|
264
|
+
type: 'object',
|
|
265
|
+
properties: {
|
|
266
|
+
owner: {
|
|
267
|
+
type: 'string',
|
|
268
|
+
description: 'Repository owner',
|
|
269
|
+
},
|
|
270
|
+
repo: {
|
|
271
|
+
type: 'string',
|
|
272
|
+
description: 'Repository name',
|
|
273
|
+
},
|
|
274
|
+
check_run_id: {
|
|
275
|
+
type: 'number',
|
|
276
|
+
description: 'The unique identifier of the check run',
|
|
277
|
+
},
|
|
278
|
+
name: {
|
|
279
|
+
type: 'string',
|
|
280
|
+
description: 'The name of the check run',
|
|
281
|
+
},
|
|
282
|
+
details_url: {
|
|
283
|
+
type: 'string',
|
|
284
|
+
description: 'URL with full details of the check run',
|
|
285
|
+
},
|
|
286
|
+
external_id: {
|
|
287
|
+
type: 'string',
|
|
288
|
+
description: 'A reference for the run on the integrator system',
|
|
289
|
+
},
|
|
290
|
+
status: {
|
|
291
|
+
type: 'string',
|
|
292
|
+
enum: ['queued', 'in_progress', 'completed'],
|
|
293
|
+
description: 'The current status of the check run',
|
|
294
|
+
},
|
|
295
|
+
started_at: {
|
|
296
|
+
type: 'string',
|
|
297
|
+
description: 'ISO 8601 timestamp when the check run started',
|
|
298
|
+
},
|
|
299
|
+
conclusion: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
enum: ['action_required', 'cancelled', 'failure', 'neutral', 'success', 'skipped', 'stale', 'timed_out'],
|
|
302
|
+
description: 'The final conclusion of the check (required if status is completed)',
|
|
303
|
+
},
|
|
304
|
+
completed_at: {
|
|
305
|
+
type: 'string',
|
|
306
|
+
description: 'ISO 8601 timestamp when the check run completed',
|
|
307
|
+
},
|
|
308
|
+
output_title: {
|
|
309
|
+
type: 'string',
|
|
310
|
+
description: 'Title of the check run output',
|
|
311
|
+
},
|
|
312
|
+
output_summary: {
|
|
313
|
+
type: 'string',
|
|
314
|
+
description: 'Summary of the check run output (supports Markdown)',
|
|
315
|
+
},
|
|
316
|
+
output_text: {
|
|
317
|
+
type: 'string',
|
|
318
|
+
description: 'Details of the check run output (supports Markdown)',
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
required: ['owner', 'repo', 'check_run_id'],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
handler: async (octokit, args) => {
|
|
325
|
+
const params = {
|
|
326
|
+
owner: args.owner,
|
|
327
|
+
repo: args.repo,
|
|
328
|
+
check_run_id: args.check_run_id,
|
|
329
|
+
};
|
|
330
|
+
if (args.name)
|
|
331
|
+
params.name = args.name;
|
|
332
|
+
if (args.details_url)
|
|
333
|
+
params.details_url = args.details_url;
|
|
334
|
+
if (args.external_id)
|
|
335
|
+
params.external_id = args.external_id;
|
|
336
|
+
if (args.status)
|
|
337
|
+
params.status = args.status;
|
|
338
|
+
if (args.started_at)
|
|
339
|
+
params.started_at = args.started_at;
|
|
340
|
+
if (args.conclusion)
|
|
341
|
+
params.conclusion = args.conclusion;
|
|
342
|
+
if (args.completed_at)
|
|
343
|
+
params.completed_at = args.completed_at;
|
|
344
|
+
// Build output object if any output fields are provided
|
|
345
|
+
if (args.output_title || args.output_summary) {
|
|
346
|
+
const output = {
|
|
347
|
+
title: args.output_title,
|
|
348
|
+
summary: args.output_summary,
|
|
349
|
+
};
|
|
350
|
+
if (args.output_text)
|
|
351
|
+
output.text = args.output_text;
|
|
352
|
+
params.output = output;
|
|
353
|
+
}
|
|
354
|
+
const { data } = await octokit.checks.update(params);
|
|
355
|
+
return successResult(data);
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
// list_suites_for_ref - List check suites for a Git reference
|
|
359
|
+
{
|
|
360
|
+
definition: {
|
|
361
|
+
name: 'github_checks_list_suites_for_ref',
|
|
362
|
+
description: 'List check suites for a commit ref (branch name, tag, or SHA)',
|
|
363
|
+
inputSchema: {
|
|
364
|
+
type: 'object',
|
|
365
|
+
properties: {
|
|
366
|
+
owner: {
|
|
367
|
+
type: 'string',
|
|
368
|
+
description: 'Repository owner',
|
|
369
|
+
},
|
|
370
|
+
repo: {
|
|
371
|
+
type: 'string',
|
|
372
|
+
description: 'Repository name',
|
|
373
|
+
},
|
|
374
|
+
ref: {
|
|
375
|
+
type: 'string',
|
|
376
|
+
description: 'The commit reference (branch name, tag, or SHA)',
|
|
377
|
+
},
|
|
378
|
+
app_id: {
|
|
379
|
+
type: 'number',
|
|
380
|
+
description: 'Filter by GitHub App ID',
|
|
381
|
+
},
|
|
382
|
+
check_name: {
|
|
383
|
+
type: 'string',
|
|
384
|
+
description: 'Filter by check name',
|
|
385
|
+
},
|
|
386
|
+
per_page: {
|
|
387
|
+
type: 'number',
|
|
388
|
+
description: 'Results per page (max 100)',
|
|
389
|
+
},
|
|
390
|
+
page: {
|
|
391
|
+
type: 'number',
|
|
392
|
+
description: 'Page number',
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
required: ['owner', 'repo', 'ref'],
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
handler: async (octokit, args) => {
|
|
399
|
+
const { data } = await octokit.checks.listSuitesForRef({
|
|
400
|
+
owner: args.owner,
|
|
401
|
+
repo: args.repo,
|
|
402
|
+
ref: args.ref,
|
|
403
|
+
app_id: args.app_id,
|
|
404
|
+
check_name: args.check_name,
|
|
405
|
+
per_page: args.per_page,
|
|
406
|
+
page: args.page,
|
|
407
|
+
});
|
|
408
|
+
return successResult(data);
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
// get_suite - Get a check suite
|
|
412
|
+
{
|
|
413
|
+
definition: {
|
|
414
|
+
name: 'github_checks_get_suite',
|
|
415
|
+
description: 'Get a specific check suite by ID',
|
|
416
|
+
inputSchema: {
|
|
417
|
+
type: 'object',
|
|
418
|
+
properties: {
|
|
419
|
+
owner: {
|
|
420
|
+
type: 'string',
|
|
421
|
+
description: 'Repository owner',
|
|
422
|
+
},
|
|
423
|
+
repo: {
|
|
424
|
+
type: 'string',
|
|
425
|
+
description: 'Repository name',
|
|
426
|
+
},
|
|
427
|
+
check_suite_id: {
|
|
428
|
+
type: 'number',
|
|
429
|
+
description: 'The unique identifier of the check suite',
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
required: ['owner', 'repo', 'check_suite_id'],
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
handler: async (octokit, args) => {
|
|
436
|
+
const { data } = await octokit.checks.getSuite({
|
|
437
|
+
owner: args.owner,
|
|
438
|
+
repo: args.repo,
|
|
439
|
+
check_suite_id: args.check_suite_id,
|
|
440
|
+
});
|
|
441
|
+
return successResult(data);
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
// create_suite - Create a check suite
|
|
445
|
+
{
|
|
446
|
+
definition: {
|
|
447
|
+
name: 'github_checks_create_suite',
|
|
448
|
+
description: 'Manually create a check suite for a commit. Requires GitHub App authentication.',
|
|
449
|
+
inputSchema: {
|
|
450
|
+
type: 'object',
|
|
451
|
+
properties: {
|
|
452
|
+
owner: {
|
|
453
|
+
type: 'string',
|
|
454
|
+
description: 'Repository owner',
|
|
455
|
+
},
|
|
456
|
+
repo: {
|
|
457
|
+
type: 'string',
|
|
458
|
+
description: 'Repository name',
|
|
459
|
+
},
|
|
460
|
+
head_sha: {
|
|
461
|
+
type: 'string',
|
|
462
|
+
description: 'The SHA of the commit to associate with this check suite',
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
required: ['owner', 'repo', 'head_sha'],
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
handler: async (octokit, args) => {
|
|
469
|
+
const { data } = await octokit.checks.createSuite({
|
|
470
|
+
owner: args.owner,
|
|
471
|
+
repo: args.repo,
|
|
472
|
+
head_sha: args.head_sha,
|
|
473
|
+
});
|
|
474
|
+
return successResult(data);
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
// rerequest_suite - Rerequest a check suite
|
|
478
|
+
{
|
|
479
|
+
definition: {
|
|
480
|
+
name: 'github_checks_rerequest_suite',
|
|
481
|
+
description: 'Trigger a rerequest of a check suite. Causes GitHub to re-send the check_suite webhook event.',
|
|
482
|
+
inputSchema: {
|
|
483
|
+
type: 'object',
|
|
484
|
+
properties: {
|
|
485
|
+
owner: {
|
|
486
|
+
type: 'string',
|
|
487
|
+
description: 'Repository owner',
|
|
488
|
+
},
|
|
489
|
+
repo: {
|
|
490
|
+
type: 'string',
|
|
491
|
+
description: 'Repository name',
|
|
492
|
+
},
|
|
493
|
+
check_suite_id: {
|
|
494
|
+
type: 'number',
|
|
495
|
+
description: 'The unique identifier of the check suite',
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
required: ['owner', 'repo', 'check_suite_id'],
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
handler: async (octokit, args) => {
|
|
502
|
+
await octokit.checks.rerequestSuite({
|
|
503
|
+
owner: args.owner,
|
|
504
|
+
repo: args.repo,
|
|
505
|
+
check_suite_id: args.check_suite_id,
|
|
506
|
+
});
|
|
507
|
+
return successResult({ success: true, message: 'Check suite rerequest triggered' });
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
// list_annotations - List check run annotations
|
|
511
|
+
{
|
|
512
|
+
definition: {
|
|
513
|
+
name: 'github_checks_list_annotations',
|
|
514
|
+
description: 'List annotations for a check run (issues, warnings, or notices)',
|
|
515
|
+
inputSchema: {
|
|
516
|
+
type: 'object',
|
|
517
|
+
properties: {
|
|
518
|
+
owner: {
|
|
519
|
+
type: 'string',
|
|
520
|
+
description: 'Repository owner',
|
|
521
|
+
},
|
|
522
|
+
repo: {
|
|
523
|
+
type: 'string',
|
|
524
|
+
description: 'Repository name',
|
|
525
|
+
},
|
|
526
|
+
check_run_id: {
|
|
527
|
+
type: 'number',
|
|
528
|
+
description: 'The unique identifier of the check run',
|
|
529
|
+
},
|
|
530
|
+
per_page: {
|
|
531
|
+
type: 'number',
|
|
532
|
+
description: 'Results per page (max 100)',
|
|
533
|
+
},
|
|
534
|
+
page: {
|
|
535
|
+
type: 'number',
|
|
536
|
+
description: 'Page number',
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
required: ['owner', 'repo', 'check_run_id'],
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
handler: async (octokit, args) => {
|
|
543
|
+
const { data } = await octokit.checks.listAnnotations({
|
|
544
|
+
owner: args.owner,
|
|
545
|
+
repo: args.repo,
|
|
546
|
+
check_run_id: args.check_run_id,
|
|
547
|
+
per_page: args.per_page,
|
|
548
|
+
page: args.page,
|
|
549
|
+
});
|
|
550
|
+
return successResult(data);
|
|
551
|
+
},
|
|
552
|
+
},
|
|
553
|
+
],
|
|
554
|
+
};
|