@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,520 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const gitCategory = {
|
|
3
|
+
name: 'git',
|
|
4
|
+
description: 'Low-level Git operations',
|
|
5
|
+
tools: [
|
|
6
|
+
// get_blob - Get a blob
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_git_get_blob',
|
|
10
|
+
description: 'Get a blob by 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
|
+
file_sha: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'SHA of the blob',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['owner', 'repo', 'file_sha'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
handler: async (octokit, args) => {
|
|
31
|
+
const { data } = await octokit.git.getBlob({
|
|
32
|
+
owner: args.owner,
|
|
33
|
+
repo: args.repo,
|
|
34
|
+
file_sha: args.file_sha,
|
|
35
|
+
});
|
|
36
|
+
return successResult(data);
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
// create_blob - Create a blob
|
|
40
|
+
{
|
|
41
|
+
definition: {
|
|
42
|
+
name: 'github_git_create_blob',
|
|
43
|
+
description: 'Create a blob',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
owner: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Repository owner',
|
|
50
|
+
},
|
|
51
|
+
repo: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Repository name',
|
|
54
|
+
},
|
|
55
|
+
content: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'Content of the blob',
|
|
58
|
+
},
|
|
59
|
+
encoding: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
enum: ['utf-8', 'base64'],
|
|
62
|
+
description: 'Encoding of the content (utf-8 or base64)',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
required: ['owner', 'repo', 'content'],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
handler: async (octokit, args) => {
|
|
69
|
+
const { data } = await octokit.git.createBlob({
|
|
70
|
+
owner: args.owner,
|
|
71
|
+
repo: args.repo,
|
|
72
|
+
content: args.content,
|
|
73
|
+
encoding: args.encoding,
|
|
74
|
+
});
|
|
75
|
+
return successResult(data);
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
// get_commit - Get a commit
|
|
79
|
+
{
|
|
80
|
+
definition: {
|
|
81
|
+
name: 'github_git_get_commit',
|
|
82
|
+
description: 'Get a Git commit object by SHA',
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
properties: {
|
|
86
|
+
owner: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'Repository owner',
|
|
89
|
+
},
|
|
90
|
+
repo: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Repository name',
|
|
93
|
+
},
|
|
94
|
+
commit_sha: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'SHA of the commit',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
required: ['owner', 'repo', 'commit_sha'],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
handler: async (octokit, args) => {
|
|
103
|
+
const { data } = await octokit.git.getCommit({
|
|
104
|
+
owner: args.owner,
|
|
105
|
+
repo: args.repo,
|
|
106
|
+
commit_sha: args.commit_sha,
|
|
107
|
+
});
|
|
108
|
+
return successResult(data);
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
// create_commit - Create a commit
|
|
112
|
+
{
|
|
113
|
+
definition: {
|
|
114
|
+
name: 'github_git_create_commit',
|
|
115
|
+
description: 'Create a new Git commit object',
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: 'object',
|
|
118
|
+
properties: {
|
|
119
|
+
owner: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
description: 'Repository owner',
|
|
122
|
+
},
|
|
123
|
+
repo: {
|
|
124
|
+
type: 'string',
|
|
125
|
+
description: 'Repository name',
|
|
126
|
+
},
|
|
127
|
+
message: {
|
|
128
|
+
type: 'string',
|
|
129
|
+
description: 'Commit message',
|
|
130
|
+
},
|
|
131
|
+
tree: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'SHA of the tree object this commit points to',
|
|
134
|
+
},
|
|
135
|
+
parents: {
|
|
136
|
+
type: 'array',
|
|
137
|
+
items: { type: 'string' },
|
|
138
|
+
description: 'Array of parent commit SHAs',
|
|
139
|
+
},
|
|
140
|
+
author: {
|
|
141
|
+
type: 'string',
|
|
142
|
+
description: 'Author info as JSON: {"name": "...", "email": "...", "date": "..."}',
|
|
143
|
+
},
|
|
144
|
+
committer: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
description: 'Committer info as JSON: {"name": "...", "email": "...", "date": "..."}',
|
|
147
|
+
},
|
|
148
|
+
signature: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
description: 'PGP signature for the commit',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
required: ['owner', 'repo', 'message', 'tree'],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
handler: async (octokit, args) => {
|
|
157
|
+
const author = args.author ? JSON.parse(args.author) : undefined;
|
|
158
|
+
const committer = args.committer ? JSON.parse(args.committer) : undefined;
|
|
159
|
+
const { data } = await octokit.git.createCommit({
|
|
160
|
+
owner: args.owner,
|
|
161
|
+
repo: args.repo,
|
|
162
|
+
message: args.message,
|
|
163
|
+
tree: args.tree,
|
|
164
|
+
parents: args.parents,
|
|
165
|
+
author,
|
|
166
|
+
committer,
|
|
167
|
+
signature: args.signature,
|
|
168
|
+
});
|
|
169
|
+
return successResult(data);
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
// get_ref - Get a reference
|
|
173
|
+
{
|
|
174
|
+
definition: {
|
|
175
|
+
name: 'github_git_get_ref',
|
|
176
|
+
description: 'Get a Git reference (e.g., heads/main, tags/v1.0)',
|
|
177
|
+
inputSchema: {
|
|
178
|
+
type: 'object',
|
|
179
|
+
properties: {
|
|
180
|
+
owner: {
|
|
181
|
+
type: 'string',
|
|
182
|
+
description: 'Repository owner',
|
|
183
|
+
},
|
|
184
|
+
repo: {
|
|
185
|
+
type: 'string',
|
|
186
|
+
description: 'Repository name',
|
|
187
|
+
},
|
|
188
|
+
ref: {
|
|
189
|
+
type: 'string',
|
|
190
|
+
description: 'Reference name (e.g., heads/main, tags/v1.0)',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
required: ['owner', 'repo', 'ref'],
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
handler: async (octokit, args) => {
|
|
197
|
+
const { data } = await octokit.git.getRef({
|
|
198
|
+
owner: args.owner,
|
|
199
|
+
repo: args.repo,
|
|
200
|
+
ref: args.ref,
|
|
201
|
+
});
|
|
202
|
+
return successResult(data);
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
// list_matching_refs - List matching references
|
|
206
|
+
{
|
|
207
|
+
definition: {
|
|
208
|
+
name: 'github_git_list_matching_refs',
|
|
209
|
+
description: 'List references matching a prefix (e.g., heads/, tags/)',
|
|
210
|
+
inputSchema: {
|
|
211
|
+
type: 'object',
|
|
212
|
+
properties: {
|
|
213
|
+
owner: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
description: 'Repository owner',
|
|
216
|
+
},
|
|
217
|
+
repo: {
|
|
218
|
+
type: 'string',
|
|
219
|
+
description: 'Repository name',
|
|
220
|
+
},
|
|
221
|
+
ref: {
|
|
222
|
+
type: 'string',
|
|
223
|
+
description: 'Reference prefix to match (e.g., heads/, tags/)',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
required: ['owner', 'repo', 'ref'],
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
handler: async (octokit, args) => {
|
|
230
|
+
const { data } = await octokit.git.listMatchingRefs({
|
|
231
|
+
owner: args.owner,
|
|
232
|
+
repo: args.repo,
|
|
233
|
+
ref: args.ref,
|
|
234
|
+
});
|
|
235
|
+
return successResult(data);
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
// create_ref - Create a reference
|
|
239
|
+
{
|
|
240
|
+
definition: {
|
|
241
|
+
name: 'github_git_create_ref',
|
|
242
|
+
description: 'Create a Git reference (branch or tag)',
|
|
243
|
+
inputSchema: {
|
|
244
|
+
type: 'object',
|
|
245
|
+
properties: {
|
|
246
|
+
owner: {
|
|
247
|
+
type: 'string',
|
|
248
|
+
description: 'Repository owner',
|
|
249
|
+
},
|
|
250
|
+
repo: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
description: 'Repository name',
|
|
253
|
+
},
|
|
254
|
+
ref: {
|
|
255
|
+
type: 'string',
|
|
256
|
+
description: 'Full reference name (e.g., refs/heads/new-branch)',
|
|
257
|
+
},
|
|
258
|
+
sha: {
|
|
259
|
+
type: 'string',
|
|
260
|
+
description: 'SHA to point the reference to',
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
required: ['owner', 'repo', 'ref', 'sha'],
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
handler: async (octokit, args) => {
|
|
267
|
+
const { data } = await octokit.git.createRef({
|
|
268
|
+
owner: args.owner,
|
|
269
|
+
repo: args.repo,
|
|
270
|
+
ref: args.ref,
|
|
271
|
+
sha: args.sha,
|
|
272
|
+
});
|
|
273
|
+
return successResult(data);
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
// update_ref - Update a reference
|
|
277
|
+
{
|
|
278
|
+
definition: {
|
|
279
|
+
name: 'github_git_update_ref',
|
|
280
|
+
description: 'Update a Git reference to point to a new SHA',
|
|
281
|
+
inputSchema: {
|
|
282
|
+
type: 'object',
|
|
283
|
+
properties: {
|
|
284
|
+
owner: {
|
|
285
|
+
type: 'string',
|
|
286
|
+
description: 'Repository owner',
|
|
287
|
+
},
|
|
288
|
+
repo: {
|
|
289
|
+
type: 'string',
|
|
290
|
+
description: 'Repository name',
|
|
291
|
+
},
|
|
292
|
+
ref: {
|
|
293
|
+
type: 'string',
|
|
294
|
+
description: 'Reference name (e.g., heads/main, tags/v1.0)',
|
|
295
|
+
},
|
|
296
|
+
sha: {
|
|
297
|
+
type: 'string',
|
|
298
|
+
description: 'New SHA to point the reference to',
|
|
299
|
+
},
|
|
300
|
+
force: {
|
|
301
|
+
type: 'string',
|
|
302
|
+
enum: ['true', 'false'],
|
|
303
|
+
description: 'Force update even if not fast-forward',
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
required: ['owner', 'repo', 'ref', 'sha'],
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
handler: async (octokit, args) => {
|
|
310
|
+
const { data } = await octokit.git.updateRef({
|
|
311
|
+
owner: args.owner,
|
|
312
|
+
repo: args.repo,
|
|
313
|
+
ref: args.ref,
|
|
314
|
+
sha: args.sha,
|
|
315
|
+
force: args.force === 'true',
|
|
316
|
+
});
|
|
317
|
+
return successResult(data);
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
// delete_ref - Delete a reference
|
|
321
|
+
{
|
|
322
|
+
definition: {
|
|
323
|
+
name: 'github_git_delete_ref',
|
|
324
|
+
description: 'Delete a Git reference (branch or tag)',
|
|
325
|
+
inputSchema: {
|
|
326
|
+
type: 'object',
|
|
327
|
+
properties: {
|
|
328
|
+
owner: {
|
|
329
|
+
type: 'string',
|
|
330
|
+
description: 'Repository owner',
|
|
331
|
+
},
|
|
332
|
+
repo: {
|
|
333
|
+
type: 'string',
|
|
334
|
+
description: 'Repository name',
|
|
335
|
+
},
|
|
336
|
+
ref: {
|
|
337
|
+
type: 'string',
|
|
338
|
+
description: 'Reference name to delete (e.g., heads/branch-name, tags/v1.0)',
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
required: ['owner', 'repo', 'ref'],
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
handler: async (octokit, args) => {
|
|
345
|
+
await octokit.git.deleteRef({
|
|
346
|
+
owner: args.owner,
|
|
347
|
+
repo: args.repo,
|
|
348
|
+
ref: args.ref,
|
|
349
|
+
});
|
|
350
|
+
return successResult({ success: true, message: 'Reference deleted' });
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
// get_tag - Get a tag
|
|
354
|
+
{
|
|
355
|
+
definition: {
|
|
356
|
+
name: 'github_git_get_tag',
|
|
357
|
+
description: 'Get a Git tag object by SHA',
|
|
358
|
+
inputSchema: {
|
|
359
|
+
type: 'object',
|
|
360
|
+
properties: {
|
|
361
|
+
owner: {
|
|
362
|
+
type: 'string',
|
|
363
|
+
description: 'Repository owner',
|
|
364
|
+
},
|
|
365
|
+
repo: {
|
|
366
|
+
type: 'string',
|
|
367
|
+
description: 'Repository name',
|
|
368
|
+
},
|
|
369
|
+
tag_sha: {
|
|
370
|
+
type: 'string',
|
|
371
|
+
description: 'SHA of the tag',
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
required: ['owner', 'repo', 'tag_sha'],
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
handler: async (octokit, args) => {
|
|
378
|
+
const { data } = await octokit.git.getTag({
|
|
379
|
+
owner: args.owner,
|
|
380
|
+
repo: args.repo,
|
|
381
|
+
tag_sha: args.tag_sha,
|
|
382
|
+
});
|
|
383
|
+
return successResult(data);
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
// create_tag - Create a tag object
|
|
387
|
+
{
|
|
388
|
+
definition: {
|
|
389
|
+
name: 'github_git_create_tag',
|
|
390
|
+
description: 'Create a Git tag object (annotated tag)',
|
|
391
|
+
inputSchema: {
|
|
392
|
+
type: 'object',
|
|
393
|
+
properties: {
|
|
394
|
+
owner: {
|
|
395
|
+
type: 'string',
|
|
396
|
+
description: 'Repository owner',
|
|
397
|
+
},
|
|
398
|
+
repo: {
|
|
399
|
+
type: 'string',
|
|
400
|
+
description: 'Repository name',
|
|
401
|
+
},
|
|
402
|
+
tag: {
|
|
403
|
+
type: 'string',
|
|
404
|
+
description: 'Tag name',
|
|
405
|
+
},
|
|
406
|
+
message: {
|
|
407
|
+
type: 'string',
|
|
408
|
+
description: 'Tag message',
|
|
409
|
+
},
|
|
410
|
+
object: {
|
|
411
|
+
type: 'string',
|
|
412
|
+
description: 'SHA of the object to tag',
|
|
413
|
+
},
|
|
414
|
+
type: {
|
|
415
|
+
type: 'string',
|
|
416
|
+
enum: ['commit', 'tree', 'blob'],
|
|
417
|
+
description: 'Type of object being tagged',
|
|
418
|
+
},
|
|
419
|
+
tagger: {
|
|
420
|
+
type: 'string',
|
|
421
|
+
description: 'Tagger info as JSON: {"name": "...", "email": "...", "date": "..."}',
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
required: ['owner', 'repo', 'tag', 'message', 'object', 'type'],
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
handler: async (octokit, args) => {
|
|
428
|
+
const tagger = args.tagger ? JSON.parse(args.tagger) : undefined;
|
|
429
|
+
const { data } = await octokit.git.createTag({
|
|
430
|
+
owner: args.owner,
|
|
431
|
+
repo: args.repo,
|
|
432
|
+
tag: args.tag,
|
|
433
|
+
message: args.message,
|
|
434
|
+
object: args.object,
|
|
435
|
+
type: args.type,
|
|
436
|
+
tagger,
|
|
437
|
+
});
|
|
438
|
+
return successResult(data);
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
// get_tree - Get a tree
|
|
442
|
+
{
|
|
443
|
+
definition: {
|
|
444
|
+
name: 'github_git_get_tree',
|
|
445
|
+
description: 'Get a Git tree object by SHA',
|
|
446
|
+
inputSchema: {
|
|
447
|
+
type: 'object',
|
|
448
|
+
properties: {
|
|
449
|
+
owner: {
|
|
450
|
+
type: 'string',
|
|
451
|
+
description: 'Repository owner',
|
|
452
|
+
},
|
|
453
|
+
repo: {
|
|
454
|
+
type: 'string',
|
|
455
|
+
description: 'Repository name',
|
|
456
|
+
},
|
|
457
|
+
tree_sha: {
|
|
458
|
+
type: 'string',
|
|
459
|
+
description: 'SHA of the tree',
|
|
460
|
+
},
|
|
461
|
+
recursive: {
|
|
462
|
+
type: 'string',
|
|
463
|
+
enum: ['true', 'false'],
|
|
464
|
+
description: 'Recursively retrieve tree contents',
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
required: ['owner', 'repo', 'tree_sha'],
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
handler: async (octokit, args) => {
|
|
471
|
+
const { data } = await octokit.git.getTree({
|
|
472
|
+
owner: args.owner,
|
|
473
|
+
repo: args.repo,
|
|
474
|
+
tree_sha: args.tree_sha,
|
|
475
|
+
recursive: args.recursive,
|
|
476
|
+
});
|
|
477
|
+
return successResult(data);
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
// create_tree - Create a tree
|
|
481
|
+
{
|
|
482
|
+
definition: {
|
|
483
|
+
name: 'github_git_create_tree',
|
|
484
|
+
description: 'Create a Git tree object',
|
|
485
|
+
inputSchema: {
|
|
486
|
+
type: 'object',
|
|
487
|
+
properties: {
|
|
488
|
+
owner: {
|
|
489
|
+
type: 'string',
|
|
490
|
+
description: 'Repository owner',
|
|
491
|
+
},
|
|
492
|
+
repo: {
|
|
493
|
+
type: 'string',
|
|
494
|
+
description: 'Repository name',
|
|
495
|
+
},
|
|
496
|
+
tree: {
|
|
497
|
+
type: 'string',
|
|
498
|
+
description: 'Tree entries as JSON array: [{"path": "...", "mode": "100644", "type": "blob", "sha": "..."}, ...]',
|
|
499
|
+
},
|
|
500
|
+
base_tree: {
|
|
501
|
+
type: 'string',
|
|
502
|
+
description: 'SHA of the base tree to build on (for incremental updates)',
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
required: ['owner', 'repo', 'tree'],
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
handler: async (octokit, args) => {
|
|
509
|
+
const tree = JSON.parse(args.tree);
|
|
510
|
+
const { data } = await octokit.git.createTree({
|
|
511
|
+
owner: args.owner,
|
|
512
|
+
repo: args.repo,
|
|
513
|
+
tree,
|
|
514
|
+
base_tree: args.base_tree,
|
|
515
|
+
});
|
|
516
|
+
return successResult(data);
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const gitignoreCategory = {
|
|
3
|
+
name: 'gitignore',
|
|
4
|
+
description: 'GitHub gitignore templates tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// get_all_templates - List all gitignore templates
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_gitignore_get_all_templates',
|
|
10
|
+
description: 'List all available gitignore templates',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
handler: async (octokit) => {
|
|
17
|
+
const { data } = await octokit.gitignore.getAllTemplates();
|
|
18
|
+
return successResult(data);
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
// get_template - Get a specific gitignore template
|
|
22
|
+
{
|
|
23
|
+
definition: {
|
|
24
|
+
name: 'github_gitignore_get_template',
|
|
25
|
+
description: 'Get a specific gitignore template by name',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
name: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'The name of the gitignore template (e.g., "Node", "Python", "Java")',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
required: ['name'],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
handler: async (octokit, args) => {
|
|
38
|
+
const { data } = await octokit.gitignore.getTemplate({
|
|
39
|
+
name: args.name,
|
|
40
|
+
});
|
|
41
|
+
return successResult(data);
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { reposCategory } from './repos.js';
|
|
2
|
+
export { issuesCategory } from './issues.js';
|
|
3
|
+
export { pullsCategory } from './pulls.js';
|
|
4
|
+
export { usersCategory } from './users.js';
|
|
5
|
+
export { actionsCategory } from './actions.js';
|
|
6
|
+
export { searchCategory } from './search.js';
|
|
7
|
+
export { orgsCategory } from './orgs.js';
|
|
8
|
+
export { gistsCategory } from './gists.js';
|
|
9
|
+
export { checksCategory } from './checks.js';
|
|
10
|
+
export { projectsCategory } from './projects.js';
|
|
11
|
+
export { teamsCategory } from './teams.js';
|
|
12
|
+
export { activityCategory } from './activity.js';
|
|
13
|
+
export { gitCategory } from './git.js';
|
|
14
|
+
export { reactionsCategory } from './reactions.js';
|
|
15
|
+
export { packagesCategory } from './packages.js';
|
|
16
|
+
export { dependabotCategory } from './dependabot.js';
|
|
17
|
+
export { secretScanningCategory } from './secretScanning.js';
|
|
18
|
+
export { codeScanningCategory } from './codeScanning.js';
|
|
19
|
+
export { codeSecurityCategory } from './codeSecurity.js';
|
|
20
|
+
export { securityAdvisoriesCategory } from './securityAdvisories.js';
|
|
21
|
+
export { appsCategory } from './apps.js';
|
|
22
|
+
export { billingCategory } from './billing.js';
|
|
23
|
+
export { codespacesCategory } from './codespaces.js';
|
|
24
|
+
export { copilotCategory } from './copilot.js';
|
|
25
|
+
export { migrationsCategory } from './migrations.js';
|
|
26
|
+
export { interactionsCategory } from './interactions.js';
|
|
27
|
+
export { rateLimitCategory } from './rateLimit.js';
|
|
28
|
+
export { markdownCategory } from './markdown.js';
|
|
29
|
+
export { metaCategory } from './meta.js';
|
|
30
|
+
export { emojisCategory } from './emojis.js';
|
|
31
|
+
export { gitignoreCategory } from './gitignore.js';
|
|
32
|
+
export { licensesCategory } from './licenses.js';
|
|
33
|
+
export { codesOfConductCategory } from './codesOfConduct.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { reposCategory } from './repos.js';
|
|
2
|
+
export { issuesCategory } from './issues.js';
|
|
3
|
+
export { pullsCategory } from './pulls.js';
|
|
4
|
+
export { usersCategory } from './users.js';
|
|
5
|
+
export { actionsCategory } from './actions.js';
|
|
6
|
+
export { searchCategory } from './search.js';
|
|
7
|
+
export { orgsCategory } from './orgs.js';
|
|
8
|
+
export { gistsCategory } from './gists.js';
|
|
9
|
+
export { checksCategory } from './checks.js';
|
|
10
|
+
export { projectsCategory } from './projects.js';
|
|
11
|
+
export { teamsCategory } from './teams.js';
|
|
12
|
+
export { activityCategory } from './activity.js';
|
|
13
|
+
export { gitCategory } from './git.js';
|
|
14
|
+
export { reactionsCategory } from './reactions.js';
|
|
15
|
+
export { packagesCategory } from './packages.js';
|
|
16
|
+
export { dependabotCategory } from './dependabot.js';
|
|
17
|
+
export { secretScanningCategory } from './secretScanning.js';
|
|
18
|
+
export { codeScanningCategory } from './codeScanning.js';
|
|
19
|
+
export { codeSecurityCategory } from './codeSecurity.js';
|
|
20
|
+
export { securityAdvisoriesCategory } from './securityAdvisories.js';
|
|
21
|
+
export { appsCategory } from './apps.js';
|
|
22
|
+
export { billingCategory } from './billing.js';
|
|
23
|
+
export { codespacesCategory } from './codespaces.js';
|
|
24
|
+
export { copilotCategory } from './copilot.js';
|
|
25
|
+
export { migrationsCategory } from './migrations.js';
|
|
26
|
+
export { interactionsCategory } from './interactions.js';
|
|
27
|
+
export { rateLimitCategory } from './rateLimit.js';
|
|
28
|
+
export { markdownCategory } from './markdown.js';
|
|
29
|
+
export { metaCategory } from './meta.js';
|
|
30
|
+
export { emojisCategory } from './emojis.js';
|
|
31
|
+
export { gitignoreCategory } from './gitignore.js';
|
|
32
|
+
export { licensesCategory } from './licenses.js';
|
|
33
|
+
export { codesOfConductCategory } from './codesOfConduct.js';
|