@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,692 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const projectsCategory = {
|
|
3
|
+
name: 'projects',
|
|
4
|
+
description: 'GitHub projects tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list_for_repo - List projects for a repository
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_projects_list_for_repo',
|
|
10
|
+
description: 'List projects for a repository',
|
|
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
|
+
state: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
enum: ['open', 'closed', 'all'],
|
|
25
|
+
description: 'Filter by project state',
|
|
26
|
+
},
|
|
27
|
+
per_page: {
|
|
28
|
+
type: 'number',
|
|
29
|
+
description: 'Results per page (max 100)',
|
|
30
|
+
},
|
|
31
|
+
page: {
|
|
32
|
+
type: 'number',
|
|
33
|
+
description: 'Page number',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ['owner', 'repo'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
handler: async (octokit, args) => {
|
|
40
|
+
const { data } = await octokit.projects.listForRepo({
|
|
41
|
+
owner: args.owner,
|
|
42
|
+
repo: args.repo,
|
|
43
|
+
state: args.state,
|
|
44
|
+
per_page: args.per_page,
|
|
45
|
+
page: args.page,
|
|
46
|
+
});
|
|
47
|
+
return successResult(data);
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
// list_for_org - List projects for an organization
|
|
51
|
+
{
|
|
52
|
+
definition: {
|
|
53
|
+
name: 'github_projects_list_for_org',
|
|
54
|
+
description: 'List projects for an organization',
|
|
55
|
+
inputSchema: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {
|
|
58
|
+
org: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Organization name',
|
|
61
|
+
},
|
|
62
|
+
state: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
enum: ['open', 'closed', 'all'],
|
|
65
|
+
description: 'Filter by project state',
|
|
66
|
+
},
|
|
67
|
+
per_page: {
|
|
68
|
+
type: 'number',
|
|
69
|
+
description: 'Results per page (max 100)',
|
|
70
|
+
},
|
|
71
|
+
page: {
|
|
72
|
+
type: 'number',
|
|
73
|
+
description: 'Page number',
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
required: ['org'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
handler: async (octokit, args) => {
|
|
80
|
+
const { data } = await octokit.projects.listForOrg({
|
|
81
|
+
org: args.org,
|
|
82
|
+
state: args.state,
|
|
83
|
+
per_page: args.per_page,
|
|
84
|
+
page: args.page,
|
|
85
|
+
});
|
|
86
|
+
return successResult(data);
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
// list_for_user - List projects for a user
|
|
90
|
+
{
|
|
91
|
+
definition: {
|
|
92
|
+
name: 'github_projects_list_for_user',
|
|
93
|
+
description: 'List projects for a user',
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
username: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
description: 'GitHub username',
|
|
100
|
+
},
|
|
101
|
+
state: {
|
|
102
|
+
type: 'string',
|
|
103
|
+
enum: ['open', 'closed', 'all'],
|
|
104
|
+
description: 'Filter by project state',
|
|
105
|
+
},
|
|
106
|
+
per_page: {
|
|
107
|
+
type: 'number',
|
|
108
|
+
description: 'Results per page (max 100)',
|
|
109
|
+
},
|
|
110
|
+
page: {
|
|
111
|
+
type: 'number',
|
|
112
|
+
description: 'Page number',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
required: ['username'],
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
handler: async (octokit, args) => {
|
|
119
|
+
const { data } = await octokit.projects.listForUser({
|
|
120
|
+
username: args.username,
|
|
121
|
+
state: args.state,
|
|
122
|
+
per_page: args.per_page,
|
|
123
|
+
page: args.page,
|
|
124
|
+
});
|
|
125
|
+
return successResult(data);
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
// get - Get a project
|
|
129
|
+
{
|
|
130
|
+
definition: {
|
|
131
|
+
name: 'github_projects_get',
|
|
132
|
+
description: 'Get a project by ID',
|
|
133
|
+
inputSchema: {
|
|
134
|
+
type: 'object',
|
|
135
|
+
properties: {
|
|
136
|
+
project_id: {
|
|
137
|
+
type: 'number',
|
|
138
|
+
description: 'The unique identifier of the project',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
required: ['project_id'],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
handler: async (octokit, args) => {
|
|
145
|
+
const { data } = await octokit.projects.get({
|
|
146
|
+
project_id: args.project_id,
|
|
147
|
+
});
|
|
148
|
+
return successResult(data);
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
// create - Create a repository project
|
|
152
|
+
{
|
|
153
|
+
definition: {
|
|
154
|
+
name: 'github_projects_create_for_repo',
|
|
155
|
+
description: 'Create a project for a repository',
|
|
156
|
+
inputSchema: {
|
|
157
|
+
type: 'object',
|
|
158
|
+
properties: {
|
|
159
|
+
owner: {
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'Repository owner',
|
|
162
|
+
},
|
|
163
|
+
repo: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'Repository name',
|
|
166
|
+
},
|
|
167
|
+
name: {
|
|
168
|
+
type: 'string',
|
|
169
|
+
description: 'Project name',
|
|
170
|
+
},
|
|
171
|
+
body: {
|
|
172
|
+
type: 'string',
|
|
173
|
+
description: 'Project description',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
required: ['owner', 'repo', 'name'],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
handler: async (octokit, args) => {
|
|
180
|
+
const { data } = await octokit.projects.createForRepo({
|
|
181
|
+
owner: args.owner,
|
|
182
|
+
repo: args.repo,
|
|
183
|
+
name: args.name,
|
|
184
|
+
body: args.body,
|
|
185
|
+
});
|
|
186
|
+
return successResult(data);
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
// create_for_org - Create an organization project
|
|
190
|
+
{
|
|
191
|
+
definition: {
|
|
192
|
+
name: 'github_projects_create_for_org',
|
|
193
|
+
description: 'Create a project for an organization',
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
org: {
|
|
198
|
+
type: 'string',
|
|
199
|
+
description: 'Organization name',
|
|
200
|
+
},
|
|
201
|
+
name: {
|
|
202
|
+
type: 'string',
|
|
203
|
+
description: 'Project name',
|
|
204
|
+
},
|
|
205
|
+
body: {
|
|
206
|
+
type: 'string',
|
|
207
|
+
description: 'Project description',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
required: ['org', 'name'],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
handler: async (octokit, args) => {
|
|
214
|
+
const { data } = await octokit.projects.createForOrg({
|
|
215
|
+
org: args.org,
|
|
216
|
+
name: args.name,
|
|
217
|
+
body: args.body,
|
|
218
|
+
});
|
|
219
|
+
return successResult(data);
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
// create_for_authenticated_user - Create a user project
|
|
223
|
+
{
|
|
224
|
+
definition: {
|
|
225
|
+
name: 'github_projects_create_for_user',
|
|
226
|
+
description: 'Create a project for the authenticated user',
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: 'object',
|
|
229
|
+
properties: {
|
|
230
|
+
name: {
|
|
231
|
+
type: 'string',
|
|
232
|
+
description: 'Project name',
|
|
233
|
+
},
|
|
234
|
+
body: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
description: 'Project description',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
required: ['name'],
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
handler: async (octokit, args) => {
|
|
243
|
+
const { data } = await octokit.projects.createForAuthenticatedUser({
|
|
244
|
+
name: args.name,
|
|
245
|
+
body: args.body,
|
|
246
|
+
});
|
|
247
|
+
return successResult(data);
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
// update - Update a project
|
|
251
|
+
{
|
|
252
|
+
definition: {
|
|
253
|
+
name: 'github_projects_update',
|
|
254
|
+
description: 'Update a project',
|
|
255
|
+
inputSchema: {
|
|
256
|
+
type: 'object',
|
|
257
|
+
properties: {
|
|
258
|
+
project_id: {
|
|
259
|
+
type: 'number',
|
|
260
|
+
description: 'The unique identifier of the project',
|
|
261
|
+
},
|
|
262
|
+
name: {
|
|
263
|
+
type: 'string',
|
|
264
|
+
description: 'Project name',
|
|
265
|
+
},
|
|
266
|
+
body: {
|
|
267
|
+
type: 'string',
|
|
268
|
+
description: 'Project description',
|
|
269
|
+
},
|
|
270
|
+
state: {
|
|
271
|
+
type: 'string',
|
|
272
|
+
enum: ['open', 'closed'],
|
|
273
|
+
description: 'Project state',
|
|
274
|
+
},
|
|
275
|
+
organization_permission: {
|
|
276
|
+
type: 'string',
|
|
277
|
+
enum: ['read', 'write', 'admin', 'none'],
|
|
278
|
+
description: 'Organization permission level',
|
|
279
|
+
},
|
|
280
|
+
private: {
|
|
281
|
+
type: 'string',
|
|
282
|
+
enum: ['true', 'false'],
|
|
283
|
+
description: 'Whether the project is private',
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
required: ['project_id'],
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
handler: async (octokit, args) => {
|
|
290
|
+
const { data } = await octokit.projects.update({
|
|
291
|
+
project_id: args.project_id,
|
|
292
|
+
name: args.name,
|
|
293
|
+
body: args.body,
|
|
294
|
+
state: args.state,
|
|
295
|
+
organization_permission: args.organization_permission,
|
|
296
|
+
private: args.private !== undefined ? args.private === 'true' : undefined,
|
|
297
|
+
});
|
|
298
|
+
return successResult(data);
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
// delete - Delete a project
|
|
302
|
+
{
|
|
303
|
+
definition: {
|
|
304
|
+
name: 'github_projects_delete',
|
|
305
|
+
description: 'Delete a project',
|
|
306
|
+
inputSchema: {
|
|
307
|
+
type: 'object',
|
|
308
|
+
properties: {
|
|
309
|
+
project_id: {
|
|
310
|
+
type: 'number',
|
|
311
|
+
description: 'The unique identifier of the project',
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
required: ['project_id'],
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
handler: async (octokit, args) => {
|
|
318
|
+
await octokit.projects.delete({
|
|
319
|
+
project_id: args.project_id,
|
|
320
|
+
});
|
|
321
|
+
return successResult({ success: true, message: 'Project deleted' });
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
// list_columns - List project columns
|
|
325
|
+
{
|
|
326
|
+
definition: {
|
|
327
|
+
name: 'github_projects_list_columns',
|
|
328
|
+
description: 'List columns in a project',
|
|
329
|
+
inputSchema: {
|
|
330
|
+
type: 'object',
|
|
331
|
+
properties: {
|
|
332
|
+
project_id: {
|
|
333
|
+
type: 'number',
|
|
334
|
+
description: 'The unique identifier of the project',
|
|
335
|
+
},
|
|
336
|
+
per_page: {
|
|
337
|
+
type: 'number',
|
|
338
|
+
description: 'Results per page (max 100)',
|
|
339
|
+
},
|
|
340
|
+
page: {
|
|
341
|
+
type: 'number',
|
|
342
|
+
description: 'Page number',
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
required: ['project_id'],
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
handler: async (octokit, args) => {
|
|
349
|
+
const { data } = await octokit.projects.listColumns({
|
|
350
|
+
project_id: args.project_id,
|
|
351
|
+
per_page: args.per_page,
|
|
352
|
+
page: args.page,
|
|
353
|
+
});
|
|
354
|
+
return successResult(data);
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
// get_column - Get a project column
|
|
358
|
+
{
|
|
359
|
+
definition: {
|
|
360
|
+
name: 'github_projects_get_column',
|
|
361
|
+
description: 'Get a project column by ID',
|
|
362
|
+
inputSchema: {
|
|
363
|
+
type: 'object',
|
|
364
|
+
properties: {
|
|
365
|
+
column_id: {
|
|
366
|
+
type: 'number',
|
|
367
|
+
description: 'The unique identifier of the column',
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
required: ['column_id'],
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
handler: async (octokit, args) => {
|
|
374
|
+
const { data } = await octokit.projects.getColumn({
|
|
375
|
+
column_id: args.column_id,
|
|
376
|
+
});
|
|
377
|
+
return successResult(data);
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
// create_column - Create a project column
|
|
381
|
+
{
|
|
382
|
+
definition: {
|
|
383
|
+
name: 'github_projects_create_column',
|
|
384
|
+
description: 'Create a column in a project',
|
|
385
|
+
inputSchema: {
|
|
386
|
+
type: 'object',
|
|
387
|
+
properties: {
|
|
388
|
+
project_id: {
|
|
389
|
+
type: 'number',
|
|
390
|
+
description: 'The unique identifier of the project',
|
|
391
|
+
},
|
|
392
|
+
name: {
|
|
393
|
+
type: 'string',
|
|
394
|
+
description: 'Column name',
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
required: ['project_id', 'name'],
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
handler: async (octokit, args) => {
|
|
401
|
+
const { data } = await octokit.projects.createColumn({
|
|
402
|
+
project_id: args.project_id,
|
|
403
|
+
name: args.name,
|
|
404
|
+
});
|
|
405
|
+
return successResult(data);
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
// update_column - Update a project column
|
|
409
|
+
{
|
|
410
|
+
definition: {
|
|
411
|
+
name: 'github_projects_update_column',
|
|
412
|
+
description: 'Update a project column',
|
|
413
|
+
inputSchema: {
|
|
414
|
+
type: 'object',
|
|
415
|
+
properties: {
|
|
416
|
+
column_id: {
|
|
417
|
+
type: 'number',
|
|
418
|
+
description: 'The unique identifier of the column',
|
|
419
|
+
},
|
|
420
|
+
name: {
|
|
421
|
+
type: 'string',
|
|
422
|
+
description: 'Column name',
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
required: ['column_id', 'name'],
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
handler: async (octokit, args) => {
|
|
429
|
+
const { data } = await octokit.projects.updateColumn({
|
|
430
|
+
column_id: args.column_id,
|
|
431
|
+
name: args.name,
|
|
432
|
+
});
|
|
433
|
+
return successResult(data);
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
// delete_column - Delete a project column
|
|
437
|
+
{
|
|
438
|
+
definition: {
|
|
439
|
+
name: 'github_projects_delete_column',
|
|
440
|
+
description: 'Delete a project column',
|
|
441
|
+
inputSchema: {
|
|
442
|
+
type: 'object',
|
|
443
|
+
properties: {
|
|
444
|
+
column_id: {
|
|
445
|
+
type: 'number',
|
|
446
|
+
description: 'The unique identifier of the column',
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
required: ['column_id'],
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
handler: async (octokit, args) => {
|
|
453
|
+
await octokit.projects.deleteColumn({
|
|
454
|
+
column_id: args.column_id,
|
|
455
|
+
});
|
|
456
|
+
return successResult({ success: true, message: 'Column deleted' });
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
// list_cards - List project cards in a column
|
|
460
|
+
{
|
|
461
|
+
definition: {
|
|
462
|
+
name: 'github_projects_list_cards',
|
|
463
|
+
description: 'List cards in a project column',
|
|
464
|
+
inputSchema: {
|
|
465
|
+
type: 'object',
|
|
466
|
+
properties: {
|
|
467
|
+
column_id: {
|
|
468
|
+
type: 'number',
|
|
469
|
+
description: 'The unique identifier of the column',
|
|
470
|
+
},
|
|
471
|
+
archived_state: {
|
|
472
|
+
type: 'string',
|
|
473
|
+
enum: ['all', 'archived', 'not_archived'],
|
|
474
|
+
description: 'Filter by archived state',
|
|
475
|
+
},
|
|
476
|
+
per_page: {
|
|
477
|
+
type: 'number',
|
|
478
|
+
description: 'Results per page (max 100)',
|
|
479
|
+
},
|
|
480
|
+
page: {
|
|
481
|
+
type: 'number',
|
|
482
|
+
description: 'Page number',
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
required: ['column_id'],
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
handler: async (octokit, args) => {
|
|
489
|
+
const { data } = await octokit.projects.listCards({
|
|
490
|
+
column_id: args.column_id,
|
|
491
|
+
archived_state: args.archived_state,
|
|
492
|
+
per_page: args.per_page,
|
|
493
|
+
page: args.page,
|
|
494
|
+
});
|
|
495
|
+
return successResult(data);
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
// get_card - Get a project card
|
|
499
|
+
{
|
|
500
|
+
definition: {
|
|
501
|
+
name: 'github_projects_get_card',
|
|
502
|
+
description: 'Get a project card by ID',
|
|
503
|
+
inputSchema: {
|
|
504
|
+
type: 'object',
|
|
505
|
+
properties: {
|
|
506
|
+
card_id: {
|
|
507
|
+
type: 'number',
|
|
508
|
+
description: 'The unique identifier of the card',
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
required: ['card_id'],
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
handler: async (octokit, args) => {
|
|
515
|
+
const { data } = await octokit.projects.getCard({
|
|
516
|
+
card_id: args.card_id,
|
|
517
|
+
});
|
|
518
|
+
return successResult(data);
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
// create_card - Create a project card
|
|
522
|
+
{
|
|
523
|
+
definition: {
|
|
524
|
+
name: 'github_projects_create_card',
|
|
525
|
+
description: 'Create a card in a project column. Either provide note for a note card, or content_id and content_type for an issue/PR card.',
|
|
526
|
+
inputSchema: {
|
|
527
|
+
type: 'object',
|
|
528
|
+
properties: {
|
|
529
|
+
column_id: {
|
|
530
|
+
type: 'number',
|
|
531
|
+
description: 'The unique identifier of the column',
|
|
532
|
+
},
|
|
533
|
+
note: {
|
|
534
|
+
type: 'string',
|
|
535
|
+
description: 'Note content for the card (for note cards)',
|
|
536
|
+
},
|
|
537
|
+
content_id: {
|
|
538
|
+
type: 'number',
|
|
539
|
+
description: 'Issue or pull request ID (for issue/PR cards)',
|
|
540
|
+
},
|
|
541
|
+
content_type: {
|
|
542
|
+
type: 'string',
|
|
543
|
+
enum: ['Issue', 'PullRequest'],
|
|
544
|
+
description: 'Content type (for issue/PR cards)',
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
required: ['column_id'],
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
handler: async (octokit, args) => {
|
|
551
|
+
let data;
|
|
552
|
+
if (args.note !== undefined) {
|
|
553
|
+
const result = await octokit.projects.createCard({
|
|
554
|
+
column_id: args.column_id,
|
|
555
|
+
note: args.note,
|
|
556
|
+
});
|
|
557
|
+
data = result.data;
|
|
558
|
+
}
|
|
559
|
+
else if (args.content_id !== undefined && args.content_type !== undefined) {
|
|
560
|
+
const result = await octokit.projects.createCard({
|
|
561
|
+
column_id: args.column_id,
|
|
562
|
+
content_id: args.content_id,
|
|
563
|
+
content_type: args.content_type,
|
|
564
|
+
});
|
|
565
|
+
data = result.data;
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
throw new Error('Either note or content_id+content_type must be provided');
|
|
569
|
+
}
|
|
570
|
+
return successResult(data);
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
// update_card - Update a project card
|
|
574
|
+
{
|
|
575
|
+
definition: {
|
|
576
|
+
name: 'github_projects_update_card',
|
|
577
|
+
description: 'Update a project card',
|
|
578
|
+
inputSchema: {
|
|
579
|
+
type: 'object',
|
|
580
|
+
properties: {
|
|
581
|
+
card_id: {
|
|
582
|
+
type: 'number',
|
|
583
|
+
description: 'The unique identifier of the card',
|
|
584
|
+
},
|
|
585
|
+
note: {
|
|
586
|
+
type: 'string',
|
|
587
|
+
description: 'Note content for the card',
|
|
588
|
+
},
|
|
589
|
+
archived: {
|
|
590
|
+
type: 'string',
|
|
591
|
+
enum: ['true', 'false'],
|
|
592
|
+
description: 'Whether the card is archived',
|
|
593
|
+
},
|
|
594
|
+
},
|
|
595
|
+
required: ['card_id'],
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
handler: async (octokit, args) => {
|
|
599
|
+
const { data } = await octokit.projects.updateCard({
|
|
600
|
+
card_id: args.card_id,
|
|
601
|
+
note: args.note,
|
|
602
|
+
archived: args.archived !== undefined ? args.archived === 'true' : undefined,
|
|
603
|
+
});
|
|
604
|
+
return successResult(data);
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
// delete_card - Delete a project card
|
|
608
|
+
{
|
|
609
|
+
definition: {
|
|
610
|
+
name: 'github_projects_delete_card',
|
|
611
|
+
description: 'Delete a project card',
|
|
612
|
+
inputSchema: {
|
|
613
|
+
type: 'object',
|
|
614
|
+
properties: {
|
|
615
|
+
card_id: {
|
|
616
|
+
type: 'number',
|
|
617
|
+
description: 'The unique identifier of the card',
|
|
618
|
+
},
|
|
619
|
+
},
|
|
620
|
+
required: ['card_id'],
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
handler: async (octokit, args) => {
|
|
624
|
+
await octokit.projects.deleteCard({
|
|
625
|
+
card_id: args.card_id,
|
|
626
|
+
});
|
|
627
|
+
return successResult({ success: true, message: 'Card deleted' });
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
// move_card - Move a project card
|
|
631
|
+
{
|
|
632
|
+
definition: {
|
|
633
|
+
name: 'github_projects_move_card',
|
|
634
|
+
description: 'Move a project card to a different position or column',
|
|
635
|
+
inputSchema: {
|
|
636
|
+
type: 'object',
|
|
637
|
+
properties: {
|
|
638
|
+
card_id: {
|
|
639
|
+
type: 'number',
|
|
640
|
+
description: 'The unique identifier of the card',
|
|
641
|
+
},
|
|
642
|
+
position: {
|
|
643
|
+
type: 'string',
|
|
644
|
+
description: 'Position to move the card (e.g., "top", "bottom", or "after:<card_id>")',
|
|
645
|
+
},
|
|
646
|
+
column_id: {
|
|
647
|
+
type: 'number',
|
|
648
|
+
description: 'Column ID to move the card to (optional, for moving between columns)',
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
required: ['card_id', 'position'],
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
handler: async (octokit, args) => {
|
|
655
|
+
const { data } = await octokit.projects.moveCard({
|
|
656
|
+
card_id: args.card_id,
|
|
657
|
+
position: args.position,
|
|
658
|
+
column_id: args.column_id,
|
|
659
|
+
});
|
|
660
|
+
return successResult(data || { success: true, message: 'Card moved' });
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
// move_column - Move a project column
|
|
664
|
+
{
|
|
665
|
+
definition: {
|
|
666
|
+
name: 'github_projects_move_column',
|
|
667
|
+
description: 'Move a project column to a different position',
|
|
668
|
+
inputSchema: {
|
|
669
|
+
type: 'object',
|
|
670
|
+
properties: {
|
|
671
|
+
column_id: {
|
|
672
|
+
type: 'number',
|
|
673
|
+
description: 'The unique identifier of the column',
|
|
674
|
+
},
|
|
675
|
+
position: {
|
|
676
|
+
type: 'string',
|
|
677
|
+
description: 'Position to move the column (e.g., "first", "last", or "after:<column_id>")',
|
|
678
|
+
},
|
|
679
|
+
},
|
|
680
|
+
required: ['column_id', 'position'],
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
handler: async (octokit, args) => {
|
|
684
|
+
const { data } = await octokit.projects.moveColumn({
|
|
685
|
+
column_id: args.column_id,
|
|
686
|
+
position: args.position,
|
|
687
|
+
});
|
|
688
|
+
return successResult(data || { success: true, message: 'Column moved' });
|
|
689
|
+
},
|
|
690
|
+
},
|
|
691
|
+
],
|
|
692
|
+
};
|