@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,614 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const teamsCategory = {
|
|
3
|
+
name: 'teams',
|
|
4
|
+
description: 'GitHub teams tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list - List teams in an organization
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_teams_list',
|
|
10
|
+
description: 'List all teams in an organization',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
org: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'Organization name',
|
|
17
|
+
},
|
|
18
|
+
per_page: {
|
|
19
|
+
type: 'number',
|
|
20
|
+
description: 'Results per page (max 100)',
|
|
21
|
+
},
|
|
22
|
+
page: {
|
|
23
|
+
type: 'number',
|
|
24
|
+
description: 'Page number',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['org'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
handler: async (octokit, args) => {
|
|
31
|
+
const { data } = await octokit.teams.list({
|
|
32
|
+
org: args.org,
|
|
33
|
+
per_page: args.per_page,
|
|
34
|
+
page: args.page,
|
|
35
|
+
});
|
|
36
|
+
return successResult(data);
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
// get_by_name - Get a team by name
|
|
40
|
+
{
|
|
41
|
+
definition: {
|
|
42
|
+
name: 'github_teams_get_by_name',
|
|
43
|
+
description: 'Get a team by its slug name',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
properties: {
|
|
47
|
+
org: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'Organization name',
|
|
50
|
+
},
|
|
51
|
+
team_slug: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Team slug (e.g., "justice-league")',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
required: ['org', 'team_slug'],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
handler: async (octokit, args) => {
|
|
60
|
+
const { data } = await octokit.teams.getByName({
|
|
61
|
+
org: args.org,
|
|
62
|
+
team_slug: args.team_slug,
|
|
63
|
+
});
|
|
64
|
+
return successResult(data);
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
// create - Create a team
|
|
68
|
+
{
|
|
69
|
+
definition: {
|
|
70
|
+
name: 'github_teams_create',
|
|
71
|
+
description: 'Create a new team in an organization',
|
|
72
|
+
inputSchema: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
properties: {
|
|
75
|
+
org: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: 'Organization name',
|
|
78
|
+
},
|
|
79
|
+
name: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'Team name',
|
|
82
|
+
},
|
|
83
|
+
description: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'Team description',
|
|
86
|
+
},
|
|
87
|
+
maintainers: {
|
|
88
|
+
type: 'string',
|
|
89
|
+
description: 'Comma-separated list of GitHub usernames for team maintainers',
|
|
90
|
+
},
|
|
91
|
+
repo_names: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: 'Comma-separated list of repository names (org/repo format)',
|
|
94
|
+
},
|
|
95
|
+
privacy: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
enum: ['secret', 'closed'],
|
|
98
|
+
description: 'Team privacy level',
|
|
99
|
+
},
|
|
100
|
+
notification_setting: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
enum: ['notifications_enabled', 'notifications_disabled'],
|
|
103
|
+
description: 'Notification setting for the team',
|
|
104
|
+
},
|
|
105
|
+
parent_team_id: {
|
|
106
|
+
type: 'number',
|
|
107
|
+
description: 'ID of the parent team for nested teams',
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
required: ['org', 'name'],
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
handler: async (octokit, args) => {
|
|
114
|
+
const maintainers = args.maintainers
|
|
115
|
+
? args.maintainers.split(',').map((m) => m.trim())
|
|
116
|
+
: undefined;
|
|
117
|
+
const repoNames = args.repo_names
|
|
118
|
+
? args.repo_names.split(',').map((r) => r.trim())
|
|
119
|
+
: undefined;
|
|
120
|
+
const { data } = await octokit.teams.create({
|
|
121
|
+
org: args.org,
|
|
122
|
+
name: args.name,
|
|
123
|
+
description: args.description,
|
|
124
|
+
maintainers,
|
|
125
|
+
repo_names: repoNames,
|
|
126
|
+
privacy: args.privacy,
|
|
127
|
+
notification_setting: args.notification_setting,
|
|
128
|
+
parent_team_id: args.parent_team_id,
|
|
129
|
+
});
|
|
130
|
+
return successResult(data);
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
// update - Update a team
|
|
134
|
+
{
|
|
135
|
+
definition: {
|
|
136
|
+
name: 'github_teams_update',
|
|
137
|
+
description: 'Update a team in an organization',
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: {
|
|
141
|
+
org: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
description: 'Organization name',
|
|
144
|
+
},
|
|
145
|
+
team_slug: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'Team slug',
|
|
148
|
+
},
|
|
149
|
+
name: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: 'New team name',
|
|
152
|
+
},
|
|
153
|
+
description: {
|
|
154
|
+
type: 'string',
|
|
155
|
+
description: 'Team description',
|
|
156
|
+
},
|
|
157
|
+
privacy: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
enum: ['secret', 'closed'],
|
|
160
|
+
description: 'Team privacy level',
|
|
161
|
+
},
|
|
162
|
+
notification_setting: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
enum: ['notifications_enabled', 'notifications_disabled'],
|
|
165
|
+
description: 'Notification setting for the team',
|
|
166
|
+
},
|
|
167
|
+
parent_team_id: {
|
|
168
|
+
type: 'number',
|
|
169
|
+
description: 'ID of the parent team for nested teams (use -1 to remove parent)',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
required: ['org', 'team_slug'],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
handler: async (octokit, args) => {
|
|
176
|
+
const parentTeamId = args.parent_team_id;
|
|
177
|
+
const { data } = await octokit.teams.updateInOrg({
|
|
178
|
+
org: args.org,
|
|
179
|
+
team_slug: args.team_slug,
|
|
180
|
+
name: args.name,
|
|
181
|
+
description: args.description,
|
|
182
|
+
privacy: args.privacy,
|
|
183
|
+
notification_setting: args.notification_setting,
|
|
184
|
+
parent_team_id: parentTeamId === -1 ? null : parentTeamId,
|
|
185
|
+
});
|
|
186
|
+
return successResult(data);
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
// delete - Delete a team
|
|
190
|
+
{
|
|
191
|
+
definition: {
|
|
192
|
+
name: 'github_teams_delete',
|
|
193
|
+
description: 'Delete a team from an organization',
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
org: {
|
|
198
|
+
type: 'string',
|
|
199
|
+
description: 'Organization name',
|
|
200
|
+
},
|
|
201
|
+
team_slug: {
|
|
202
|
+
type: 'string',
|
|
203
|
+
description: 'Team slug',
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
required: ['org', 'team_slug'],
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
handler: async (octokit, args) => {
|
|
210
|
+
await octokit.teams.deleteInOrg({
|
|
211
|
+
org: args.org,
|
|
212
|
+
team_slug: args.team_slug,
|
|
213
|
+
});
|
|
214
|
+
return successResult({ success: true, message: 'Team deleted' });
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
// list_members_in_org - List team members
|
|
218
|
+
{
|
|
219
|
+
definition: {
|
|
220
|
+
name: 'github_teams_list_members_in_org',
|
|
221
|
+
description: 'List members of a team in an organization',
|
|
222
|
+
inputSchema: {
|
|
223
|
+
type: 'object',
|
|
224
|
+
properties: {
|
|
225
|
+
org: {
|
|
226
|
+
type: 'string',
|
|
227
|
+
description: 'Organization name',
|
|
228
|
+
},
|
|
229
|
+
team_slug: {
|
|
230
|
+
type: 'string',
|
|
231
|
+
description: 'Team slug',
|
|
232
|
+
},
|
|
233
|
+
role: {
|
|
234
|
+
type: 'string',
|
|
235
|
+
enum: ['member', 'maintainer', 'all'],
|
|
236
|
+
description: 'Filter by role',
|
|
237
|
+
},
|
|
238
|
+
per_page: {
|
|
239
|
+
type: 'number',
|
|
240
|
+
description: 'Results per page (max 100)',
|
|
241
|
+
},
|
|
242
|
+
page: {
|
|
243
|
+
type: 'number',
|
|
244
|
+
description: 'Page number',
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
required: ['org', 'team_slug'],
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
handler: async (octokit, args) => {
|
|
251
|
+
const { data } = await octokit.teams.listMembersInOrg({
|
|
252
|
+
org: args.org,
|
|
253
|
+
team_slug: args.team_slug,
|
|
254
|
+
role: args.role,
|
|
255
|
+
per_page: args.per_page,
|
|
256
|
+
page: args.page,
|
|
257
|
+
});
|
|
258
|
+
return successResult(data);
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
// get_membership_for_user_in_org - Get team membership for a user
|
|
262
|
+
{
|
|
263
|
+
definition: {
|
|
264
|
+
name: 'github_teams_get_membership_for_user_in_org',
|
|
265
|
+
description: 'Get team membership for a user in an organization',
|
|
266
|
+
inputSchema: {
|
|
267
|
+
type: 'object',
|
|
268
|
+
properties: {
|
|
269
|
+
org: {
|
|
270
|
+
type: 'string',
|
|
271
|
+
description: 'Organization name',
|
|
272
|
+
},
|
|
273
|
+
team_slug: {
|
|
274
|
+
type: 'string',
|
|
275
|
+
description: 'Team slug',
|
|
276
|
+
},
|
|
277
|
+
username: {
|
|
278
|
+
type: 'string',
|
|
279
|
+
description: 'GitHub username',
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
required: ['org', 'team_slug', 'username'],
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
handler: async (octokit, args) => {
|
|
286
|
+
const { data } = await octokit.teams.getMembershipForUserInOrg({
|
|
287
|
+
org: args.org,
|
|
288
|
+
team_slug: args.team_slug,
|
|
289
|
+
username: args.username,
|
|
290
|
+
});
|
|
291
|
+
return successResult(data);
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
// add_or_update_membership_for_user_in_org - Add or update team membership
|
|
295
|
+
{
|
|
296
|
+
definition: {
|
|
297
|
+
name: 'github_teams_add_or_update_membership_for_user_in_org',
|
|
298
|
+
description: 'Add or update team membership for a user in an organization',
|
|
299
|
+
inputSchema: {
|
|
300
|
+
type: 'object',
|
|
301
|
+
properties: {
|
|
302
|
+
org: {
|
|
303
|
+
type: 'string',
|
|
304
|
+
description: 'Organization name',
|
|
305
|
+
},
|
|
306
|
+
team_slug: {
|
|
307
|
+
type: 'string',
|
|
308
|
+
description: 'Team slug',
|
|
309
|
+
},
|
|
310
|
+
username: {
|
|
311
|
+
type: 'string',
|
|
312
|
+
description: 'GitHub username',
|
|
313
|
+
},
|
|
314
|
+
role: {
|
|
315
|
+
type: 'string',
|
|
316
|
+
enum: ['member', 'maintainer'],
|
|
317
|
+
description: 'Role for the user in the team',
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
required: ['org', 'team_slug', 'username'],
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
handler: async (octokit, args) => {
|
|
324
|
+
const { data } = await octokit.teams.addOrUpdateMembershipForUserInOrg({
|
|
325
|
+
org: args.org,
|
|
326
|
+
team_slug: args.team_slug,
|
|
327
|
+
username: args.username,
|
|
328
|
+
role: args.role,
|
|
329
|
+
});
|
|
330
|
+
return successResult(data);
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
// remove_membership_for_user_in_org - Remove team membership
|
|
334
|
+
{
|
|
335
|
+
definition: {
|
|
336
|
+
name: 'github_teams_remove_membership_for_user_in_org',
|
|
337
|
+
description: 'Remove team membership for a user in an organization',
|
|
338
|
+
inputSchema: {
|
|
339
|
+
type: 'object',
|
|
340
|
+
properties: {
|
|
341
|
+
org: {
|
|
342
|
+
type: 'string',
|
|
343
|
+
description: 'Organization name',
|
|
344
|
+
},
|
|
345
|
+
team_slug: {
|
|
346
|
+
type: 'string',
|
|
347
|
+
description: 'Team slug',
|
|
348
|
+
},
|
|
349
|
+
username: {
|
|
350
|
+
type: 'string',
|
|
351
|
+
description: 'GitHub username',
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
required: ['org', 'team_slug', 'username'],
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
handler: async (octokit, args) => {
|
|
358
|
+
await octokit.teams.removeMembershipForUserInOrg({
|
|
359
|
+
org: args.org,
|
|
360
|
+
team_slug: args.team_slug,
|
|
361
|
+
username: args.username,
|
|
362
|
+
});
|
|
363
|
+
return successResult({ success: true, message: 'User removed from team' });
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
// list_repos_in_org - List team repositories
|
|
367
|
+
{
|
|
368
|
+
definition: {
|
|
369
|
+
name: 'github_teams_list_repos_in_org',
|
|
370
|
+
description: 'List repositories for a team in an organization',
|
|
371
|
+
inputSchema: {
|
|
372
|
+
type: 'object',
|
|
373
|
+
properties: {
|
|
374
|
+
org: {
|
|
375
|
+
type: 'string',
|
|
376
|
+
description: 'Organization name',
|
|
377
|
+
},
|
|
378
|
+
team_slug: {
|
|
379
|
+
type: 'string',
|
|
380
|
+
description: 'Team slug',
|
|
381
|
+
},
|
|
382
|
+
per_page: {
|
|
383
|
+
type: 'number',
|
|
384
|
+
description: 'Results per page (max 100)',
|
|
385
|
+
},
|
|
386
|
+
page: {
|
|
387
|
+
type: 'number',
|
|
388
|
+
description: 'Page number',
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
required: ['org', 'team_slug'],
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
handler: async (octokit, args) => {
|
|
395
|
+
const { data } = await octokit.teams.listReposInOrg({
|
|
396
|
+
org: args.org,
|
|
397
|
+
team_slug: args.team_slug,
|
|
398
|
+
per_page: args.per_page,
|
|
399
|
+
page: args.page,
|
|
400
|
+
});
|
|
401
|
+
return successResult(data);
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
// add_or_update_repo_permissions_in_org - Add or update team repository permissions
|
|
405
|
+
{
|
|
406
|
+
definition: {
|
|
407
|
+
name: 'github_teams_add_or_update_repo_permissions_in_org',
|
|
408
|
+
description: 'Add or update team repository permissions in an organization',
|
|
409
|
+
inputSchema: {
|
|
410
|
+
type: 'object',
|
|
411
|
+
properties: {
|
|
412
|
+
org: {
|
|
413
|
+
type: 'string',
|
|
414
|
+
description: 'Organization name',
|
|
415
|
+
},
|
|
416
|
+
team_slug: {
|
|
417
|
+
type: 'string',
|
|
418
|
+
description: 'Team slug',
|
|
419
|
+
},
|
|
420
|
+
owner: {
|
|
421
|
+
type: 'string',
|
|
422
|
+
description: 'Repository owner',
|
|
423
|
+
},
|
|
424
|
+
repo: {
|
|
425
|
+
type: 'string',
|
|
426
|
+
description: 'Repository name',
|
|
427
|
+
},
|
|
428
|
+
permission: {
|
|
429
|
+
type: 'string',
|
|
430
|
+
enum: ['pull', 'push', 'admin', 'maintain', 'triage'],
|
|
431
|
+
description: 'Permission level for the repository',
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
required: ['org', 'team_slug', 'owner', 'repo'],
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
handler: async (octokit, args) => {
|
|
438
|
+
await octokit.teams.addOrUpdateRepoPermissionsInOrg({
|
|
439
|
+
org: args.org,
|
|
440
|
+
team_slug: args.team_slug,
|
|
441
|
+
owner: args.owner,
|
|
442
|
+
repo: args.repo,
|
|
443
|
+
permission: args.permission,
|
|
444
|
+
});
|
|
445
|
+
return successResult({ success: true, message: 'Repository permissions updated' });
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
// remove_repo_in_org - Remove team repository
|
|
449
|
+
{
|
|
450
|
+
definition: {
|
|
451
|
+
name: 'github_teams_remove_repo_in_org',
|
|
452
|
+
description: 'Remove a repository from a team in an organization',
|
|
453
|
+
inputSchema: {
|
|
454
|
+
type: 'object',
|
|
455
|
+
properties: {
|
|
456
|
+
org: {
|
|
457
|
+
type: 'string',
|
|
458
|
+
description: 'Organization name',
|
|
459
|
+
},
|
|
460
|
+
team_slug: {
|
|
461
|
+
type: 'string',
|
|
462
|
+
description: 'Team slug',
|
|
463
|
+
},
|
|
464
|
+
owner: {
|
|
465
|
+
type: 'string',
|
|
466
|
+
description: 'Repository owner',
|
|
467
|
+
},
|
|
468
|
+
repo: {
|
|
469
|
+
type: 'string',
|
|
470
|
+
description: 'Repository name',
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
required: ['org', 'team_slug', 'owner', 'repo'],
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
handler: async (octokit, args) => {
|
|
477
|
+
await octokit.teams.removeRepoInOrg({
|
|
478
|
+
org: args.org,
|
|
479
|
+
team_slug: args.team_slug,
|
|
480
|
+
owner: args.owner,
|
|
481
|
+
repo: args.repo,
|
|
482
|
+
});
|
|
483
|
+
return successResult({ success: true, message: 'Repository removed from team' });
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
// list_discussions_in_org - List team discussions
|
|
487
|
+
{
|
|
488
|
+
definition: {
|
|
489
|
+
name: 'github_teams_list_discussions_in_org',
|
|
490
|
+
description: 'List discussions for a team in an organization',
|
|
491
|
+
inputSchema: {
|
|
492
|
+
type: 'object',
|
|
493
|
+
properties: {
|
|
494
|
+
org: {
|
|
495
|
+
type: 'string',
|
|
496
|
+
description: 'Organization name',
|
|
497
|
+
},
|
|
498
|
+
team_slug: {
|
|
499
|
+
type: 'string',
|
|
500
|
+
description: 'Team slug',
|
|
501
|
+
},
|
|
502
|
+
direction: {
|
|
503
|
+
type: 'string',
|
|
504
|
+
enum: ['asc', 'desc'],
|
|
505
|
+
description: 'Sort direction',
|
|
506
|
+
},
|
|
507
|
+
per_page: {
|
|
508
|
+
type: 'number',
|
|
509
|
+
description: 'Results per page (max 100)',
|
|
510
|
+
},
|
|
511
|
+
page: {
|
|
512
|
+
type: 'number',
|
|
513
|
+
description: 'Page number',
|
|
514
|
+
},
|
|
515
|
+
pinned: {
|
|
516
|
+
type: 'string',
|
|
517
|
+
enum: ['true', 'false'],
|
|
518
|
+
description: 'Filter to only pinned discussions',
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
required: ['org', 'team_slug'],
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
handler: async (octokit, args) => {
|
|
525
|
+
const { data } = await octokit.teams.listDiscussionsInOrg({
|
|
526
|
+
org: args.org,
|
|
527
|
+
team_slug: args.team_slug,
|
|
528
|
+
direction: args.direction,
|
|
529
|
+
per_page: args.per_page,
|
|
530
|
+
page: args.page,
|
|
531
|
+
pinned: args.pinned,
|
|
532
|
+
});
|
|
533
|
+
return successResult(data);
|
|
534
|
+
},
|
|
535
|
+
},
|
|
536
|
+
// get_discussion_in_org - Get a team discussion
|
|
537
|
+
{
|
|
538
|
+
definition: {
|
|
539
|
+
name: 'github_teams_get_discussion_in_org',
|
|
540
|
+
description: 'Get a specific discussion for a team in an organization',
|
|
541
|
+
inputSchema: {
|
|
542
|
+
type: 'object',
|
|
543
|
+
properties: {
|
|
544
|
+
org: {
|
|
545
|
+
type: 'string',
|
|
546
|
+
description: 'Organization name',
|
|
547
|
+
},
|
|
548
|
+
team_slug: {
|
|
549
|
+
type: 'string',
|
|
550
|
+
description: 'Team slug',
|
|
551
|
+
},
|
|
552
|
+
discussion_number: {
|
|
553
|
+
type: 'number',
|
|
554
|
+
description: 'Discussion number',
|
|
555
|
+
},
|
|
556
|
+
},
|
|
557
|
+
required: ['org', 'team_slug', 'discussion_number'],
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
handler: async (octokit, args) => {
|
|
561
|
+
const { data } = await octokit.teams.getDiscussionInOrg({
|
|
562
|
+
org: args.org,
|
|
563
|
+
team_slug: args.team_slug,
|
|
564
|
+
discussion_number: args.discussion_number,
|
|
565
|
+
});
|
|
566
|
+
return successResult(data);
|
|
567
|
+
},
|
|
568
|
+
},
|
|
569
|
+
// create_discussion_in_org - Create a team discussion
|
|
570
|
+
{
|
|
571
|
+
definition: {
|
|
572
|
+
name: 'github_teams_create_discussion_in_org',
|
|
573
|
+
description: 'Create a discussion for a team in an organization',
|
|
574
|
+
inputSchema: {
|
|
575
|
+
type: 'object',
|
|
576
|
+
properties: {
|
|
577
|
+
org: {
|
|
578
|
+
type: 'string',
|
|
579
|
+
description: 'Organization name',
|
|
580
|
+
},
|
|
581
|
+
team_slug: {
|
|
582
|
+
type: 'string',
|
|
583
|
+
description: 'Team slug',
|
|
584
|
+
},
|
|
585
|
+
title: {
|
|
586
|
+
type: 'string',
|
|
587
|
+
description: 'Discussion title',
|
|
588
|
+
},
|
|
589
|
+
body: {
|
|
590
|
+
type: 'string',
|
|
591
|
+
description: 'Discussion body (Markdown supported)',
|
|
592
|
+
},
|
|
593
|
+
private: {
|
|
594
|
+
type: 'string',
|
|
595
|
+
enum: ['true', 'false'],
|
|
596
|
+
description: 'Whether the discussion is private',
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
required: ['org', 'team_slug', 'title', 'body'],
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
handler: async (octokit, args) => {
|
|
603
|
+
const { data } = await octokit.teams.createDiscussionInOrg({
|
|
604
|
+
org: args.org,
|
|
605
|
+
team_slug: args.team_slug,
|
|
606
|
+
title: args.title,
|
|
607
|
+
body: args.body,
|
|
608
|
+
private: args.private !== undefined ? args.private === 'true' : undefined,
|
|
609
|
+
});
|
|
610
|
+
return successResult(data);
|
|
611
|
+
},
|
|
612
|
+
},
|
|
613
|
+
],
|
|
614
|
+
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const usersTools: Tool[];
|
|
4
|
-
export declare function handleUsersTool(octokit: Octokit, args: Record<string, unknown>): Promise<unknown>;
|
|
5
|
-
//# sourceMappingURL=users.d.ts.map
|
|
1
|
+
import type { ToolCategory } from '../types.js';
|
|
2
|
+
export declare const usersCategory: ToolCategory;
|