@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,247 +1,474 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const usersCategory = {
|
|
3
|
+
name: 'users',
|
|
4
|
+
description: 'User management tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// get_authenticated - Get the authenticated user
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_users_get_authenticated',
|
|
10
|
+
description: 'Get the authenticated user',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
handler: async (octokit) => {
|
|
17
|
+
const { data } = await octokit.users.getAuthenticated();
|
|
18
|
+
return successResult(data);
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
// get_by_username - Get a user by username
|
|
22
|
+
{
|
|
23
|
+
definition: {
|
|
24
|
+
name: 'github_users_get_by_username',
|
|
25
|
+
description: 'Get a user by username',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
username: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'GitHub username',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
required: ['username'],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
handler: async (octokit, args) => {
|
|
38
|
+
const { data } = await octokit.users.getByUsername({
|
|
39
|
+
username: args.username,
|
|
40
|
+
});
|
|
41
|
+
return successResult(data);
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
// update_authenticated - Update the authenticated user
|
|
45
|
+
{
|
|
46
|
+
definition: {
|
|
47
|
+
name: 'github_users_update_authenticated',
|
|
48
|
+
description: 'Update the authenticated user profile',
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
name: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Display name',
|
|
55
|
+
},
|
|
56
|
+
email: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Public email address',
|
|
59
|
+
},
|
|
60
|
+
blog: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Blog URL',
|
|
63
|
+
},
|
|
64
|
+
twitter_username: {
|
|
65
|
+
type: 'string',
|
|
66
|
+
description: 'Twitter username',
|
|
67
|
+
},
|
|
68
|
+
company: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
description: 'Company name',
|
|
71
|
+
},
|
|
72
|
+
location: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Location',
|
|
75
|
+
},
|
|
76
|
+
hireable: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
enum: ['true', 'false'],
|
|
79
|
+
description: 'Available for hire',
|
|
80
|
+
},
|
|
81
|
+
bio: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
description: 'Short biography',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
handler: async (octokit, args) => {
|
|
89
|
+
const { data } = await octokit.users.updateAuthenticated({
|
|
90
|
+
name: args.name,
|
|
91
|
+
email: args.email,
|
|
92
|
+
blog: args.blog,
|
|
93
|
+
twitter_username: args.twitter_username,
|
|
94
|
+
company: args.company,
|
|
95
|
+
location: args.location,
|
|
96
|
+
hireable: args.hireable !== undefined ? args.hireable === 'true' : undefined,
|
|
97
|
+
bio: args.bio,
|
|
98
|
+
});
|
|
99
|
+
return successResult(data);
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
// list - List users
|
|
103
|
+
{
|
|
104
|
+
definition: {
|
|
105
|
+
name: 'github_users_list',
|
|
106
|
+
description: 'List all users (paginated)',
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: 'object',
|
|
109
|
+
properties: {
|
|
110
|
+
since: {
|
|
111
|
+
type: 'number',
|
|
112
|
+
description: 'User ID to start after',
|
|
113
|
+
},
|
|
114
|
+
per_page: {
|
|
115
|
+
type: 'number',
|
|
116
|
+
description: 'Results per page (max 100)',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
handler: async (octokit, args) => {
|
|
122
|
+
const { data } = await octokit.users.list({
|
|
123
|
+
since: args.since,
|
|
124
|
+
per_page: args.per_page,
|
|
125
|
+
});
|
|
126
|
+
return successResult(data);
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
// list_followers - List followers
|
|
130
|
+
{
|
|
131
|
+
definition: {
|
|
132
|
+
name: 'github_users_list_followers',
|
|
133
|
+
description: 'List followers of a user',
|
|
134
|
+
inputSchema: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
properties: {
|
|
137
|
+
username: {
|
|
138
|
+
type: 'string',
|
|
139
|
+
description: 'GitHub username (omit for authenticated user)',
|
|
140
|
+
},
|
|
141
|
+
per_page: {
|
|
142
|
+
type: 'number',
|
|
143
|
+
description: 'Results per page (max 100)',
|
|
144
|
+
},
|
|
145
|
+
page: {
|
|
146
|
+
type: 'number',
|
|
147
|
+
description: 'Page number',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
handler: async (octokit, args) => {
|
|
153
|
+
if (args.username) {
|
|
154
|
+
const { data } = await octokit.users.listFollowersForUser({
|
|
155
|
+
username: args.username,
|
|
156
|
+
per_page: args.per_page,
|
|
157
|
+
page: args.page,
|
|
158
|
+
});
|
|
159
|
+
return successResult(data);
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
const { data } = await octokit.users.listFollowersForAuthenticatedUser({
|
|
163
|
+
per_page: args.per_page,
|
|
164
|
+
page: args.page,
|
|
165
|
+
});
|
|
166
|
+
return successResult(data);
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
// list_following - List users the user is following
|
|
171
|
+
{
|
|
172
|
+
definition: {
|
|
173
|
+
name: 'github_users_list_following',
|
|
174
|
+
description: 'List users that a user is following',
|
|
175
|
+
inputSchema: {
|
|
176
|
+
type: 'object',
|
|
177
|
+
properties: {
|
|
178
|
+
username: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
description: 'GitHub username (omit for authenticated user)',
|
|
181
|
+
},
|
|
182
|
+
per_page: {
|
|
183
|
+
type: 'number',
|
|
184
|
+
description: 'Results per page (max 100)',
|
|
185
|
+
},
|
|
186
|
+
page: {
|
|
187
|
+
type: 'number',
|
|
188
|
+
description: 'Page number',
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
handler: async (octokit, args) => {
|
|
194
|
+
if (args.username) {
|
|
195
|
+
const { data } = await octokit.users.listFollowingForUser({
|
|
196
|
+
username: args.username,
|
|
197
|
+
per_page: args.per_page,
|
|
198
|
+
page: args.page,
|
|
199
|
+
});
|
|
200
|
+
return successResult(data);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
const { data } = await octokit.users.listFollowedByAuthenticatedUser({
|
|
204
|
+
per_page: args.per_page,
|
|
205
|
+
page: args.page,
|
|
206
|
+
});
|
|
207
|
+
return successResult(data);
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
// check_following - Check if the authenticated user follows another user
|
|
212
|
+
{
|
|
213
|
+
definition: {
|
|
214
|
+
name: 'github_users_check_following',
|
|
215
|
+
description: 'Check if the authenticated user follows another user',
|
|
216
|
+
inputSchema: {
|
|
217
|
+
type: 'object',
|
|
218
|
+
properties: {
|
|
219
|
+
username: {
|
|
220
|
+
type: 'string',
|
|
221
|
+
description: 'GitHub username to check',
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
required: ['username'],
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
handler: async (octokit, args) => {
|
|
228
|
+
try {
|
|
229
|
+
await octokit.users.checkPersonIsFollowedByAuthenticated({
|
|
230
|
+
username: args.username,
|
|
231
|
+
});
|
|
232
|
+
return successResult({ following: true });
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
if (error.status === 404) {
|
|
236
|
+
return successResult({ following: false });
|
|
237
|
+
}
|
|
238
|
+
throw error;
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
// follow - Follow a user
|
|
243
|
+
{
|
|
244
|
+
definition: {
|
|
245
|
+
name: 'github_users_follow',
|
|
246
|
+
description: 'Follow a user',
|
|
247
|
+
inputSchema: {
|
|
248
|
+
type: 'object',
|
|
249
|
+
properties: {
|
|
250
|
+
username: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
description: 'GitHub username to follow',
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
required: ['username'],
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
handler: async (octokit, args) => {
|
|
259
|
+
await octokit.users.follow({
|
|
260
|
+
username: args.username,
|
|
261
|
+
});
|
|
262
|
+
return successResult({ success: true, message: `Now following ${args.username}` });
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
// unfollow - Unfollow a user
|
|
266
|
+
{
|
|
267
|
+
definition: {
|
|
268
|
+
name: 'github_users_unfollow',
|
|
269
|
+
description: 'Unfollow a user',
|
|
270
|
+
inputSchema: {
|
|
271
|
+
type: 'object',
|
|
272
|
+
properties: {
|
|
273
|
+
username: {
|
|
274
|
+
type: 'string',
|
|
275
|
+
description: 'GitHub username to unfollow',
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
required: ['username'],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
handler: async (octokit, args) => {
|
|
282
|
+
await octokit.users.unfollow({
|
|
283
|
+
username: args.username,
|
|
284
|
+
});
|
|
285
|
+
return successResult({ success: true, message: `Unfollowed ${args.username}` });
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
// list_blocked - List blocked users
|
|
289
|
+
{
|
|
290
|
+
definition: {
|
|
291
|
+
name: 'github_users_list_blocked',
|
|
292
|
+
description: 'List users blocked by the authenticated user',
|
|
293
|
+
inputSchema: {
|
|
294
|
+
type: 'object',
|
|
295
|
+
properties: {
|
|
296
|
+
per_page: {
|
|
297
|
+
type: 'number',
|
|
298
|
+
description: 'Results per page (max 100)',
|
|
299
|
+
},
|
|
300
|
+
page: {
|
|
301
|
+
type: 'number',
|
|
302
|
+
description: 'Page number',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
handler: async (octokit, args) => {
|
|
308
|
+
const { data } = await octokit.users.listBlockedByAuthenticatedUser({
|
|
309
|
+
per_page: args.per_page,
|
|
310
|
+
page: args.page,
|
|
311
|
+
});
|
|
312
|
+
return successResult(data);
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
// block - Block a user
|
|
316
|
+
{
|
|
317
|
+
definition: {
|
|
318
|
+
name: 'github_users_block',
|
|
319
|
+
description: 'Block a user',
|
|
320
|
+
inputSchema: {
|
|
321
|
+
type: 'object',
|
|
322
|
+
properties: {
|
|
323
|
+
username: {
|
|
324
|
+
type: 'string',
|
|
325
|
+
description: 'GitHub username to block',
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
required: ['username'],
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
handler: async (octokit, args) => {
|
|
332
|
+
await octokit.users.block({
|
|
333
|
+
username: args.username,
|
|
334
|
+
});
|
|
335
|
+
return successResult({ success: true, message: `Blocked ${args.username}` });
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
// unblock - Unblock a user
|
|
339
|
+
{
|
|
340
|
+
definition: {
|
|
341
|
+
name: 'github_users_unblock',
|
|
342
|
+
description: 'Unblock a user',
|
|
343
|
+
inputSchema: {
|
|
344
|
+
type: 'object',
|
|
345
|
+
properties: {
|
|
346
|
+
username: {
|
|
347
|
+
type: 'string',
|
|
348
|
+
description: 'GitHub username to unblock',
|
|
349
|
+
},
|
|
350
|
+
},
|
|
351
|
+
required: ['username'],
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
handler: async (octokit, args) => {
|
|
355
|
+
await octokit.users.unblock({
|
|
356
|
+
username: args.username,
|
|
357
|
+
});
|
|
358
|
+
return successResult({ success: true, message: `Unblocked ${args.username}` });
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
// list_emails - List email addresses
|
|
362
|
+
{
|
|
363
|
+
definition: {
|
|
364
|
+
name: 'github_users_list_emails',
|
|
365
|
+
description: 'List email addresses for the authenticated user',
|
|
366
|
+
inputSchema: {
|
|
367
|
+
type: 'object',
|
|
368
|
+
properties: {
|
|
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
|
+
},
|
|
379
|
+
},
|
|
380
|
+
handler: async (octokit, args) => {
|
|
381
|
+
const { data } = await octokit.users.listEmailsForAuthenticatedUser({
|
|
382
|
+
per_page: args.per_page,
|
|
383
|
+
page: args.page,
|
|
384
|
+
});
|
|
385
|
+
return successResult(data);
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
// add_email - Add email addresses
|
|
389
|
+
{
|
|
390
|
+
definition: {
|
|
391
|
+
name: 'github_users_add_email',
|
|
392
|
+
description: 'Add email addresses to the authenticated user',
|
|
393
|
+
inputSchema: {
|
|
394
|
+
type: 'object',
|
|
395
|
+
properties: {
|
|
396
|
+
emails: {
|
|
397
|
+
type: 'array',
|
|
398
|
+
items: { type: 'string' },
|
|
399
|
+
description: 'Email addresses to add',
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
required: ['emails'],
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
handler: async (octokit, args) => {
|
|
406
|
+
const { data } = await octokit.users.addEmailForAuthenticatedUser({
|
|
407
|
+
emails: args.emails,
|
|
408
|
+
});
|
|
409
|
+
return successResult(data);
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
// list_ssh_keys - List SSH signing keys
|
|
413
|
+
{
|
|
414
|
+
definition: {
|
|
415
|
+
name: 'github_users_list_ssh_keys',
|
|
416
|
+
description: 'List SSH signing keys for the authenticated user',
|
|
417
|
+
inputSchema: {
|
|
418
|
+
type: 'object',
|
|
419
|
+
properties: {
|
|
420
|
+
per_page: {
|
|
421
|
+
type: 'number',
|
|
422
|
+
description: 'Results per page (max 100)',
|
|
423
|
+
},
|
|
424
|
+
page: {
|
|
425
|
+
type: 'number',
|
|
426
|
+
description: 'Page number',
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
handler: async (octokit, args) => {
|
|
432
|
+
const { data } = await octokit.users.listSshSigningKeysForAuthenticatedUser({
|
|
433
|
+
per_page: args.per_page,
|
|
434
|
+
page: args.page,
|
|
435
|
+
});
|
|
436
|
+
return successResult(data);
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
// get_context - Get contextual information about a user
|
|
440
|
+
{
|
|
441
|
+
definition: {
|
|
442
|
+
name: 'github_users_get_context',
|
|
443
|
+
description: 'Get contextual information about a user (hovercard)',
|
|
444
|
+
inputSchema: {
|
|
445
|
+
type: 'object',
|
|
446
|
+
properties: {
|
|
447
|
+
username: {
|
|
448
|
+
type: 'string',
|
|
449
|
+
description: 'GitHub username',
|
|
450
|
+
},
|
|
451
|
+
subject_type: {
|
|
452
|
+
type: 'string',
|
|
453
|
+
enum: ['organization', 'repository', 'issue', 'pull_request'],
|
|
454
|
+
description: 'Context type for the hovercard',
|
|
455
|
+
},
|
|
456
|
+
subject_id: {
|
|
457
|
+
type: 'string',
|
|
458
|
+
description: 'ID of the subject (required if subject_type is set)',
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
required: ['username'],
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
handler: async (octokit, args) => {
|
|
465
|
+
const { data } = await octokit.users.getContextForUser({
|
|
466
|
+
username: args.username,
|
|
467
|
+
subject_type: args.subject_type,
|
|
468
|
+
subject_id: args.subject_id,
|
|
469
|
+
});
|
|
470
|
+
return successResult(data);
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
],
|
|
474
|
+
};
|