@ldraney/github-mcp 0.1.0 → 0.2.0-beta.0
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/server.d.ts +8 -1
- package/dist/server.js +20 -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,918 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const packagesCategory = {
|
|
3
|
+
name: 'packages',
|
|
4
|
+
description: 'GitHub packages tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list_packages_for_authenticated_user - List packages for authenticated user
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_packages_list_packages_for_authenticated_user',
|
|
10
|
+
description: 'List packages owned by the authenticated user',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
package_type: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The type of supported package',
|
|
17
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
18
|
+
},
|
|
19
|
+
visibility: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'The visibility of the packages',
|
|
22
|
+
enum: ['public', 'private', 'internal'],
|
|
23
|
+
},
|
|
24
|
+
page: {
|
|
25
|
+
type: 'number',
|
|
26
|
+
description: 'Page number',
|
|
27
|
+
},
|
|
28
|
+
per_page: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
description: 'Results per page (max 100)',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
required: ['package_type'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
handler: async (octokit, args) => {
|
|
37
|
+
const { data } = await octokit.packages.listPackagesForAuthenticatedUser({
|
|
38
|
+
package_type: args.package_type,
|
|
39
|
+
visibility: args.visibility,
|
|
40
|
+
page: args.page,
|
|
41
|
+
per_page: args.per_page,
|
|
42
|
+
});
|
|
43
|
+
return successResult(data);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
// list_packages_for_user - List packages for a user
|
|
47
|
+
{
|
|
48
|
+
definition: {
|
|
49
|
+
name: 'github_packages_list_packages_for_user',
|
|
50
|
+
description: 'List packages for a user',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {
|
|
54
|
+
username: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'The handle for the GitHub user account',
|
|
57
|
+
},
|
|
58
|
+
package_type: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'The type of supported package',
|
|
61
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
62
|
+
},
|
|
63
|
+
visibility: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'The visibility of the packages',
|
|
66
|
+
enum: ['public', 'private', 'internal'],
|
|
67
|
+
},
|
|
68
|
+
page: {
|
|
69
|
+
type: 'number',
|
|
70
|
+
description: 'Page number',
|
|
71
|
+
},
|
|
72
|
+
per_page: {
|
|
73
|
+
type: 'number',
|
|
74
|
+
description: 'Results per page (max 100)',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
required: ['username', 'package_type'],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
handler: async (octokit, args) => {
|
|
81
|
+
const { data } = await octokit.packages.listPackagesForUser({
|
|
82
|
+
username: args.username,
|
|
83
|
+
package_type: args.package_type,
|
|
84
|
+
visibility: args.visibility,
|
|
85
|
+
page: args.page,
|
|
86
|
+
per_page: args.per_page,
|
|
87
|
+
});
|
|
88
|
+
return successResult(data);
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
// list_packages_for_organization - List packages for an organization
|
|
92
|
+
{
|
|
93
|
+
definition: {
|
|
94
|
+
name: 'github_packages_list_packages_for_organization',
|
|
95
|
+
description: 'List packages for an organization',
|
|
96
|
+
inputSchema: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
properties: {
|
|
99
|
+
org: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'The organization name',
|
|
102
|
+
},
|
|
103
|
+
package_type: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'The type of supported package',
|
|
106
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
107
|
+
},
|
|
108
|
+
visibility: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: 'The visibility of the packages',
|
|
111
|
+
enum: ['public', 'private', 'internal'],
|
|
112
|
+
},
|
|
113
|
+
page: {
|
|
114
|
+
type: 'number',
|
|
115
|
+
description: 'Page number',
|
|
116
|
+
},
|
|
117
|
+
per_page: {
|
|
118
|
+
type: 'number',
|
|
119
|
+
description: 'Results per page (max 100)',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
required: ['org', 'package_type'],
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
handler: async (octokit, args) => {
|
|
126
|
+
const { data } = await octokit.packages.listPackagesForOrganization({
|
|
127
|
+
org: args.org,
|
|
128
|
+
package_type: args.package_type,
|
|
129
|
+
visibility: args.visibility,
|
|
130
|
+
page: args.page,
|
|
131
|
+
per_page: args.per_page,
|
|
132
|
+
});
|
|
133
|
+
return successResult(data);
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
// get_package_for_authenticated_user - Get a package for authenticated user
|
|
137
|
+
{
|
|
138
|
+
definition: {
|
|
139
|
+
name: 'github_packages_get_package_for_authenticated_user',
|
|
140
|
+
description: 'Get a package owned by the authenticated user',
|
|
141
|
+
inputSchema: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
package_type: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
description: 'The type of supported package',
|
|
147
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
148
|
+
},
|
|
149
|
+
package_name: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: 'The name of the package',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
required: ['package_type', 'package_name'],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
handler: async (octokit, args) => {
|
|
158
|
+
const { data } = await octokit.packages.getPackageForAuthenticatedUser({
|
|
159
|
+
package_type: args.package_type,
|
|
160
|
+
package_name: args.package_name,
|
|
161
|
+
});
|
|
162
|
+
return successResult(data);
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
// get_package_for_user - Get a package for a user
|
|
166
|
+
{
|
|
167
|
+
definition: {
|
|
168
|
+
name: 'github_packages_get_package_for_user',
|
|
169
|
+
description: 'Get a package for a user',
|
|
170
|
+
inputSchema: {
|
|
171
|
+
type: 'object',
|
|
172
|
+
properties: {
|
|
173
|
+
username: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
description: 'The handle for the GitHub user account',
|
|
176
|
+
},
|
|
177
|
+
package_type: {
|
|
178
|
+
type: 'string',
|
|
179
|
+
description: 'The type of supported package',
|
|
180
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
181
|
+
},
|
|
182
|
+
package_name: {
|
|
183
|
+
type: 'string',
|
|
184
|
+
description: 'The name of the package',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
required: ['username', 'package_type', 'package_name'],
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
handler: async (octokit, args) => {
|
|
191
|
+
const { data } = await octokit.packages.getPackageForUser({
|
|
192
|
+
username: args.username,
|
|
193
|
+
package_type: args.package_type,
|
|
194
|
+
package_name: args.package_name,
|
|
195
|
+
});
|
|
196
|
+
return successResult(data);
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
// get_package_for_organization - Get a package for an organization
|
|
200
|
+
{
|
|
201
|
+
definition: {
|
|
202
|
+
name: 'github_packages_get_package_for_organization',
|
|
203
|
+
description: 'Get a package for an organization',
|
|
204
|
+
inputSchema: {
|
|
205
|
+
type: 'object',
|
|
206
|
+
properties: {
|
|
207
|
+
org: {
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'The organization name',
|
|
210
|
+
},
|
|
211
|
+
package_type: {
|
|
212
|
+
type: 'string',
|
|
213
|
+
description: 'The type of supported package',
|
|
214
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
215
|
+
},
|
|
216
|
+
package_name: {
|
|
217
|
+
type: 'string',
|
|
218
|
+
description: 'The name of the package',
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
required: ['org', 'package_type', 'package_name'],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
handler: async (octokit, args) => {
|
|
225
|
+
const { data } = await octokit.packages.getPackageForOrganization({
|
|
226
|
+
org: args.org,
|
|
227
|
+
package_type: args.package_type,
|
|
228
|
+
package_name: args.package_name,
|
|
229
|
+
});
|
|
230
|
+
return successResult(data);
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
// delete_package_for_authenticated_user - Delete a package for authenticated user
|
|
234
|
+
{
|
|
235
|
+
definition: {
|
|
236
|
+
name: 'github_packages_delete_package_for_authenticated_user',
|
|
237
|
+
description: 'Delete a package owned by the authenticated user',
|
|
238
|
+
inputSchema: {
|
|
239
|
+
type: 'object',
|
|
240
|
+
properties: {
|
|
241
|
+
package_type: {
|
|
242
|
+
type: 'string',
|
|
243
|
+
description: 'The type of supported package',
|
|
244
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
245
|
+
},
|
|
246
|
+
package_name: {
|
|
247
|
+
type: 'string',
|
|
248
|
+
description: 'The name of the package',
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: ['package_type', 'package_name'],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
handler: async (octokit, args) => {
|
|
255
|
+
await octokit.packages.deletePackageForAuthenticatedUser({
|
|
256
|
+
package_type: args.package_type,
|
|
257
|
+
package_name: args.package_name,
|
|
258
|
+
});
|
|
259
|
+
return successResult({ success: true, message: 'Package deleted' });
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
// delete_package_for_user - Delete a package for a user
|
|
263
|
+
{
|
|
264
|
+
definition: {
|
|
265
|
+
name: 'github_packages_delete_package_for_user',
|
|
266
|
+
description: 'Delete a package for a user',
|
|
267
|
+
inputSchema: {
|
|
268
|
+
type: 'object',
|
|
269
|
+
properties: {
|
|
270
|
+
username: {
|
|
271
|
+
type: 'string',
|
|
272
|
+
description: 'The handle for the GitHub user account',
|
|
273
|
+
},
|
|
274
|
+
package_type: {
|
|
275
|
+
type: 'string',
|
|
276
|
+
description: 'The type of supported package',
|
|
277
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
278
|
+
},
|
|
279
|
+
package_name: {
|
|
280
|
+
type: 'string',
|
|
281
|
+
description: 'The name of the package',
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
required: ['username', 'package_type', 'package_name'],
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
handler: async (octokit, args) => {
|
|
288
|
+
await octokit.packages.deletePackageForUser({
|
|
289
|
+
username: args.username,
|
|
290
|
+
package_type: args.package_type,
|
|
291
|
+
package_name: args.package_name,
|
|
292
|
+
});
|
|
293
|
+
return successResult({ success: true, message: 'Package deleted' });
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
// delete_package_for_org - Delete a package for an organization
|
|
297
|
+
{
|
|
298
|
+
definition: {
|
|
299
|
+
name: 'github_packages_delete_package_for_org',
|
|
300
|
+
description: 'Delete a package for an organization',
|
|
301
|
+
inputSchema: {
|
|
302
|
+
type: 'object',
|
|
303
|
+
properties: {
|
|
304
|
+
org: {
|
|
305
|
+
type: 'string',
|
|
306
|
+
description: 'The organization name',
|
|
307
|
+
},
|
|
308
|
+
package_type: {
|
|
309
|
+
type: 'string',
|
|
310
|
+
description: 'The type of supported package',
|
|
311
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
312
|
+
},
|
|
313
|
+
package_name: {
|
|
314
|
+
type: 'string',
|
|
315
|
+
description: 'The name of the package',
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
required: ['org', 'package_type', 'package_name'],
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
handler: async (octokit, args) => {
|
|
322
|
+
await octokit.packages.deletePackageForOrg({
|
|
323
|
+
org: args.org,
|
|
324
|
+
package_type: args.package_type,
|
|
325
|
+
package_name: args.package_name,
|
|
326
|
+
});
|
|
327
|
+
return successResult({ success: true, message: 'Package deleted' });
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
// get_all_package_versions_for_package_owned_by_authenticated_user
|
|
331
|
+
{
|
|
332
|
+
definition: {
|
|
333
|
+
name: 'github_packages_get_all_package_versions_for_package_owned_by_authenticated_user',
|
|
334
|
+
description: 'Get all package versions for a package owned by the authenticated user',
|
|
335
|
+
inputSchema: {
|
|
336
|
+
type: 'object',
|
|
337
|
+
properties: {
|
|
338
|
+
package_type: {
|
|
339
|
+
type: 'string',
|
|
340
|
+
description: 'The type of supported package',
|
|
341
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
342
|
+
},
|
|
343
|
+
package_name: {
|
|
344
|
+
type: 'string',
|
|
345
|
+
description: 'The name of the package',
|
|
346
|
+
},
|
|
347
|
+
state: {
|
|
348
|
+
type: 'string',
|
|
349
|
+
description: 'The state of the package version',
|
|
350
|
+
enum: ['active', 'deleted'],
|
|
351
|
+
},
|
|
352
|
+
page: {
|
|
353
|
+
type: 'number',
|
|
354
|
+
description: 'Page number',
|
|
355
|
+
},
|
|
356
|
+
per_page: {
|
|
357
|
+
type: 'number',
|
|
358
|
+
description: 'Results per page (max 100)',
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
required: ['package_type', 'package_name'],
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
handler: async (octokit, args) => {
|
|
365
|
+
const { data } = await octokit.packages.getAllPackageVersionsForPackageOwnedByAuthenticatedUser({
|
|
366
|
+
package_type: args.package_type,
|
|
367
|
+
package_name: args.package_name,
|
|
368
|
+
state: args.state,
|
|
369
|
+
page: args.page,
|
|
370
|
+
per_page: args.per_page,
|
|
371
|
+
});
|
|
372
|
+
return successResult(data);
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
// get_all_package_versions_for_package_owned_by_user
|
|
376
|
+
{
|
|
377
|
+
definition: {
|
|
378
|
+
name: 'github_packages_get_all_package_versions_for_package_owned_by_user',
|
|
379
|
+
description: 'Get all package versions for a package owned by a user',
|
|
380
|
+
inputSchema: {
|
|
381
|
+
type: 'object',
|
|
382
|
+
properties: {
|
|
383
|
+
username: {
|
|
384
|
+
type: 'string',
|
|
385
|
+
description: 'The handle for the GitHub user account',
|
|
386
|
+
},
|
|
387
|
+
package_type: {
|
|
388
|
+
type: 'string',
|
|
389
|
+
description: 'The type of supported package',
|
|
390
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
391
|
+
},
|
|
392
|
+
package_name: {
|
|
393
|
+
type: 'string',
|
|
394
|
+
description: 'The name of the package',
|
|
395
|
+
},
|
|
396
|
+
page: {
|
|
397
|
+
type: 'number',
|
|
398
|
+
description: 'Page number',
|
|
399
|
+
},
|
|
400
|
+
per_page: {
|
|
401
|
+
type: 'number',
|
|
402
|
+
description: 'Results per page (max 100)',
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
required: ['username', 'package_type', 'package_name'],
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
handler: async (octokit, args) => {
|
|
409
|
+
const { data } = await octokit.packages.getAllPackageVersionsForPackageOwnedByUser({
|
|
410
|
+
username: args.username,
|
|
411
|
+
package_type: args.package_type,
|
|
412
|
+
package_name: args.package_name,
|
|
413
|
+
page: args.page,
|
|
414
|
+
per_page: args.per_page,
|
|
415
|
+
});
|
|
416
|
+
return successResult(data);
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
// get_all_package_versions_for_package_owned_by_org
|
|
420
|
+
{
|
|
421
|
+
definition: {
|
|
422
|
+
name: 'github_packages_get_all_package_versions_for_package_owned_by_org',
|
|
423
|
+
description: 'Get all package versions for a package owned by an organization',
|
|
424
|
+
inputSchema: {
|
|
425
|
+
type: 'object',
|
|
426
|
+
properties: {
|
|
427
|
+
org: {
|
|
428
|
+
type: 'string',
|
|
429
|
+
description: 'The organization name',
|
|
430
|
+
},
|
|
431
|
+
package_type: {
|
|
432
|
+
type: 'string',
|
|
433
|
+
description: 'The type of supported package',
|
|
434
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
435
|
+
},
|
|
436
|
+
package_name: {
|
|
437
|
+
type: 'string',
|
|
438
|
+
description: 'The name of the package',
|
|
439
|
+
},
|
|
440
|
+
state: {
|
|
441
|
+
type: 'string',
|
|
442
|
+
description: 'The state of the package version',
|
|
443
|
+
enum: ['active', 'deleted'],
|
|
444
|
+
},
|
|
445
|
+
page: {
|
|
446
|
+
type: 'number',
|
|
447
|
+
description: 'Page number',
|
|
448
|
+
},
|
|
449
|
+
per_page: {
|
|
450
|
+
type: 'number',
|
|
451
|
+
description: 'Results per page (max 100)',
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
required: ['org', 'package_type', 'package_name'],
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
handler: async (octokit, args) => {
|
|
458
|
+
const { data } = await octokit.packages.getAllPackageVersionsForPackageOwnedByOrg({
|
|
459
|
+
org: args.org,
|
|
460
|
+
package_type: args.package_type,
|
|
461
|
+
package_name: args.package_name,
|
|
462
|
+
state: args.state,
|
|
463
|
+
page: args.page,
|
|
464
|
+
per_page: args.per_page,
|
|
465
|
+
});
|
|
466
|
+
return successResult(data);
|
|
467
|
+
},
|
|
468
|
+
},
|
|
469
|
+
// get_package_version_for_authenticated_user
|
|
470
|
+
{
|
|
471
|
+
definition: {
|
|
472
|
+
name: 'github_packages_get_package_version_for_authenticated_user',
|
|
473
|
+
description: 'Get a specific package version for the authenticated user',
|
|
474
|
+
inputSchema: {
|
|
475
|
+
type: 'object',
|
|
476
|
+
properties: {
|
|
477
|
+
package_type: {
|
|
478
|
+
type: 'string',
|
|
479
|
+
description: 'The type of supported package',
|
|
480
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
481
|
+
},
|
|
482
|
+
package_name: {
|
|
483
|
+
type: 'string',
|
|
484
|
+
description: 'The name of the package',
|
|
485
|
+
},
|
|
486
|
+
package_version_id: {
|
|
487
|
+
type: 'number',
|
|
488
|
+
description: 'The unique identifier of the package version',
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
required: ['package_type', 'package_name', 'package_version_id'],
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
handler: async (octokit, args) => {
|
|
495
|
+
const { data } = await octokit.packages.getPackageVersionForAuthenticatedUser({
|
|
496
|
+
package_type: args.package_type,
|
|
497
|
+
package_name: args.package_name,
|
|
498
|
+
package_version_id: args.package_version_id,
|
|
499
|
+
});
|
|
500
|
+
return successResult(data);
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
// get_package_version_for_user
|
|
504
|
+
{
|
|
505
|
+
definition: {
|
|
506
|
+
name: 'github_packages_get_package_version_for_user',
|
|
507
|
+
description: 'Get a specific package version for a user',
|
|
508
|
+
inputSchema: {
|
|
509
|
+
type: 'object',
|
|
510
|
+
properties: {
|
|
511
|
+
username: {
|
|
512
|
+
type: 'string',
|
|
513
|
+
description: 'The handle for the GitHub user account',
|
|
514
|
+
},
|
|
515
|
+
package_type: {
|
|
516
|
+
type: 'string',
|
|
517
|
+
description: 'The type of supported package',
|
|
518
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
519
|
+
},
|
|
520
|
+
package_name: {
|
|
521
|
+
type: 'string',
|
|
522
|
+
description: 'The name of the package',
|
|
523
|
+
},
|
|
524
|
+
package_version_id: {
|
|
525
|
+
type: 'number',
|
|
526
|
+
description: 'The unique identifier of the package version',
|
|
527
|
+
},
|
|
528
|
+
},
|
|
529
|
+
required: ['username', 'package_type', 'package_name', 'package_version_id'],
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
handler: async (octokit, args) => {
|
|
533
|
+
const { data } = await octokit.packages.getPackageVersionForUser({
|
|
534
|
+
username: args.username,
|
|
535
|
+
package_type: args.package_type,
|
|
536
|
+
package_name: args.package_name,
|
|
537
|
+
package_version_id: args.package_version_id,
|
|
538
|
+
});
|
|
539
|
+
return successResult(data);
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
// get_package_version_for_organization
|
|
543
|
+
{
|
|
544
|
+
definition: {
|
|
545
|
+
name: 'github_packages_get_package_version_for_organization',
|
|
546
|
+
description: 'Get a specific package version for an organization',
|
|
547
|
+
inputSchema: {
|
|
548
|
+
type: 'object',
|
|
549
|
+
properties: {
|
|
550
|
+
org: {
|
|
551
|
+
type: 'string',
|
|
552
|
+
description: 'The organization name',
|
|
553
|
+
},
|
|
554
|
+
package_type: {
|
|
555
|
+
type: 'string',
|
|
556
|
+
description: 'The type of supported package',
|
|
557
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
558
|
+
},
|
|
559
|
+
package_name: {
|
|
560
|
+
type: 'string',
|
|
561
|
+
description: 'The name of the package',
|
|
562
|
+
},
|
|
563
|
+
package_version_id: {
|
|
564
|
+
type: 'number',
|
|
565
|
+
description: 'The unique identifier of the package version',
|
|
566
|
+
},
|
|
567
|
+
},
|
|
568
|
+
required: ['org', 'package_type', 'package_name', 'package_version_id'],
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
handler: async (octokit, args) => {
|
|
572
|
+
const { data } = await octokit.packages.getPackageVersionForOrganization({
|
|
573
|
+
org: args.org,
|
|
574
|
+
package_type: args.package_type,
|
|
575
|
+
package_name: args.package_name,
|
|
576
|
+
package_version_id: args.package_version_id,
|
|
577
|
+
});
|
|
578
|
+
return successResult(data);
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
// delete_package_version_for_authenticated_user
|
|
582
|
+
{
|
|
583
|
+
definition: {
|
|
584
|
+
name: 'github_packages_delete_package_version_for_authenticated_user',
|
|
585
|
+
description: 'Delete a package version for the authenticated user',
|
|
586
|
+
inputSchema: {
|
|
587
|
+
type: 'object',
|
|
588
|
+
properties: {
|
|
589
|
+
package_type: {
|
|
590
|
+
type: 'string',
|
|
591
|
+
description: 'The type of supported package',
|
|
592
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
593
|
+
},
|
|
594
|
+
package_name: {
|
|
595
|
+
type: 'string',
|
|
596
|
+
description: 'The name of the package',
|
|
597
|
+
},
|
|
598
|
+
package_version_id: {
|
|
599
|
+
type: 'number',
|
|
600
|
+
description: 'The unique identifier of the package version',
|
|
601
|
+
},
|
|
602
|
+
},
|
|
603
|
+
required: ['package_type', 'package_name', 'package_version_id'],
|
|
604
|
+
},
|
|
605
|
+
},
|
|
606
|
+
handler: async (octokit, args) => {
|
|
607
|
+
await octokit.packages.deletePackageVersionForAuthenticatedUser({
|
|
608
|
+
package_type: args.package_type,
|
|
609
|
+
package_name: args.package_name,
|
|
610
|
+
package_version_id: args.package_version_id,
|
|
611
|
+
});
|
|
612
|
+
return successResult({ success: true, message: 'Package version deleted' });
|
|
613
|
+
},
|
|
614
|
+
},
|
|
615
|
+
// delete_package_version_for_user
|
|
616
|
+
{
|
|
617
|
+
definition: {
|
|
618
|
+
name: 'github_packages_delete_package_version_for_user',
|
|
619
|
+
description: 'Delete a package version for a user',
|
|
620
|
+
inputSchema: {
|
|
621
|
+
type: 'object',
|
|
622
|
+
properties: {
|
|
623
|
+
username: {
|
|
624
|
+
type: 'string',
|
|
625
|
+
description: 'The handle for the GitHub user account',
|
|
626
|
+
},
|
|
627
|
+
package_type: {
|
|
628
|
+
type: 'string',
|
|
629
|
+
description: 'The type of supported package',
|
|
630
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
631
|
+
},
|
|
632
|
+
package_name: {
|
|
633
|
+
type: 'string',
|
|
634
|
+
description: 'The name of the package',
|
|
635
|
+
},
|
|
636
|
+
package_version_id: {
|
|
637
|
+
type: 'number',
|
|
638
|
+
description: 'The unique identifier of the package version',
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
required: ['username', 'package_type', 'package_name', 'package_version_id'],
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
handler: async (octokit, args) => {
|
|
645
|
+
await octokit.packages.deletePackageVersionForUser({
|
|
646
|
+
username: args.username,
|
|
647
|
+
package_type: args.package_type,
|
|
648
|
+
package_name: args.package_name,
|
|
649
|
+
package_version_id: args.package_version_id,
|
|
650
|
+
});
|
|
651
|
+
return successResult({ success: true, message: 'Package version deleted' });
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
// delete_package_version_for_org
|
|
655
|
+
{
|
|
656
|
+
definition: {
|
|
657
|
+
name: 'github_packages_delete_package_version_for_org',
|
|
658
|
+
description: 'Delete a package version for an organization',
|
|
659
|
+
inputSchema: {
|
|
660
|
+
type: 'object',
|
|
661
|
+
properties: {
|
|
662
|
+
org: {
|
|
663
|
+
type: 'string',
|
|
664
|
+
description: 'The organization name',
|
|
665
|
+
},
|
|
666
|
+
package_type: {
|
|
667
|
+
type: 'string',
|
|
668
|
+
description: 'The type of supported package',
|
|
669
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
670
|
+
},
|
|
671
|
+
package_name: {
|
|
672
|
+
type: 'string',
|
|
673
|
+
description: 'The name of the package',
|
|
674
|
+
},
|
|
675
|
+
package_version_id: {
|
|
676
|
+
type: 'number',
|
|
677
|
+
description: 'The unique identifier of the package version',
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
required: ['org', 'package_type', 'package_name', 'package_version_id'],
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
handler: async (octokit, args) => {
|
|
684
|
+
await octokit.packages.deletePackageVersionForOrg({
|
|
685
|
+
org: args.org,
|
|
686
|
+
package_type: args.package_type,
|
|
687
|
+
package_name: args.package_name,
|
|
688
|
+
package_version_id: args.package_version_id,
|
|
689
|
+
});
|
|
690
|
+
return successResult({ success: true, message: 'Package version deleted' });
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
// restore_package_for_authenticated_user
|
|
694
|
+
{
|
|
695
|
+
definition: {
|
|
696
|
+
name: 'github_packages_restore_package_for_authenticated_user',
|
|
697
|
+
description: 'Restore a package for the authenticated user',
|
|
698
|
+
inputSchema: {
|
|
699
|
+
type: 'object',
|
|
700
|
+
properties: {
|
|
701
|
+
package_type: {
|
|
702
|
+
type: 'string',
|
|
703
|
+
description: 'The type of supported package',
|
|
704
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
705
|
+
},
|
|
706
|
+
package_name: {
|
|
707
|
+
type: 'string',
|
|
708
|
+
description: 'The name of the package',
|
|
709
|
+
},
|
|
710
|
+
token: {
|
|
711
|
+
type: 'string',
|
|
712
|
+
description: 'Package token',
|
|
713
|
+
},
|
|
714
|
+
},
|
|
715
|
+
required: ['package_type', 'package_name'],
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
handler: async (octokit, args) => {
|
|
719
|
+
await octokit.packages.restorePackageForAuthenticatedUser({
|
|
720
|
+
package_type: args.package_type,
|
|
721
|
+
package_name: args.package_name,
|
|
722
|
+
token: args.token,
|
|
723
|
+
});
|
|
724
|
+
return successResult({ success: true, message: 'Package restored' });
|
|
725
|
+
},
|
|
726
|
+
},
|
|
727
|
+
// restore_package_for_user
|
|
728
|
+
{
|
|
729
|
+
definition: {
|
|
730
|
+
name: 'github_packages_restore_package_for_user',
|
|
731
|
+
description: 'Restore a package for a user',
|
|
732
|
+
inputSchema: {
|
|
733
|
+
type: 'object',
|
|
734
|
+
properties: {
|
|
735
|
+
username: {
|
|
736
|
+
type: 'string',
|
|
737
|
+
description: 'The handle for the GitHub user account',
|
|
738
|
+
},
|
|
739
|
+
package_type: {
|
|
740
|
+
type: 'string',
|
|
741
|
+
description: 'The type of supported package',
|
|
742
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
743
|
+
},
|
|
744
|
+
package_name: {
|
|
745
|
+
type: 'string',
|
|
746
|
+
description: 'The name of the package',
|
|
747
|
+
},
|
|
748
|
+
token: {
|
|
749
|
+
type: 'string',
|
|
750
|
+
description: 'Package token',
|
|
751
|
+
},
|
|
752
|
+
},
|
|
753
|
+
required: ['username', 'package_type', 'package_name'],
|
|
754
|
+
},
|
|
755
|
+
},
|
|
756
|
+
handler: async (octokit, args) => {
|
|
757
|
+
await octokit.packages.restorePackageForUser({
|
|
758
|
+
username: args.username,
|
|
759
|
+
package_type: args.package_type,
|
|
760
|
+
package_name: args.package_name,
|
|
761
|
+
token: args.token,
|
|
762
|
+
});
|
|
763
|
+
return successResult({ success: true, message: 'Package restored' });
|
|
764
|
+
},
|
|
765
|
+
},
|
|
766
|
+
// restore_package_for_org
|
|
767
|
+
{
|
|
768
|
+
definition: {
|
|
769
|
+
name: 'github_packages_restore_package_for_org',
|
|
770
|
+
description: 'Restore a package for an organization',
|
|
771
|
+
inputSchema: {
|
|
772
|
+
type: 'object',
|
|
773
|
+
properties: {
|
|
774
|
+
org: {
|
|
775
|
+
type: 'string',
|
|
776
|
+
description: 'The organization name',
|
|
777
|
+
},
|
|
778
|
+
package_type: {
|
|
779
|
+
type: 'string',
|
|
780
|
+
description: 'The type of supported package',
|
|
781
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
782
|
+
},
|
|
783
|
+
package_name: {
|
|
784
|
+
type: 'string',
|
|
785
|
+
description: 'The name of the package',
|
|
786
|
+
},
|
|
787
|
+
token: {
|
|
788
|
+
type: 'string',
|
|
789
|
+
description: 'Package token',
|
|
790
|
+
},
|
|
791
|
+
},
|
|
792
|
+
required: ['org', 'package_type', 'package_name'],
|
|
793
|
+
},
|
|
794
|
+
},
|
|
795
|
+
handler: async (octokit, args) => {
|
|
796
|
+
await octokit.packages.restorePackageForOrg({
|
|
797
|
+
org: args.org,
|
|
798
|
+
package_type: args.package_type,
|
|
799
|
+
package_name: args.package_name,
|
|
800
|
+
token: args.token,
|
|
801
|
+
});
|
|
802
|
+
return successResult({ success: true, message: 'Package restored' });
|
|
803
|
+
},
|
|
804
|
+
},
|
|
805
|
+
// restore_package_version_for_authenticated_user
|
|
806
|
+
{
|
|
807
|
+
definition: {
|
|
808
|
+
name: 'github_packages_restore_package_version_for_authenticated_user',
|
|
809
|
+
description: 'Restore a package version for the authenticated user',
|
|
810
|
+
inputSchema: {
|
|
811
|
+
type: 'object',
|
|
812
|
+
properties: {
|
|
813
|
+
package_type: {
|
|
814
|
+
type: 'string',
|
|
815
|
+
description: 'The type of supported package',
|
|
816
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
817
|
+
},
|
|
818
|
+
package_name: {
|
|
819
|
+
type: 'string',
|
|
820
|
+
description: 'The name of the package',
|
|
821
|
+
},
|
|
822
|
+
package_version_id: {
|
|
823
|
+
type: 'number',
|
|
824
|
+
description: 'The unique identifier of the package version',
|
|
825
|
+
},
|
|
826
|
+
},
|
|
827
|
+
required: ['package_type', 'package_name', 'package_version_id'],
|
|
828
|
+
},
|
|
829
|
+
},
|
|
830
|
+
handler: async (octokit, args) => {
|
|
831
|
+
await octokit.packages.restorePackageVersionForAuthenticatedUser({
|
|
832
|
+
package_type: args.package_type,
|
|
833
|
+
package_name: args.package_name,
|
|
834
|
+
package_version_id: args.package_version_id,
|
|
835
|
+
});
|
|
836
|
+
return successResult({ success: true, message: 'Package version restored' });
|
|
837
|
+
},
|
|
838
|
+
},
|
|
839
|
+
// restore_package_version_for_user
|
|
840
|
+
{
|
|
841
|
+
definition: {
|
|
842
|
+
name: 'github_packages_restore_package_version_for_user',
|
|
843
|
+
description: 'Restore a package version for a user',
|
|
844
|
+
inputSchema: {
|
|
845
|
+
type: 'object',
|
|
846
|
+
properties: {
|
|
847
|
+
username: {
|
|
848
|
+
type: 'string',
|
|
849
|
+
description: 'The handle for the GitHub user account',
|
|
850
|
+
},
|
|
851
|
+
package_type: {
|
|
852
|
+
type: 'string',
|
|
853
|
+
description: 'The type of supported package',
|
|
854
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
855
|
+
},
|
|
856
|
+
package_name: {
|
|
857
|
+
type: 'string',
|
|
858
|
+
description: 'The name of the package',
|
|
859
|
+
},
|
|
860
|
+
package_version_id: {
|
|
861
|
+
type: 'number',
|
|
862
|
+
description: 'The unique identifier of the package version',
|
|
863
|
+
},
|
|
864
|
+
},
|
|
865
|
+
required: ['username', 'package_type', 'package_name', 'package_version_id'],
|
|
866
|
+
},
|
|
867
|
+
},
|
|
868
|
+
handler: async (octokit, args) => {
|
|
869
|
+
await octokit.packages.restorePackageVersionForUser({
|
|
870
|
+
username: args.username,
|
|
871
|
+
package_type: args.package_type,
|
|
872
|
+
package_name: args.package_name,
|
|
873
|
+
package_version_id: args.package_version_id,
|
|
874
|
+
});
|
|
875
|
+
return successResult({ success: true, message: 'Package version restored' });
|
|
876
|
+
},
|
|
877
|
+
},
|
|
878
|
+
// restore_package_version_for_org
|
|
879
|
+
{
|
|
880
|
+
definition: {
|
|
881
|
+
name: 'github_packages_restore_package_version_for_org',
|
|
882
|
+
description: 'Restore a package version for an organization',
|
|
883
|
+
inputSchema: {
|
|
884
|
+
type: 'object',
|
|
885
|
+
properties: {
|
|
886
|
+
org: {
|
|
887
|
+
type: 'string',
|
|
888
|
+
description: 'The organization name',
|
|
889
|
+
},
|
|
890
|
+
package_type: {
|
|
891
|
+
type: 'string',
|
|
892
|
+
description: 'The type of supported package',
|
|
893
|
+
enum: ['npm', 'maven', 'rubygems', 'docker', 'nuget', 'container'],
|
|
894
|
+
},
|
|
895
|
+
package_name: {
|
|
896
|
+
type: 'string',
|
|
897
|
+
description: 'The name of the package',
|
|
898
|
+
},
|
|
899
|
+
package_version_id: {
|
|
900
|
+
type: 'number',
|
|
901
|
+
description: 'The unique identifier of the package version',
|
|
902
|
+
},
|
|
903
|
+
},
|
|
904
|
+
required: ['org', 'package_type', 'package_name', 'package_version_id'],
|
|
905
|
+
},
|
|
906
|
+
},
|
|
907
|
+
handler: async (octokit, args) => {
|
|
908
|
+
await octokit.packages.restorePackageVersionForOrg({
|
|
909
|
+
org: args.org,
|
|
910
|
+
package_type: args.package_type,
|
|
911
|
+
package_name: args.package_name,
|
|
912
|
+
package_version_id: args.package_version_id,
|
|
913
|
+
});
|
|
914
|
+
return successResult({ success: true, message: 'Package version restored' });
|
|
915
|
+
},
|
|
916
|
+
},
|
|
917
|
+
],
|
|
918
|
+
};
|