@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,375 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const codeScanningCategory = {
|
|
3
|
+
name: 'codeScanning',
|
|
4
|
+
description: 'Code scanning tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list_alerts_for_repo - List code scanning alerts for a repository
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_codeScanning_list_alerts_for_repo',
|
|
10
|
+
description: 'List code scanning alerts for a repository. Requires GitHub Advanced Security.',
|
|
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
|
+
tool_name: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'The name of the tool used to generate the code scanning analysis',
|
|
25
|
+
},
|
|
26
|
+
tool_guid: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'The GUID of the tool used to generate the code scanning analysis',
|
|
29
|
+
},
|
|
30
|
+
ref: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Git reference (branch name, tag, or SHA)',
|
|
33
|
+
},
|
|
34
|
+
state: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
enum: ['open', 'closed', 'dismissed', 'fixed'],
|
|
37
|
+
description: 'Filter by alert state',
|
|
38
|
+
},
|
|
39
|
+
severity: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
enum: ['critical', 'high', 'medium', 'low', 'warning', 'note', 'error'],
|
|
42
|
+
description: 'Filter by severity',
|
|
43
|
+
},
|
|
44
|
+
per_page: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
description: 'Results per page (max 100)',
|
|
47
|
+
},
|
|
48
|
+
page: {
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: 'Page number',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
required: ['owner', 'repo'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
handler: async (octokit, args) => {
|
|
57
|
+
const { data } = await octokit.codeScanning.listAlertsForRepo({
|
|
58
|
+
owner: args.owner,
|
|
59
|
+
repo: args.repo,
|
|
60
|
+
tool_name: args.tool_name,
|
|
61
|
+
tool_guid: args.tool_guid,
|
|
62
|
+
ref: args.ref,
|
|
63
|
+
state: args.state,
|
|
64
|
+
severity: args.severity,
|
|
65
|
+
per_page: args.per_page,
|
|
66
|
+
page: args.page,
|
|
67
|
+
});
|
|
68
|
+
return successResult(data);
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
// get_alert - Get a code scanning alert
|
|
72
|
+
{
|
|
73
|
+
definition: {
|
|
74
|
+
name: 'github_codeScanning_get_alert',
|
|
75
|
+
description: 'Get a specific code scanning alert by number. Requires GitHub Advanced Security.',
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
owner: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'Repository owner',
|
|
82
|
+
},
|
|
83
|
+
repo: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'Repository name',
|
|
86
|
+
},
|
|
87
|
+
alert_number: {
|
|
88
|
+
type: 'number',
|
|
89
|
+
description: 'The number of the code scanning alert',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
required: ['owner', 'repo', 'alert_number'],
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
handler: async (octokit, args) => {
|
|
96
|
+
const { data } = await octokit.codeScanning.getAlert({
|
|
97
|
+
owner: args.owner,
|
|
98
|
+
repo: args.repo,
|
|
99
|
+
alert_number: args.alert_number,
|
|
100
|
+
});
|
|
101
|
+
return successResult(data);
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
// update_alert - Update a code scanning alert
|
|
105
|
+
{
|
|
106
|
+
definition: {
|
|
107
|
+
name: 'github_codeScanning_update_alert',
|
|
108
|
+
description: 'Update the status of a code scanning alert. Requires GitHub Advanced Security.',
|
|
109
|
+
inputSchema: {
|
|
110
|
+
type: 'object',
|
|
111
|
+
properties: {
|
|
112
|
+
owner: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Repository owner',
|
|
115
|
+
},
|
|
116
|
+
repo: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
description: 'Repository name',
|
|
119
|
+
},
|
|
120
|
+
alert_number: {
|
|
121
|
+
type: 'number',
|
|
122
|
+
description: 'The number of the code scanning alert',
|
|
123
|
+
},
|
|
124
|
+
state: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
enum: ['open', 'dismissed'],
|
|
127
|
+
description: 'The state of the alert (open or dismissed)',
|
|
128
|
+
},
|
|
129
|
+
dismissed_reason: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
enum: ['false positive', 'won\'t fix', 'used in tests'],
|
|
132
|
+
description: 'The reason for dismissing the alert (required when state is dismissed)',
|
|
133
|
+
},
|
|
134
|
+
dismissed_comment: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'A comment explaining why the alert was dismissed',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
required: ['owner', 'repo', 'alert_number', 'state'],
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
handler: async (octokit, args) => {
|
|
143
|
+
const { data } = await octokit.codeScanning.updateAlert({
|
|
144
|
+
owner: args.owner,
|
|
145
|
+
repo: args.repo,
|
|
146
|
+
alert_number: args.alert_number,
|
|
147
|
+
state: args.state,
|
|
148
|
+
dismissed_reason: args.dismissed_reason,
|
|
149
|
+
dismissed_comment: args.dismissed_comment,
|
|
150
|
+
});
|
|
151
|
+
return successResult(data);
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
// list_recent_analyses - List code scanning analyses for a repository
|
|
155
|
+
{
|
|
156
|
+
definition: {
|
|
157
|
+
name: 'github_codeScanning_list_recent_analyses',
|
|
158
|
+
description: 'List code scanning analyses for a repository. Requires GitHub Advanced Security.',
|
|
159
|
+
inputSchema: {
|
|
160
|
+
type: 'object',
|
|
161
|
+
properties: {
|
|
162
|
+
owner: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
description: 'Repository owner',
|
|
165
|
+
},
|
|
166
|
+
repo: {
|
|
167
|
+
type: 'string',
|
|
168
|
+
description: 'Repository name',
|
|
169
|
+
},
|
|
170
|
+
tool_name: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
description: 'The name of the tool used to generate the code scanning analysis',
|
|
173
|
+
},
|
|
174
|
+
tool_guid: {
|
|
175
|
+
type: 'string',
|
|
176
|
+
description: 'The GUID of the tool used to generate the code scanning analysis',
|
|
177
|
+
},
|
|
178
|
+
ref: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
description: 'Git reference (branch name, tag, or SHA)',
|
|
181
|
+
},
|
|
182
|
+
sarif_id: {
|
|
183
|
+
type: 'string',
|
|
184
|
+
description: 'Filter by SARIF ID',
|
|
185
|
+
},
|
|
186
|
+
per_page: {
|
|
187
|
+
type: 'number',
|
|
188
|
+
description: 'Results per page (max 100)',
|
|
189
|
+
},
|
|
190
|
+
page: {
|
|
191
|
+
type: 'number',
|
|
192
|
+
description: 'Page number',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
required: ['owner', 'repo'],
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
handler: async (octokit, args) => {
|
|
199
|
+
const { data } = await octokit.codeScanning.listRecentAnalyses({
|
|
200
|
+
owner: args.owner,
|
|
201
|
+
repo: args.repo,
|
|
202
|
+
tool_name: args.tool_name,
|
|
203
|
+
tool_guid: args.tool_guid,
|
|
204
|
+
ref: args.ref,
|
|
205
|
+
sarif_id: args.sarif_id,
|
|
206
|
+
per_page: args.per_page,
|
|
207
|
+
page: args.page,
|
|
208
|
+
});
|
|
209
|
+
return successResult(data);
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
// get_analysis - Get a code scanning analysis for a repository
|
|
213
|
+
{
|
|
214
|
+
definition: {
|
|
215
|
+
name: 'github_codeScanning_get_analysis',
|
|
216
|
+
description: 'Get a specific code scanning analysis by ID. Requires GitHub Advanced Security.',
|
|
217
|
+
inputSchema: {
|
|
218
|
+
type: 'object',
|
|
219
|
+
properties: {
|
|
220
|
+
owner: {
|
|
221
|
+
type: 'string',
|
|
222
|
+
description: 'Repository owner',
|
|
223
|
+
},
|
|
224
|
+
repo: {
|
|
225
|
+
type: 'string',
|
|
226
|
+
description: 'Repository name',
|
|
227
|
+
},
|
|
228
|
+
analysis_id: {
|
|
229
|
+
type: 'number',
|
|
230
|
+
description: 'The unique identifier of the analysis',
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
required: ['owner', 'repo', 'analysis_id'],
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
handler: async (octokit, args) => {
|
|
237
|
+
const { data } = await octokit.codeScanning.getAnalysis({
|
|
238
|
+
owner: args.owner,
|
|
239
|
+
repo: args.repo,
|
|
240
|
+
analysis_id: args.analysis_id,
|
|
241
|
+
});
|
|
242
|
+
return successResult(data);
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
// delete_analysis - Delete a code scanning analysis
|
|
246
|
+
{
|
|
247
|
+
definition: {
|
|
248
|
+
name: 'github_codeScanning_delete_analysis',
|
|
249
|
+
description: 'Delete a code scanning analysis. Requires GitHub Advanced Security and admin access.',
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
owner: {
|
|
254
|
+
type: 'string',
|
|
255
|
+
description: 'Repository owner',
|
|
256
|
+
},
|
|
257
|
+
repo: {
|
|
258
|
+
type: 'string',
|
|
259
|
+
description: 'Repository name',
|
|
260
|
+
},
|
|
261
|
+
analysis_id: {
|
|
262
|
+
type: 'number',
|
|
263
|
+
description: 'The unique identifier of the analysis',
|
|
264
|
+
},
|
|
265
|
+
confirm_delete: {
|
|
266
|
+
type: 'string',
|
|
267
|
+
description: 'Set to the analysis ID to confirm deletion of the last analysis for a ref',
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
required: ['owner', 'repo', 'analysis_id'],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
handler: async (octokit, args) => {
|
|
274
|
+
const { data } = await octokit.codeScanning.deleteAnalysis({
|
|
275
|
+
owner: args.owner,
|
|
276
|
+
repo: args.repo,
|
|
277
|
+
analysis_id: args.analysis_id,
|
|
278
|
+
confirm_delete: args.confirm_delete,
|
|
279
|
+
});
|
|
280
|
+
return successResult(data);
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
// upload_sarif - Upload a SARIF file
|
|
284
|
+
{
|
|
285
|
+
definition: {
|
|
286
|
+
name: 'github_codeScanning_upload_sarif',
|
|
287
|
+
description: 'Upload a SARIF file containing code scanning results. Requires GitHub Advanced Security.',
|
|
288
|
+
inputSchema: {
|
|
289
|
+
type: 'object',
|
|
290
|
+
properties: {
|
|
291
|
+
owner: {
|
|
292
|
+
type: 'string',
|
|
293
|
+
description: 'Repository owner',
|
|
294
|
+
},
|
|
295
|
+
repo: {
|
|
296
|
+
type: 'string',
|
|
297
|
+
description: 'Repository name',
|
|
298
|
+
},
|
|
299
|
+
commit_sha: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
description: 'The SHA of the commit to which the analysis applies',
|
|
302
|
+
},
|
|
303
|
+
ref: {
|
|
304
|
+
type: 'string',
|
|
305
|
+
description: 'The full Git reference (e.g., refs/heads/main)',
|
|
306
|
+
},
|
|
307
|
+
sarif: {
|
|
308
|
+
type: 'string',
|
|
309
|
+
description: 'A Base64-encoded, gzip-compressed SARIF file',
|
|
310
|
+
},
|
|
311
|
+
checkout_uri: {
|
|
312
|
+
type: 'string',
|
|
313
|
+
description: 'The URI of the repository checkout (for relative file paths)',
|
|
314
|
+
},
|
|
315
|
+
started_at: {
|
|
316
|
+
type: 'string',
|
|
317
|
+
description: 'ISO 8601 timestamp when the analysis started',
|
|
318
|
+
},
|
|
319
|
+
tool_name: {
|
|
320
|
+
type: 'string',
|
|
321
|
+
description: 'The name of the tool used to generate the code scanning analysis',
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
required: ['owner', 'repo', 'commit_sha', 'ref', 'sarif'],
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
handler: async (octokit, args) => {
|
|
328
|
+
const { data } = await octokit.codeScanning.uploadSarif({
|
|
329
|
+
owner: args.owner,
|
|
330
|
+
repo: args.repo,
|
|
331
|
+
commit_sha: args.commit_sha,
|
|
332
|
+
ref: args.ref,
|
|
333
|
+
sarif: args.sarif,
|
|
334
|
+
checkout_uri: args.checkout_uri,
|
|
335
|
+
started_at: args.started_at,
|
|
336
|
+
tool_name: args.tool_name,
|
|
337
|
+
});
|
|
338
|
+
return successResult(data);
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
// get_sarif - Get information about a SARIF upload
|
|
342
|
+
{
|
|
343
|
+
definition: {
|
|
344
|
+
name: 'github_codeScanning_get_sarif',
|
|
345
|
+
description: 'Get information about a SARIF upload. Requires GitHub Advanced Security.',
|
|
346
|
+
inputSchema: {
|
|
347
|
+
type: 'object',
|
|
348
|
+
properties: {
|
|
349
|
+
owner: {
|
|
350
|
+
type: 'string',
|
|
351
|
+
description: 'Repository owner',
|
|
352
|
+
},
|
|
353
|
+
repo: {
|
|
354
|
+
type: 'string',
|
|
355
|
+
description: 'Repository name',
|
|
356
|
+
},
|
|
357
|
+
sarif_id: {
|
|
358
|
+
type: 'string',
|
|
359
|
+
description: 'The SARIF ID obtained from the upload response',
|
|
360
|
+
},
|
|
361
|
+
},
|
|
362
|
+
required: ['owner', 'repo', 'sarif_id'],
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
handler: async (octokit, args) => {
|
|
366
|
+
const { data } = await octokit.codeScanning.getSarif({
|
|
367
|
+
owner: args.owner,
|
|
368
|
+
repo: args.repo,
|
|
369
|
+
sarif_id: args.sarif_id,
|
|
370
|
+
});
|
|
371
|
+
return successResult(data);
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
],
|
|
375
|
+
};
|