@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,534 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const activityCategory = {
|
|
3
|
+
name: 'activity',
|
|
4
|
+
description: 'GitHub activity tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// Events
|
|
7
|
+
// list_public_events - List public events
|
|
8
|
+
{
|
|
9
|
+
definition: {
|
|
10
|
+
name: 'github_activity_list_public_events',
|
|
11
|
+
description: 'List public events across GitHub',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
per_page: {
|
|
16
|
+
type: 'number',
|
|
17
|
+
description: 'Results per page (max 100)',
|
|
18
|
+
},
|
|
19
|
+
page: {
|
|
20
|
+
type: 'number',
|
|
21
|
+
description: 'Page number',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
handler: async (octokit, args) => {
|
|
27
|
+
const { data } = await octokit.activity.listPublicEvents({
|
|
28
|
+
per_page: args.per_page,
|
|
29
|
+
page: args.page,
|
|
30
|
+
});
|
|
31
|
+
return successResult(data);
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
// list_repo_events - List repository events
|
|
35
|
+
{
|
|
36
|
+
definition: {
|
|
37
|
+
name: 'github_activity_list_repo_events',
|
|
38
|
+
description: 'List events for a repository',
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: 'object',
|
|
41
|
+
properties: {
|
|
42
|
+
owner: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Repository owner',
|
|
45
|
+
},
|
|
46
|
+
repo: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'Repository name',
|
|
49
|
+
},
|
|
50
|
+
per_page: {
|
|
51
|
+
type: 'number',
|
|
52
|
+
description: 'Results per page (max 100)',
|
|
53
|
+
},
|
|
54
|
+
page: {
|
|
55
|
+
type: 'number',
|
|
56
|
+
description: 'Page number',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
required: ['owner', 'repo'],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
handler: async (octokit, args) => {
|
|
63
|
+
const { data } = await octokit.activity.listRepoEvents({
|
|
64
|
+
owner: args.owner,
|
|
65
|
+
repo: args.repo,
|
|
66
|
+
per_page: args.per_page,
|
|
67
|
+
page: args.page,
|
|
68
|
+
});
|
|
69
|
+
return successResult(data);
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
// list_events_for_authenticated_user - List events for authenticated user
|
|
73
|
+
{
|
|
74
|
+
definition: {
|
|
75
|
+
name: 'github_activity_list_events_for_authenticated_user',
|
|
76
|
+
description: 'List events for the authenticated user',
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: 'object',
|
|
79
|
+
properties: {
|
|
80
|
+
username: {
|
|
81
|
+
type: 'string',
|
|
82
|
+
description: 'GitHub username of the authenticated user',
|
|
83
|
+
},
|
|
84
|
+
per_page: {
|
|
85
|
+
type: 'number',
|
|
86
|
+
description: 'Results per page (max 100)',
|
|
87
|
+
},
|
|
88
|
+
page: {
|
|
89
|
+
type: 'number',
|
|
90
|
+
description: 'Page number',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
required: ['username'],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
handler: async (octokit, args) => {
|
|
97
|
+
const { data } = await octokit.activity.listEventsForAuthenticatedUser({
|
|
98
|
+
username: args.username,
|
|
99
|
+
per_page: args.per_page,
|
|
100
|
+
page: args.page,
|
|
101
|
+
});
|
|
102
|
+
return successResult(data);
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
// Notifications
|
|
106
|
+
// list_notifications_for_authenticated_user - List notifications
|
|
107
|
+
{
|
|
108
|
+
definition: {
|
|
109
|
+
name: 'github_activity_list_notifications_for_authenticated_user',
|
|
110
|
+
description: 'List notifications for the authenticated user',
|
|
111
|
+
inputSchema: {
|
|
112
|
+
type: 'object',
|
|
113
|
+
properties: {
|
|
114
|
+
all: {
|
|
115
|
+
type: 'string',
|
|
116
|
+
enum: ['true', 'false'],
|
|
117
|
+
description: 'Show notifications marked as read (default: false)',
|
|
118
|
+
},
|
|
119
|
+
participating: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
enum: ['true', 'false'],
|
|
122
|
+
description: 'Only show notifications where user is directly participating (default: false)',
|
|
123
|
+
},
|
|
124
|
+
since: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
description: 'Only show notifications updated after the given time (ISO 8601 format)',
|
|
127
|
+
},
|
|
128
|
+
before: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
description: 'Only show notifications updated before the given time (ISO 8601 format)',
|
|
131
|
+
},
|
|
132
|
+
per_page: {
|
|
133
|
+
type: 'number',
|
|
134
|
+
description: 'Results per page (max 100)',
|
|
135
|
+
},
|
|
136
|
+
page: {
|
|
137
|
+
type: 'number',
|
|
138
|
+
description: 'Page number',
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
handler: async (octokit, args) => {
|
|
144
|
+
const { data } = await octokit.activity.listNotificationsForAuthenticatedUser({
|
|
145
|
+
all: args.all !== undefined ? args.all === 'true' : undefined,
|
|
146
|
+
participating: args.participating !== undefined ? args.participating === 'true' : undefined,
|
|
147
|
+
since: args.since,
|
|
148
|
+
before: args.before,
|
|
149
|
+
per_page: args.per_page,
|
|
150
|
+
page: args.page,
|
|
151
|
+
});
|
|
152
|
+
return successResult(data);
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
// get_thread - Get a notification thread
|
|
156
|
+
{
|
|
157
|
+
definition: {
|
|
158
|
+
name: 'github_activity_get_thread',
|
|
159
|
+
description: 'Get a notification thread by ID',
|
|
160
|
+
inputSchema: {
|
|
161
|
+
type: 'object',
|
|
162
|
+
properties: {
|
|
163
|
+
thread_id: {
|
|
164
|
+
type: 'number',
|
|
165
|
+
description: 'The unique identifier of the notification thread',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
required: ['thread_id'],
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
handler: async (octokit, args) => {
|
|
172
|
+
const { data } = await octokit.activity.getThread({
|
|
173
|
+
thread_id: args.thread_id,
|
|
174
|
+
});
|
|
175
|
+
return successResult(data);
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
// mark_thread_as_read - Mark a thread as read
|
|
179
|
+
{
|
|
180
|
+
definition: {
|
|
181
|
+
name: 'github_activity_mark_thread_as_read',
|
|
182
|
+
description: 'Mark a notification thread as read',
|
|
183
|
+
inputSchema: {
|
|
184
|
+
type: 'object',
|
|
185
|
+
properties: {
|
|
186
|
+
thread_id: {
|
|
187
|
+
type: 'number',
|
|
188
|
+
description: 'The unique identifier of the notification thread',
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
required: ['thread_id'],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
handler: async (octokit, args) => {
|
|
195
|
+
await octokit.activity.markThreadAsRead({
|
|
196
|
+
thread_id: args.thread_id,
|
|
197
|
+
});
|
|
198
|
+
return successResult({ success: true, message: 'Thread marked as read' });
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
// mark_notifications_as_read - Mark all notifications as read
|
|
202
|
+
{
|
|
203
|
+
definition: {
|
|
204
|
+
name: 'github_activity_mark_notifications_as_read',
|
|
205
|
+
description: 'Mark all notifications as read',
|
|
206
|
+
inputSchema: {
|
|
207
|
+
type: 'object',
|
|
208
|
+
properties: {
|
|
209
|
+
last_read_at: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
description: 'Describes the last point that notifications were checked (ISO 8601 format). Default: current time',
|
|
212
|
+
},
|
|
213
|
+
read: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
enum: ['true', 'false'],
|
|
216
|
+
description: 'Whether the notification has been read',
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
handler: async (octokit, args) => {
|
|
222
|
+
const { data } = await octokit.activity.markNotificationsAsRead({
|
|
223
|
+
last_read_at: args.last_read_at,
|
|
224
|
+
read: args.read !== undefined ? args.read === 'true' : undefined,
|
|
225
|
+
});
|
|
226
|
+
return successResult(data || { success: true, message: 'Notifications marked as read' });
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
// Stargazers
|
|
230
|
+
// list_stargazers_for_repo - List stargazers for a repository
|
|
231
|
+
{
|
|
232
|
+
definition: {
|
|
233
|
+
name: 'github_activity_list_stargazers_for_repo',
|
|
234
|
+
description: 'List users who have starred a repository',
|
|
235
|
+
inputSchema: {
|
|
236
|
+
type: 'object',
|
|
237
|
+
properties: {
|
|
238
|
+
owner: {
|
|
239
|
+
type: 'string',
|
|
240
|
+
description: 'Repository owner',
|
|
241
|
+
},
|
|
242
|
+
repo: {
|
|
243
|
+
type: 'string',
|
|
244
|
+
description: 'Repository name',
|
|
245
|
+
},
|
|
246
|
+
per_page: {
|
|
247
|
+
type: 'number',
|
|
248
|
+
description: 'Results per page (max 100)',
|
|
249
|
+
},
|
|
250
|
+
page: {
|
|
251
|
+
type: 'number',
|
|
252
|
+
description: 'Page number',
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
required: ['owner', 'repo'],
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
handler: async (octokit, args) => {
|
|
259
|
+
const { data } = await octokit.activity.listStargazersForRepo({
|
|
260
|
+
owner: args.owner,
|
|
261
|
+
repo: args.repo,
|
|
262
|
+
per_page: args.per_page,
|
|
263
|
+
page: args.page,
|
|
264
|
+
});
|
|
265
|
+
return successResult(data);
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
// list_repos_starred_by_authenticated_user - List repositories starred by authenticated user
|
|
269
|
+
{
|
|
270
|
+
definition: {
|
|
271
|
+
name: 'github_activity_list_repos_starred_by_authenticated_user',
|
|
272
|
+
description: 'List repositories starred by the authenticated user',
|
|
273
|
+
inputSchema: {
|
|
274
|
+
type: 'object',
|
|
275
|
+
properties: {
|
|
276
|
+
sort: {
|
|
277
|
+
type: 'string',
|
|
278
|
+
enum: ['created', 'updated'],
|
|
279
|
+
description: 'Sort by created or updated time (default: created)',
|
|
280
|
+
},
|
|
281
|
+
direction: {
|
|
282
|
+
type: 'string',
|
|
283
|
+
enum: ['asc', 'desc'],
|
|
284
|
+
description: 'Sort direction (default: desc)',
|
|
285
|
+
},
|
|
286
|
+
per_page: {
|
|
287
|
+
type: 'number',
|
|
288
|
+
description: 'Results per page (max 100)',
|
|
289
|
+
},
|
|
290
|
+
page: {
|
|
291
|
+
type: 'number',
|
|
292
|
+
description: 'Page number',
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
handler: async (octokit, args) => {
|
|
298
|
+
const { data } = await octokit.activity.listReposStarredByAuthenticatedUser({
|
|
299
|
+
sort: args.sort,
|
|
300
|
+
direction: args.direction,
|
|
301
|
+
per_page: args.per_page,
|
|
302
|
+
page: args.page,
|
|
303
|
+
});
|
|
304
|
+
return successResult(data);
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
// star_repo_for_authenticated_user - Star a repository
|
|
308
|
+
{
|
|
309
|
+
definition: {
|
|
310
|
+
name: 'github_activity_star_repo_for_authenticated_user',
|
|
311
|
+
description: 'Star a repository for the authenticated user',
|
|
312
|
+
inputSchema: {
|
|
313
|
+
type: 'object',
|
|
314
|
+
properties: {
|
|
315
|
+
owner: {
|
|
316
|
+
type: 'string',
|
|
317
|
+
description: 'Repository owner',
|
|
318
|
+
},
|
|
319
|
+
repo: {
|
|
320
|
+
type: 'string',
|
|
321
|
+
description: 'Repository name',
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
required: ['owner', 'repo'],
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
handler: async (octokit, args) => {
|
|
328
|
+
await octokit.activity.starRepoForAuthenticatedUser({
|
|
329
|
+
owner: args.owner,
|
|
330
|
+
repo: args.repo,
|
|
331
|
+
});
|
|
332
|
+
return successResult({ success: true, message: `Starred ${args.owner}/${args.repo}` });
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
// unstar_repo_for_authenticated_user - Unstar a repository
|
|
336
|
+
{
|
|
337
|
+
definition: {
|
|
338
|
+
name: 'github_activity_unstar_repo_for_authenticated_user',
|
|
339
|
+
description: 'Unstar a repository for the authenticated user',
|
|
340
|
+
inputSchema: {
|
|
341
|
+
type: 'object',
|
|
342
|
+
properties: {
|
|
343
|
+
owner: {
|
|
344
|
+
type: 'string',
|
|
345
|
+
description: 'Repository owner',
|
|
346
|
+
},
|
|
347
|
+
repo: {
|
|
348
|
+
type: 'string',
|
|
349
|
+
description: 'Repository name',
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
required: ['owner', 'repo'],
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
handler: async (octokit, args) => {
|
|
356
|
+
await octokit.activity.unstarRepoForAuthenticatedUser({
|
|
357
|
+
owner: args.owner,
|
|
358
|
+
repo: args.repo,
|
|
359
|
+
});
|
|
360
|
+
return successResult({ success: true, message: `Unstarred ${args.owner}/${args.repo}` });
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
// check_repo_is_starred_by_authenticated_user - Check if a repository is starred
|
|
364
|
+
{
|
|
365
|
+
definition: {
|
|
366
|
+
name: 'github_activity_check_repo_is_starred_by_authenticated_user',
|
|
367
|
+
description: 'Check if a repository is starred by the authenticated user',
|
|
368
|
+
inputSchema: {
|
|
369
|
+
type: 'object',
|
|
370
|
+
properties: {
|
|
371
|
+
owner: {
|
|
372
|
+
type: 'string',
|
|
373
|
+
description: 'Repository owner',
|
|
374
|
+
},
|
|
375
|
+
repo: {
|
|
376
|
+
type: 'string',
|
|
377
|
+
description: 'Repository name',
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
required: ['owner', 'repo'],
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
handler: async (octokit, args) => {
|
|
384
|
+
try {
|
|
385
|
+
await octokit.activity.checkRepoIsStarredByAuthenticatedUser({
|
|
386
|
+
owner: args.owner,
|
|
387
|
+
repo: args.repo,
|
|
388
|
+
});
|
|
389
|
+
return successResult({ starred: true });
|
|
390
|
+
}
|
|
391
|
+
catch (error) {
|
|
392
|
+
if (error.status === 404) {
|
|
393
|
+
return successResult({ starred: false });
|
|
394
|
+
}
|
|
395
|
+
throw error;
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
// Watchers
|
|
400
|
+
// list_watchers_for_repo - List watchers for a repository
|
|
401
|
+
{
|
|
402
|
+
definition: {
|
|
403
|
+
name: 'github_activity_list_watchers_for_repo',
|
|
404
|
+
description: 'List users watching a repository',
|
|
405
|
+
inputSchema: {
|
|
406
|
+
type: 'object',
|
|
407
|
+
properties: {
|
|
408
|
+
owner: {
|
|
409
|
+
type: 'string',
|
|
410
|
+
description: 'Repository owner',
|
|
411
|
+
},
|
|
412
|
+
repo: {
|
|
413
|
+
type: 'string',
|
|
414
|
+
description: 'Repository name',
|
|
415
|
+
},
|
|
416
|
+
per_page: {
|
|
417
|
+
type: 'number',
|
|
418
|
+
description: 'Results per page (max 100)',
|
|
419
|
+
},
|
|
420
|
+
page: {
|
|
421
|
+
type: 'number',
|
|
422
|
+
description: 'Page number',
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
required: ['owner', 'repo'],
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
handler: async (octokit, args) => {
|
|
429
|
+
const { data } = await octokit.activity.listWatchersForRepo({
|
|
430
|
+
owner: args.owner,
|
|
431
|
+
repo: args.repo,
|
|
432
|
+
per_page: args.per_page,
|
|
433
|
+
page: args.page,
|
|
434
|
+
});
|
|
435
|
+
return successResult(data);
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
// list_repos_watched_by_authenticated_user - List repositories watched by authenticated user
|
|
439
|
+
{
|
|
440
|
+
definition: {
|
|
441
|
+
name: 'github_activity_list_repos_watched_by_authenticated_user',
|
|
442
|
+
description: 'List repositories watched by the authenticated user',
|
|
443
|
+
inputSchema: {
|
|
444
|
+
type: 'object',
|
|
445
|
+
properties: {
|
|
446
|
+
per_page: {
|
|
447
|
+
type: 'number',
|
|
448
|
+
description: 'Results per page (max 100)',
|
|
449
|
+
},
|
|
450
|
+
page: {
|
|
451
|
+
type: 'number',
|
|
452
|
+
description: 'Page number',
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
handler: async (octokit, args) => {
|
|
458
|
+
const { data } = await octokit.activity.listWatchedReposForAuthenticatedUser({
|
|
459
|
+
per_page: args.per_page,
|
|
460
|
+
page: args.page,
|
|
461
|
+
});
|
|
462
|
+
return successResult(data);
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
// set_repo_subscription - Set a repository subscription
|
|
466
|
+
{
|
|
467
|
+
definition: {
|
|
468
|
+
name: 'github_activity_set_repo_subscription',
|
|
469
|
+
description: 'Set a repository subscription (watch/ignore) for the authenticated user',
|
|
470
|
+
inputSchema: {
|
|
471
|
+
type: 'object',
|
|
472
|
+
properties: {
|
|
473
|
+
owner: {
|
|
474
|
+
type: 'string',
|
|
475
|
+
description: 'Repository owner',
|
|
476
|
+
},
|
|
477
|
+
repo: {
|
|
478
|
+
type: 'string',
|
|
479
|
+
description: 'Repository name',
|
|
480
|
+
},
|
|
481
|
+
subscribed: {
|
|
482
|
+
type: 'string',
|
|
483
|
+
enum: ['true', 'false'],
|
|
484
|
+
description: 'Determines if notifications should be received from this repository',
|
|
485
|
+
},
|
|
486
|
+
ignored: {
|
|
487
|
+
type: 'string',
|
|
488
|
+
enum: ['true', 'false'],
|
|
489
|
+
description: 'Determines if all notifications should be blocked from this repository',
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
required: ['owner', 'repo'],
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
handler: async (octokit, args) => {
|
|
496
|
+
const { data } = await octokit.activity.setRepoSubscription({
|
|
497
|
+
owner: args.owner,
|
|
498
|
+
repo: args.repo,
|
|
499
|
+
subscribed: args.subscribed !== undefined ? args.subscribed === 'true' : undefined,
|
|
500
|
+
ignored: args.ignored !== undefined ? args.ignored === 'true' : undefined,
|
|
501
|
+
});
|
|
502
|
+
return successResult(data);
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
// delete_repo_subscription - Delete a repository subscription
|
|
506
|
+
{
|
|
507
|
+
definition: {
|
|
508
|
+
name: 'github_activity_delete_repo_subscription',
|
|
509
|
+
description: 'Delete a repository subscription (unwatch) for the authenticated user',
|
|
510
|
+
inputSchema: {
|
|
511
|
+
type: 'object',
|
|
512
|
+
properties: {
|
|
513
|
+
owner: {
|
|
514
|
+
type: 'string',
|
|
515
|
+
description: 'Repository owner',
|
|
516
|
+
},
|
|
517
|
+
repo: {
|
|
518
|
+
type: 'string',
|
|
519
|
+
description: 'Repository name',
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
required: ['owner', 'repo'],
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
handler: async (octokit, args) => {
|
|
526
|
+
await octokit.activity.deleteRepoSubscription({
|
|
527
|
+
owner: args.owner,
|
|
528
|
+
repo: args.repo,
|
|
529
|
+
});
|
|
530
|
+
return successResult({ success: true, message: `Unwatched ${args.owner}/${args.repo}` });
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
],
|
|
534
|
+
};
|