@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
|
@@ -1,425 +1,727 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const issuesCategory = {
|
|
3
|
+
name: 'issues',
|
|
4
|
+
description: 'Issue management tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list - List issues for a repository
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_issues_list',
|
|
10
|
+
description: 'List issues 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: 'Issue state filter',
|
|
26
|
+
},
|
|
27
|
+
labels: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'Comma-separated list of label names',
|
|
30
|
+
},
|
|
31
|
+
sort: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: ['created', 'updated', 'comments'],
|
|
34
|
+
description: 'Sort field',
|
|
35
|
+
},
|
|
36
|
+
direction: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
enum: ['asc', 'desc'],
|
|
39
|
+
description: 'Sort direction',
|
|
40
|
+
},
|
|
41
|
+
per_page: {
|
|
42
|
+
type: 'number',
|
|
43
|
+
description: 'Results per page (max 100)',
|
|
44
|
+
},
|
|
45
|
+
page: {
|
|
46
|
+
type: 'number',
|
|
47
|
+
description: 'Page number',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
required: ['owner', 'repo'],
|
|
12
51
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
direction: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
enum: ['asc', 'desc'],
|
|
29
|
-
},
|
|
30
|
-
since: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
description: 'ISO 8601 date - only issues updated after this',
|
|
33
|
-
},
|
|
34
|
-
per_page: { type: 'number' },
|
|
35
|
-
page: { type: 'number' },
|
|
52
|
+
},
|
|
53
|
+
handler: async (octokit, args) => {
|
|
54
|
+
const { data } = await octokit.issues.listForRepo({
|
|
55
|
+
owner: args.owner,
|
|
56
|
+
repo: args.repo,
|
|
57
|
+
state: args.state,
|
|
58
|
+
labels: args.labels,
|
|
59
|
+
sort: args.sort,
|
|
60
|
+
direction: args.direction,
|
|
61
|
+
per_page: args.per_page,
|
|
62
|
+
page: args.page,
|
|
63
|
+
});
|
|
64
|
+
return successResult(data);
|
|
36
65
|
},
|
|
37
66
|
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
67
|
+
// list_for_user - List issues assigned to the authenticated user
|
|
68
|
+
{
|
|
69
|
+
definition: {
|
|
70
|
+
name: 'github_issues_list_for_user',
|
|
71
|
+
description: 'List issues assigned to the authenticated user',
|
|
72
|
+
inputSchema: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
properties: {
|
|
75
|
+
filter: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
enum: ['assigned', 'created', 'mentioned', 'subscribed', 'repos', 'all'],
|
|
78
|
+
description: 'Filter type',
|
|
79
|
+
},
|
|
80
|
+
state: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
enum: ['open', 'closed', 'all'],
|
|
83
|
+
description: 'Issue state filter',
|
|
84
|
+
},
|
|
85
|
+
labels: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
description: 'Comma-separated list of label names',
|
|
88
|
+
},
|
|
89
|
+
sort: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
enum: ['created', 'updated', 'comments'],
|
|
92
|
+
description: 'Sort field',
|
|
93
|
+
},
|
|
94
|
+
direction: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
enum: ['asc', 'desc'],
|
|
97
|
+
description: 'Sort direction',
|
|
98
|
+
},
|
|
99
|
+
per_page: {
|
|
100
|
+
type: 'number',
|
|
101
|
+
description: 'Results per page (max 100)',
|
|
102
|
+
},
|
|
103
|
+
page: {
|
|
104
|
+
type: 'number',
|
|
105
|
+
description: 'Page number',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
51
108
|
},
|
|
52
|
-
assignee: { type: 'string', description: 'Username, "*" for any, "none" for unassigned' },
|
|
53
|
-
creator: { type: 'string', description: 'Username of issue creator' },
|
|
54
|
-
mentioned: { type: 'string', description: 'Username mentioned in issue' },
|
|
55
|
-
labels: { type: 'string', description: 'Comma-separated label names' },
|
|
56
|
-
sort: {
|
|
57
|
-
type: 'string',
|
|
58
|
-
enum: ['created', 'updated', 'comments'],
|
|
59
|
-
},
|
|
60
|
-
direction: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
enum: ['asc', 'desc'],
|
|
63
|
-
},
|
|
64
|
-
since: { type: 'string', description: 'ISO 8601 date' },
|
|
65
|
-
per_page: { type: 'number' },
|
|
66
|
-
page: { type: 'number' },
|
|
67
109
|
},
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
required: ['owner', 'repo', 'issue_number'],
|
|
110
|
+
handler: async (octokit, args) => {
|
|
111
|
+
const { data } = await octokit.issues.list({
|
|
112
|
+
filter: args.filter,
|
|
113
|
+
state: args.state,
|
|
114
|
+
labels: args.labels,
|
|
115
|
+
sort: args.sort,
|
|
116
|
+
direction: args.direction,
|
|
117
|
+
per_page: args.per_page,
|
|
118
|
+
page: args.page,
|
|
119
|
+
});
|
|
120
|
+
return successResult(data);
|
|
121
|
+
},
|
|
82
122
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
123
|
+
// get - Get an issue
|
|
124
|
+
{
|
|
125
|
+
definition: {
|
|
126
|
+
name: 'github_issues_get',
|
|
127
|
+
description: 'Get an issue by number',
|
|
128
|
+
inputSchema: {
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
owner: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Repository owner',
|
|
134
|
+
},
|
|
135
|
+
repo: {
|
|
136
|
+
type: 'string',
|
|
137
|
+
description: 'Repository name',
|
|
138
|
+
},
|
|
139
|
+
issue_number: {
|
|
140
|
+
type: 'number',
|
|
141
|
+
description: 'Issue number',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
required: ['owner', 'repo', 'issue_number'],
|
|
104
145
|
},
|
|
105
146
|
},
|
|
106
|
-
|
|
147
|
+
handler: async (octokit, args) => {
|
|
148
|
+
const { data } = await octokit.issues.get({
|
|
149
|
+
owner: args.owner,
|
|
150
|
+
repo: args.repo,
|
|
151
|
+
issue_number: args.issue_number,
|
|
152
|
+
});
|
|
153
|
+
return successResult(data);
|
|
154
|
+
},
|
|
107
155
|
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
156
|
+
// create - Create an issue
|
|
157
|
+
{
|
|
158
|
+
definition: {
|
|
159
|
+
name: 'github_issues_create',
|
|
160
|
+
description: 'Create a new issue',
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
owner: {
|
|
165
|
+
type: 'string',
|
|
166
|
+
description: 'Repository owner',
|
|
167
|
+
},
|
|
168
|
+
repo: {
|
|
169
|
+
type: 'string',
|
|
170
|
+
description: 'Repository name',
|
|
171
|
+
},
|
|
172
|
+
title: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
description: 'Issue title',
|
|
175
|
+
},
|
|
176
|
+
body: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
description: 'Issue body',
|
|
179
|
+
},
|
|
180
|
+
labels: {
|
|
181
|
+
type: 'array',
|
|
182
|
+
items: { type: 'string' },
|
|
183
|
+
description: 'Labels to add',
|
|
184
|
+
},
|
|
185
|
+
assignees: {
|
|
186
|
+
type: 'array',
|
|
187
|
+
items: { type: 'string' },
|
|
188
|
+
description: 'Usernames to assign',
|
|
189
|
+
},
|
|
190
|
+
milestone: {
|
|
191
|
+
type: 'number',
|
|
192
|
+
description: 'Milestone number',
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
required: ['owner', 'repo', 'title'],
|
|
136
196
|
},
|
|
137
197
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
since: { type: 'string', description: 'ISO 8601 date' },
|
|
151
|
-
per_page: { type: 'number' },
|
|
152
|
-
page: { type: 'number' },
|
|
153
|
-
},
|
|
154
|
-
required: ['owner', 'repo', 'issue_number'],
|
|
198
|
+
handler: async (octokit, args) => {
|
|
199
|
+
const { data } = await octokit.issues.create({
|
|
200
|
+
owner: args.owner,
|
|
201
|
+
repo: args.repo,
|
|
202
|
+
title: args.title,
|
|
203
|
+
body: args.body,
|
|
204
|
+
labels: args.labels,
|
|
205
|
+
assignees: args.assignees,
|
|
206
|
+
milestone: args.milestone,
|
|
207
|
+
});
|
|
208
|
+
return successResult(data);
|
|
209
|
+
},
|
|
155
210
|
},
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
211
|
+
// update - Update an issue
|
|
212
|
+
{
|
|
213
|
+
definition: {
|
|
214
|
+
name: 'github_issues_update',
|
|
215
|
+
description: 'Update an issue',
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: 'object',
|
|
218
|
+
properties: {
|
|
219
|
+
owner: {
|
|
220
|
+
type: 'string',
|
|
221
|
+
description: 'Repository owner',
|
|
222
|
+
},
|
|
223
|
+
repo: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
description: 'Repository name',
|
|
226
|
+
},
|
|
227
|
+
issue_number: {
|
|
228
|
+
type: 'number',
|
|
229
|
+
description: 'Issue number',
|
|
230
|
+
},
|
|
231
|
+
title: {
|
|
232
|
+
type: 'string',
|
|
233
|
+
description: 'Issue title',
|
|
234
|
+
},
|
|
235
|
+
body: {
|
|
236
|
+
type: 'string',
|
|
237
|
+
description: 'Issue body',
|
|
238
|
+
},
|
|
239
|
+
state: {
|
|
240
|
+
type: 'string',
|
|
241
|
+
enum: ['open', 'closed'],
|
|
242
|
+
description: 'Issue state',
|
|
243
|
+
},
|
|
244
|
+
labels: {
|
|
245
|
+
type: 'array',
|
|
246
|
+
items: { type: 'string' },
|
|
247
|
+
description: 'Labels to set',
|
|
248
|
+
},
|
|
249
|
+
assignees: {
|
|
250
|
+
type: 'array',
|
|
251
|
+
items: { type: 'string' },
|
|
252
|
+
description: 'Usernames to assign',
|
|
253
|
+
},
|
|
254
|
+
milestone: {
|
|
255
|
+
type: 'number',
|
|
256
|
+
description: 'Milestone number',
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
required: ['owner', 'repo', 'issue_number'],
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
handler: async (octokit, args) => {
|
|
263
|
+
const { data } = await octokit.issues.update({
|
|
264
|
+
owner: args.owner,
|
|
265
|
+
repo: args.repo,
|
|
266
|
+
issue_number: args.issue_number,
|
|
267
|
+
title: args.title,
|
|
268
|
+
body: args.body,
|
|
269
|
+
state: args.state,
|
|
270
|
+
labels: args.labels,
|
|
271
|
+
assignees: args.assignees,
|
|
272
|
+
milestone: args.milestone,
|
|
273
|
+
});
|
|
274
|
+
return successResult(data);
|
|
275
|
+
},
|
|
169
276
|
},
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
277
|
+
// lock - Lock an issue
|
|
278
|
+
{
|
|
279
|
+
definition: {
|
|
280
|
+
name: 'github_issues_lock',
|
|
281
|
+
description: 'Lock an issue',
|
|
282
|
+
inputSchema: {
|
|
283
|
+
type: 'object',
|
|
284
|
+
properties: {
|
|
285
|
+
owner: {
|
|
286
|
+
type: 'string',
|
|
287
|
+
description: 'Repository owner',
|
|
288
|
+
},
|
|
289
|
+
repo: {
|
|
290
|
+
type: 'string',
|
|
291
|
+
description: 'Repository name',
|
|
292
|
+
},
|
|
293
|
+
issue_number: {
|
|
294
|
+
type: 'number',
|
|
295
|
+
description: 'Issue number',
|
|
296
|
+
},
|
|
297
|
+
lock_reason: {
|
|
298
|
+
type: 'string',
|
|
299
|
+
enum: ['off-topic', 'too heated', 'resolved', 'spam'],
|
|
300
|
+
description: 'Reason for locking',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
required: ['owner', 'repo', 'issue_number'],
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
handler: async (octokit, args) => {
|
|
307
|
+
await octokit.issues.lock({
|
|
308
|
+
owner: args.owner,
|
|
309
|
+
repo: args.repo,
|
|
310
|
+
issue_number: args.issue_number,
|
|
311
|
+
lock_reason: args.lock_reason,
|
|
312
|
+
});
|
|
313
|
+
return successResult({ success: true, message: 'Issue locked' });
|
|
314
|
+
},
|
|
183
315
|
},
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
316
|
+
// unlock - Unlock an issue
|
|
317
|
+
{
|
|
318
|
+
definition: {
|
|
319
|
+
name: 'github_issues_unlock',
|
|
320
|
+
description: 'Unlock an issue',
|
|
321
|
+
inputSchema: {
|
|
322
|
+
type: 'object',
|
|
323
|
+
properties: {
|
|
324
|
+
owner: {
|
|
325
|
+
type: 'string',
|
|
326
|
+
description: 'Repository owner',
|
|
327
|
+
},
|
|
328
|
+
repo: {
|
|
329
|
+
type: 'string',
|
|
330
|
+
description: 'Repository name',
|
|
331
|
+
},
|
|
332
|
+
issue_number: {
|
|
333
|
+
type: 'number',
|
|
334
|
+
description: 'Issue number',
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
required: ['owner', 'repo', 'issue_number'],
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
handler: async (octokit, args) => {
|
|
341
|
+
await octokit.issues.unlock({
|
|
342
|
+
owner: args.owner,
|
|
343
|
+
repo: args.repo,
|
|
344
|
+
issue_number: args.issue_number,
|
|
345
|
+
});
|
|
346
|
+
return successResult({ success: true, message: 'Issue unlocked' });
|
|
347
|
+
},
|
|
196
348
|
},
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
349
|
+
// list_comments - List comments on an issue
|
|
350
|
+
{
|
|
351
|
+
definition: {
|
|
352
|
+
name: 'github_issues_list_comments',
|
|
353
|
+
description: 'List comments on an issue',
|
|
354
|
+
inputSchema: {
|
|
355
|
+
type: 'object',
|
|
356
|
+
properties: {
|
|
357
|
+
owner: {
|
|
358
|
+
type: 'string',
|
|
359
|
+
description: 'Repository owner',
|
|
360
|
+
},
|
|
361
|
+
repo: {
|
|
362
|
+
type: 'string',
|
|
363
|
+
description: 'Repository name',
|
|
364
|
+
},
|
|
365
|
+
issue_number: {
|
|
366
|
+
type: 'number',
|
|
367
|
+
description: 'Issue number',
|
|
368
|
+
},
|
|
369
|
+
per_page: {
|
|
370
|
+
type: 'number',
|
|
371
|
+
description: 'Results per page (max 100)',
|
|
372
|
+
},
|
|
373
|
+
page: {
|
|
374
|
+
type: 'number',
|
|
375
|
+
description: 'Page number',
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
required: ['owner', 'repo', 'issue_number'],
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
handler: async (octokit, args) => {
|
|
382
|
+
const { data } = await octokit.issues.listComments({
|
|
383
|
+
owner: args.owner,
|
|
384
|
+
repo: args.repo,
|
|
385
|
+
issue_number: args.issue_number,
|
|
386
|
+
per_page: args.per_page,
|
|
387
|
+
page: args.page,
|
|
388
|
+
});
|
|
389
|
+
return successResult(data);
|
|
390
|
+
},
|
|
210
391
|
},
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
392
|
+
// get_comment - Get a comment
|
|
393
|
+
{
|
|
394
|
+
definition: {
|
|
395
|
+
name: 'github_issues_get_comment',
|
|
396
|
+
description: 'Get a comment by ID',
|
|
397
|
+
inputSchema: {
|
|
398
|
+
type: 'object',
|
|
399
|
+
properties: {
|
|
400
|
+
owner: {
|
|
401
|
+
type: 'string',
|
|
402
|
+
description: 'Repository owner',
|
|
403
|
+
},
|
|
404
|
+
repo: {
|
|
405
|
+
type: 'string',
|
|
406
|
+
description: 'Repository name',
|
|
407
|
+
},
|
|
408
|
+
comment_id: {
|
|
409
|
+
type: 'number',
|
|
410
|
+
description: 'Comment ID',
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
required: ['owner', 'repo', 'comment_id'],
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
handler: async (octokit, args) => {
|
|
417
|
+
const { data } = await octokit.issues.getComment({
|
|
418
|
+
owner: args.owner,
|
|
419
|
+
repo: args.repo,
|
|
420
|
+
comment_id: args.comment_id,
|
|
421
|
+
});
|
|
422
|
+
return successResult(data);
|
|
423
|
+
},
|
|
225
424
|
},
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
425
|
+
// create_comment - Create a comment
|
|
426
|
+
{
|
|
427
|
+
definition: {
|
|
428
|
+
name: 'github_issues_create_comment',
|
|
429
|
+
description: 'Create a comment on an issue',
|
|
430
|
+
inputSchema: {
|
|
431
|
+
type: 'object',
|
|
432
|
+
properties: {
|
|
433
|
+
owner: {
|
|
434
|
+
type: 'string',
|
|
435
|
+
description: 'Repository owner',
|
|
436
|
+
},
|
|
437
|
+
repo: {
|
|
438
|
+
type: 'string',
|
|
439
|
+
description: 'Repository name',
|
|
440
|
+
},
|
|
441
|
+
issue_number: {
|
|
442
|
+
type: 'number',
|
|
443
|
+
description: 'Issue number',
|
|
444
|
+
},
|
|
445
|
+
body: {
|
|
446
|
+
type: 'string',
|
|
447
|
+
description: 'Comment body',
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
required: ['owner', 'repo', 'issue_number', 'body'],
|
|
240
451
|
},
|
|
241
452
|
},
|
|
242
|
-
|
|
453
|
+
handler: async (octokit, args) => {
|
|
454
|
+
const { data } = await octokit.issues.createComment({
|
|
455
|
+
owner: args.owner,
|
|
456
|
+
repo: args.repo,
|
|
457
|
+
issue_number: args.issue_number,
|
|
458
|
+
body: args.body,
|
|
459
|
+
});
|
|
460
|
+
return successResult(data);
|
|
461
|
+
},
|
|
243
462
|
},
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
463
|
+
// update_comment - Update a comment
|
|
464
|
+
{
|
|
465
|
+
definition: {
|
|
466
|
+
name: 'github_issues_update_comment',
|
|
467
|
+
description: 'Update a comment',
|
|
468
|
+
inputSchema: {
|
|
469
|
+
type: 'object',
|
|
470
|
+
properties: {
|
|
471
|
+
owner: {
|
|
472
|
+
type: 'string',
|
|
473
|
+
description: 'Repository owner',
|
|
474
|
+
},
|
|
475
|
+
repo: {
|
|
476
|
+
type: 'string',
|
|
477
|
+
description: 'Repository name',
|
|
478
|
+
},
|
|
479
|
+
comment_id: {
|
|
480
|
+
type: 'number',
|
|
481
|
+
description: 'Comment ID',
|
|
482
|
+
},
|
|
483
|
+
body: {
|
|
484
|
+
type: 'string',
|
|
485
|
+
description: 'Comment body',
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
required: ['owner', 'repo', 'comment_id', 'body'],
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
handler: async (octokit, args) => {
|
|
492
|
+
const { data } = await octokit.issues.updateComment({
|
|
493
|
+
owner: args.owner,
|
|
494
|
+
repo: args.repo,
|
|
495
|
+
comment_id: args.comment_id,
|
|
496
|
+
body: args.body,
|
|
497
|
+
});
|
|
498
|
+
return successResult(data);
|
|
499
|
+
},
|
|
257
500
|
},
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
501
|
+
// delete_comment - Delete a comment
|
|
502
|
+
{
|
|
503
|
+
definition: {
|
|
504
|
+
name: 'github_issues_delete_comment',
|
|
505
|
+
description: 'Delete a comment',
|
|
506
|
+
inputSchema: {
|
|
507
|
+
type: 'object',
|
|
508
|
+
properties: {
|
|
509
|
+
owner: {
|
|
510
|
+
type: 'string',
|
|
511
|
+
description: 'Repository owner',
|
|
512
|
+
},
|
|
513
|
+
repo: {
|
|
514
|
+
type: 'string',
|
|
515
|
+
description: 'Repository name',
|
|
516
|
+
},
|
|
517
|
+
comment_id: {
|
|
518
|
+
type: 'number',
|
|
519
|
+
description: 'Comment ID',
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
required: ['owner', 'repo', 'comment_id'],
|
|
270
523
|
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
524
|
+
},
|
|
525
|
+
handler: async (octokit, args) => {
|
|
526
|
+
await octokit.issues.deleteComment({
|
|
527
|
+
owner: args.owner,
|
|
528
|
+
repo: args.repo,
|
|
529
|
+
comment_id: args.comment_id,
|
|
530
|
+
});
|
|
531
|
+
return successResult({ success: true, message: 'Comment deleted' });
|
|
532
|
+
},
|
|
533
|
+
},
|
|
534
|
+
// list_labels - List labels for a repository
|
|
535
|
+
{
|
|
536
|
+
definition: {
|
|
537
|
+
name: 'github_issues_list_labels',
|
|
538
|
+
description: 'List labels for a repository',
|
|
539
|
+
inputSchema: {
|
|
540
|
+
type: 'object',
|
|
541
|
+
properties: {
|
|
542
|
+
owner: {
|
|
543
|
+
type: 'string',
|
|
544
|
+
description: 'Repository owner',
|
|
545
|
+
},
|
|
546
|
+
repo: {
|
|
547
|
+
type: 'string',
|
|
548
|
+
description: 'Repository name',
|
|
549
|
+
},
|
|
550
|
+
per_page: {
|
|
551
|
+
type: 'number',
|
|
552
|
+
description: 'Results per page (max 100)',
|
|
553
|
+
},
|
|
554
|
+
page: {
|
|
555
|
+
type: 'number',
|
|
556
|
+
description: 'Page number',
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
required: ['owner', 'repo'],
|
|
274
560
|
},
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
561
|
+
},
|
|
562
|
+
handler: async (octokit, args) => {
|
|
563
|
+
const { data } = await octokit.issues.listLabelsForRepo({
|
|
564
|
+
owner: args.owner,
|
|
565
|
+
repo: args.repo,
|
|
566
|
+
per_page: args.per_page,
|
|
567
|
+
page: args.page,
|
|
568
|
+
});
|
|
569
|
+
return successResult(data);
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
// add_labels - Add labels to an issue
|
|
573
|
+
{
|
|
574
|
+
definition: {
|
|
575
|
+
name: 'github_issues_add_labels',
|
|
576
|
+
description: 'Add labels to an issue',
|
|
577
|
+
inputSchema: {
|
|
578
|
+
type: 'object',
|
|
579
|
+
properties: {
|
|
580
|
+
owner: {
|
|
581
|
+
type: 'string',
|
|
582
|
+
description: 'Repository owner',
|
|
583
|
+
},
|
|
584
|
+
repo: {
|
|
585
|
+
type: 'string',
|
|
586
|
+
description: 'Repository name',
|
|
587
|
+
},
|
|
588
|
+
issue_number: {
|
|
589
|
+
type: 'number',
|
|
590
|
+
description: 'Issue number',
|
|
591
|
+
},
|
|
592
|
+
labels: {
|
|
593
|
+
type: 'array',
|
|
594
|
+
items: { type: 'string' },
|
|
595
|
+
description: 'Labels to add',
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
required: ['owner', 'repo', 'issue_number', 'labels'],
|
|
278
599
|
},
|
|
279
|
-
per_page: { type: 'number' },
|
|
280
|
-
page: { type: 'number' },
|
|
281
600
|
},
|
|
282
|
-
|
|
601
|
+
handler: async (octokit, args) => {
|
|
602
|
+
const { data } = await octokit.issues.addLabels({
|
|
603
|
+
owner: args.owner,
|
|
604
|
+
repo: args.repo,
|
|
605
|
+
issue_number: args.issue_number,
|
|
606
|
+
labels: args.labels,
|
|
607
|
+
});
|
|
608
|
+
return successResult(data);
|
|
609
|
+
},
|
|
283
610
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
611
|
+
// set_labels - Set labels for an issue (replaces all)
|
|
612
|
+
{
|
|
613
|
+
definition: {
|
|
614
|
+
name: 'github_issues_set_labels',
|
|
615
|
+
description: 'Set labels for an issue (replaces all existing labels)',
|
|
616
|
+
inputSchema: {
|
|
617
|
+
type: 'object',
|
|
618
|
+
properties: {
|
|
619
|
+
owner: {
|
|
620
|
+
type: 'string',
|
|
621
|
+
description: 'Repository owner',
|
|
622
|
+
},
|
|
623
|
+
repo: {
|
|
624
|
+
type: 'string',
|
|
625
|
+
description: 'Repository name',
|
|
626
|
+
},
|
|
627
|
+
issue_number: {
|
|
628
|
+
type: 'number',
|
|
629
|
+
description: 'Issue number',
|
|
630
|
+
},
|
|
631
|
+
labels: {
|
|
632
|
+
type: 'array',
|
|
633
|
+
items: { type: 'string' },
|
|
634
|
+
description: 'Labels to set',
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
required: ['owner', 'repo', 'issue_number', 'labels'],
|
|
297
638
|
},
|
|
298
|
-
description: { type: 'string', description: 'Milestone description' },
|
|
299
|
-
due_on: { type: 'string', description: 'ISO 8601 due date' },
|
|
300
639
|
},
|
|
301
|
-
|
|
640
|
+
handler: async (octokit, args) => {
|
|
641
|
+
const { data } = await octokit.issues.setLabels({
|
|
642
|
+
owner: args.owner,
|
|
643
|
+
repo: args.repo,
|
|
644
|
+
issue_number: args.issue_number,
|
|
645
|
+
labels: args.labels,
|
|
646
|
+
});
|
|
647
|
+
return successResult(data);
|
|
648
|
+
},
|
|
302
649
|
},
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
650
|
+
// remove_label - Remove a label from an issue
|
|
651
|
+
{
|
|
652
|
+
definition: {
|
|
653
|
+
name: 'github_issues_remove_label',
|
|
654
|
+
description: 'Remove a label from an issue',
|
|
655
|
+
inputSchema: {
|
|
656
|
+
type: 'object',
|
|
657
|
+
properties: {
|
|
658
|
+
owner: {
|
|
659
|
+
type: 'string',
|
|
660
|
+
description: 'Repository owner',
|
|
661
|
+
},
|
|
662
|
+
repo: {
|
|
663
|
+
type: 'string',
|
|
664
|
+
description: 'Repository name',
|
|
665
|
+
},
|
|
666
|
+
issue_number: {
|
|
667
|
+
type: 'number',
|
|
668
|
+
description: 'Issue number',
|
|
669
|
+
},
|
|
670
|
+
name: {
|
|
671
|
+
type: 'string',
|
|
672
|
+
description: 'Label name to remove',
|
|
673
|
+
},
|
|
674
|
+
},
|
|
675
|
+
required: ['owner', 'repo', 'issue_number', 'name'],
|
|
317
676
|
},
|
|
318
677
|
},
|
|
319
|
-
|
|
678
|
+
handler: async (octokit, args) => {
|
|
679
|
+
const { data } = await octokit.issues.removeLabel({
|
|
680
|
+
owner: args.owner,
|
|
681
|
+
repo: args.repo,
|
|
682
|
+
issue_number: args.issue_number,
|
|
683
|
+
name: args.name,
|
|
684
|
+
});
|
|
685
|
+
return successResult(data);
|
|
686
|
+
},
|
|
320
687
|
},
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
688
|
+
// list_assignees - List available assignees
|
|
689
|
+
{
|
|
690
|
+
definition: {
|
|
691
|
+
name: 'github_issues_list_assignees',
|
|
692
|
+
description: 'List users who can be assigned to issues',
|
|
693
|
+
inputSchema: {
|
|
694
|
+
type: 'object',
|
|
695
|
+
properties: {
|
|
696
|
+
owner: {
|
|
697
|
+
type: 'string',
|
|
698
|
+
description: 'Repository owner',
|
|
699
|
+
},
|
|
700
|
+
repo: {
|
|
701
|
+
type: 'string',
|
|
702
|
+
description: 'Repository name',
|
|
703
|
+
},
|
|
704
|
+
per_page: {
|
|
705
|
+
type: 'number',
|
|
706
|
+
description: 'Results per page (max 100)',
|
|
707
|
+
},
|
|
708
|
+
page: {
|
|
709
|
+
type: 'number',
|
|
710
|
+
description: 'Page number',
|
|
711
|
+
},
|
|
712
|
+
},
|
|
713
|
+
required: ['owner', 'repo'],
|
|
335
714
|
},
|
|
336
715
|
},
|
|
337
|
-
|
|
716
|
+
handler: async (octokit, args) => {
|
|
717
|
+
const { data } = await octokit.issues.listAssignees({
|
|
718
|
+
owner: args.owner,
|
|
719
|
+
repo: args.repo,
|
|
720
|
+
per_page: args.per_page,
|
|
721
|
+
page: args.page,
|
|
722
|
+
});
|
|
723
|
+
return successResult(data);
|
|
724
|
+
},
|
|
338
725
|
},
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
export async function handleIssuesTool(octokit, args) {
|
|
342
|
-
const owner = args.owner;
|
|
343
|
-
const repo = args.repo;
|
|
344
|
-
const issueNumber = args.issue_number;
|
|
345
|
-
// List issues for authenticated user
|
|
346
|
-
if (!owner && !repo) {
|
|
347
|
-
const { data } = await octokit.issues.list(args);
|
|
348
|
-
return data;
|
|
349
|
-
}
|
|
350
|
-
// List issues for repo
|
|
351
|
-
if (owner && repo && !issueNumber && !('comment_id' in args) && !('labels' in args && Array.isArray(args.labels))) {
|
|
352
|
-
if (!('title' in args) && !('state' in args && ('body' in args || 'assignees' in args))) {
|
|
353
|
-
const { data } = await octokit.issues.listForRepo(args);
|
|
354
|
-
return data;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
// Get specific issue
|
|
358
|
-
if (owner && repo && issueNumber && !('body' in args) && !('title' in args) && !('labels' in args) && !('assignees' in args)) {
|
|
359
|
-
// Could be get, listComments
|
|
360
|
-
if ('since' in args || 'per_page' in args || 'page' in args) {
|
|
361
|
-
const { data } = await octokit.issues.listComments(args);
|
|
362
|
-
return data;
|
|
363
|
-
}
|
|
364
|
-
const { data } = await octokit.issues.get(args);
|
|
365
|
-
return data;
|
|
366
|
-
}
|
|
367
|
-
// Create issue
|
|
368
|
-
if (owner && repo && 'title' in args && !issueNumber) {
|
|
369
|
-
const { data } = await octokit.issues.create(args);
|
|
370
|
-
return data;
|
|
371
|
-
}
|
|
372
|
-
// Update issue
|
|
373
|
-
if (owner && repo && issueNumber && ('title' in args || 'body' in args || 'state' in args)) {
|
|
374
|
-
const { data } = await octokit.issues.update(args);
|
|
375
|
-
return data;
|
|
376
|
-
}
|
|
377
|
-
// Create comment
|
|
378
|
-
if (owner && repo && issueNumber && 'body' in args && !('comment_id' in args)) {
|
|
379
|
-
const { data } = await octokit.issues.createComment(args);
|
|
380
|
-
return data;
|
|
381
|
-
}
|
|
382
|
-
// Update comment
|
|
383
|
-
if (owner && repo && 'comment_id' in args && 'body' in args) {
|
|
384
|
-
const { data } = await octokit.issues.updateComment(args);
|
|
385
|
-
return data;
|
|
386
|
-
}
|
|
387
|
-
// Delete comment
|
|
388
|
-
if (owner && repo && 'comment_id' in args && !('body' in args)) {
|
|
389
|
-
await octokit.issues.deleteComment(args);
|
|
390
|
-
return { success: true, message: 'Comment deleted' };
|
|
391
|
-
}
|
|
392
|
-
// Labels operations
|
|
393
|
-
if (owner && repo && 'name' in args && 'color' in args) {
|
|
394
|
-
const { data } = await octokit.issues.createLabel(args);
|
|
395
|
-
return data;
|
|
396
|
-
}
|
|
397
|
-
if (owner && repo && issueNumber && 'labels' in args && Array.isArray(args.labels)) {
|
|
398
|
-
const { data } = await octokit.issues.addLabels(args);
|
|
399
|
-
return data;
|
|
400
|
-
}
|
|
401
|
-
if (owner && repo && issueNumber && 'name' in args && !('color' in args)) {
|
|
402
|
-
await octokit.issues.removeLabel(args);
|
|
403
|
-
return { success: true, message: 'Label removed' };
|
|
404
|
-
}
|
|
405
|
-
// List labels
|
|
406
|
-
if (owner && repo && !issueNumber && !('title' in args) && !('name' in args)) {
|
|
407
|
-
const { data } = await octokit.issues.listLabelsForRepo(args);
|
|
408
|
-
return data;
|
|
409
|
-
}
|
|
410
|
-
// Milestones
|
|
411
|
-
if (owner && repo && 'title' in args && !issueNumber && !('color' in args)) {
|
|
412
|
-
const { data } = await octokit.issues.createMilestone(args);
|
|
413
|
-
return data;
|
|
414
|
-
}
|
|
415
|
-
// Assignees
|
|
416
|
-
if (owner && repo && issueNumber && 'assignees' in args) {
|
|
417
|
-
// Check if we're adding or removing based on context
|
|
418
|
-
const { data } = await octokit.issues.addAssignees(args);
|
|
419
|
-
return data;
|
|
420
|
-
}
|
|
421
|
-
// Default: list for authenticated user
|
|
422
|
-
const { data } = await octokit.issues.list();
|
|
423
|
-
return data;
|
|
424
|
-
}
|
|
425
|
-
//# sourceMappingURL=issues.js.map
|
|
726
|
+
],
|
|
727
|
+
};
|