@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
|
@@ -1,395 +1,666 @@
|
|
|
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
|
-
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const actionsCategory = {
|
|
3
|
+
name: 'actions',
|
|
4
|
+
description: 'GitHub Actions workflow tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list_repo_workflows - List repository workflows
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_actions_list_repo_workflows',
|
|
10
|
+
description: 'List all workflows in 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
|
+
per_page: {
|
|
23
|
+
type: 'number',
|
|
24
|
+
description: 'Results per page (max 100)',
|
|
25
|
+
},
|
|
26
|
+
page: {
|
|
27
|
+
type: 'number',
|
|
28
|
+
description: 'Page number',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ['owner', 'repo'],
|
|
27
32
|
},
|
|
28
33
|
},
|
|
29
|
-
|
|
34
|
+
handler: async (octokit, args) => {
|
|
35
|
+
const { data } = await octokit.actions.listRepoWorkflows({
|
|
36
|
+
owner: args.owner,
|
|
37
|
+
repo: args.repo,
|
|
38
|
+
per_page: args.per_page,
|
|
39
|
+
page: args.page,
|
|
40
|
+
});
|
|
41
|
+
return successResult(data);
|
|
42
|
+
},
|
|
30
43
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
// get_workflow - Get a workflow
|
|
45
|
+
{
|
|
46
|
+
definition: {
|
|
47
|
+
name: 'github_actions_get_workflow',
|
|
48
|
+
description: 'Get a specific workflow by ID or filename',
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
owner: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'Repository owner',
|
|
55
|
+
},
|
|
56
|
+
repo: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Repository name',
|
|
59
|
+
},
|
|
60
|
+
workflow_id: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Workflow ID or workflow filename (e.g., main.yml)',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
required: ['owner', 'repo', 'workflow_id'],
|
|
50
66
|
},
|
|
51
|
-
created: { type: 'string', description: 'Filter by creation date range' },
|
|
52
|
-
per_page: { type: 'number' },
|
|
53
|
-
page: { type: 'number' },
|
|
54
67
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
properties: {
|
|
64
|
-
owner: { type: 'string', description: 'Repository owner' },
|
|
65
|
-
repo: { type: 'string', description: 'Repository name' },
|
|
66
|
-
run_id: { type: 'number', description: 'Workflow run ID' },
|
|
67
|
-
},
|
|
68
|
-
required: ['owner', 'repo', 'run_id'],
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
name: 'github_actions_rerunWorkflow',
|
|
73
|
-
description: 'Re-run a workflow',
|
|
74
|
-
inputSchema: {
|
|
75
|
-
type: 'object',
|
|
76
|
-
properties: {
|
|
77
|
-
owner: { type: 'string', description: 'Repository owner' },
|
|
78
|
-
repo: { type: 'string', description: 'Repository name' },
|
|
79
|
-
run_id: { type: 'number', description: 'Workflow run ID' },
|
|
80
|
-
enable_debug_logging: { type: 'boolean', description: 'Enable debug logging' },
|
|
81
|
-
},
|
|
82
|
-
required: ['owner', 'repo', 'run_id'],
|
|
68
|
+
handler: async (octokit, args) => {
|
|
69
|
+
const { data } = await octokit.actions.getWorkflow({
|
|
70
|
+
owner: args.owner,
|
|
71
|
+
repo: args.repo,
|
|
72
|
+
workflow_id: args.workflow_id,
|
|
73
|
+
});
|
|
74
|
+
return successResult(data);
|
|
75
|
+
},
|
|
83
76
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
77
|
+
// get_workflow_usage - Get workflow usage
|
|
78
|
+
{
|
|
79
|
+
definition: {
|
|
80
|
+
name: 'github_actions_get_workflow_usage',
|
|
81
|
+
description: 'Get the number of billable minutes used by a workflow',
|
|
82
|
+
inputSchema: {
|
|
83
|
+
type: 'object',
|
|
84
|
+
properties: {
|
|
85
|
+
owner: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
description: 'Repository owner',
|
|
88
|
+
},
|
|
89
|
+
repo: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
description: 'Repository name',
|
|
92
|
+
},
|
|
93
|
+
workflow_id: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
description: 'Workflow ID or workflow filename',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
required: ['owner', 'repo', 'workflow_id'],
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
handler: async (octokit, args) => {
|
|
102
|
+
const { data } = await octokit.actions.getWorkflowUsage({
|
|
103
|
+
owner: args.owner,
|
|
104
|
+
repo: args.repo,
|
|
105
|
+
workflow_id: args.workflow_id,
|
|
106
|
+
});
|
|
107
|
+
return successResult(data);
|
|
108
|
+
},
|
|
96
109
|
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
110
|
+
// list_workflow_runs - List workflow runs
|
|
111
|
+
{
|
|
112
|
+
definition: {
|
|
113
|
+
name: 'github_actions_list_workflow_runs',
|
|
114
|
+
description: 'List all workflow runs for a repository or specific workflow',
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: 'object',
|
|
117
|
+
properties: {
|
|
118
|
+
owner: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: 'Repository owner',
|
|
121
|
+
},
|
|
122
|
+
repo: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'Repository name',
|
|
125
|
+
},
|
|
126
|
+
workflow_id: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Workflow ID or filename (optional, lists all runs if omitted)',
|
|
129
|
+
},
|
|
130
|
+
actor: {
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'Filter by actor (username)',
|
|
133
|
+
},
|
|
134
|
+
branch: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'Filter by branch name',
|
|
137
|
+
},
|
|
138
|
+
event: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'Filter by event type (e.g., push, pull_request)',
|
|
141
|
+
},
|
|
142
|
+
status: {
|
|
143
|
+
type: 'string',
|
|
144
|
+
enum: ['completed', 'action_required', 'cancelled', 'failure', 'neutral', 'skipped', 'stale', 'success', 'timed_out', 'in_progress', 'queued', 'requested', 'waiting', 'pending'],
|
|
145
|
+
description: 'Filter by status',
|
|
146
|
+
},
|
|
147
|
+
per_page: {
|
|
148
|
+
type: 'number',
|
|
149
|
+
description: 'Results per page (max 100)',
|
|
150
|
+
},
|
|
151
|
+
page: {
|
|
152
|
+
type: 'number',
|
|
153
|
+
description: 'Page number',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
required: ['owner', 'repo'],
|
|
111
157
|
},
|
|
112
|
-
per_page: { type: 'number' },
|
|
113
|
-
page: { type: 'number' },
|
|
114
158
|
},
|
|
115
|
-
|
|
159
|
+
handler: async (octokit, args) => {
|
|
160
|
+
if (args.workflow_id) {
|
|
161
|
+
const { data } = await octokit.actions.listWorkflowRuns({
|
|
162
|
+
owner: args.owner,
|
|
163
|
+
repo: args.repo,
|
|
164
|
+
workflow_id: args.workflow_id,
|
|
165
|
+
actor: args.actor,
|
|
166
|
+
branch: args.branch,
|
|
167
|
+
event: args.event,
|
|
168
|
+
status: args.status,
|
|
169
|
+
per_page: args.per_page,
|
|
170
|
+
page: args.page,
|
|
171
|
+
});
|
|
172
|
+
return successResult(data);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
const { data } = await octokit.actions.listWorkflowRunsForRepo({
|
|
176
|
+
owner: args.owner,
|
|
177
|
+
repo: args.repo,
|
|
178
|
+
actor: args.actor,
|
|
179
|
+
branch: args.branch,
|
|
180
|
+
event: args.event,
|
|
181
|
+
status: args.status,
|
|
182
|
+
per_page: args.per_page,
|
|
183
|
+
page: args.page,
|
|
184
|
+
});
|
|
185
|
+
return successResult(data);
|
|
186
|
+
}
|
|
187
|
+
},
|
|
116
188
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
189
|
+
// get_workflow_run - Get a workflow run
|
|
190
|
+
{
|
|
191
|
+
definition: {
|
|
192
|
+
name: 'github_actions_get_workflow_run',
|
|
193
|
+
description: 'Get a specific workflow run by ID',
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
owner: {
|
|
198
|
+
type: 'string',
|
|
199
|
+
description: 'Repository owner',
|
|
200
|
+
},
|
|
201
|
+
repo: {
|
|
202
|
+
type: 'string',
|
|
203
|
+
description: 'Repository name',
|
|
204
|
+
},
|
|
205
|
+
run_id: {
|
|
206
|
+
type: 'number',
|
|
207
|
+
description: 'The unique identifier of the workflow run',
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
required: ['owner', 'repo', 'run_id'],
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
handler: async (octokit, args) => {
|
|
214
|
+
const { data } = await octokit.actions.getWorkflowRun({
|
|
215
|
+
owner: args.owner,
|
|
216
|
+
repo: args.repo,
|
|
217
|
+
run_id: args.run_id,
|
|
218
|
+
});
|
|
219
|
+
return successResult(data);
|
|
220
|
+
},
|
|
129
221
|
},
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
222
|
+
// cancel_workflow_run - Cancel a workflow run
|
|
223
|
+
{
|
|
224
|
+
definition: {
|
|
225
|
+
name: 'github_actions_cancel_workflow_run',
|
|
226
|
+
description: 'Cancel a workflow run that is in progress',
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: 'object',
|
|
229
|
+
properties: {
|
|
230
|
+
owner: {
|
|
231
|
+
type: 'string',
|
|
232
|
+
description: 'Repository owner',
|
|
233
|
+
},
|
|
234
|
+
repo: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
description: 'Repository name',
|
|
237
|
+
},
|
|
238
|
+
run_id: {
|
|
239
|
+
type: 'number',
|
|
240
|
+
description: 'The unique identifier of the workflow run',
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
required: ['owner', 'repo', 'run_id'],
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
handler: async (octokit, args) => {
|
|
247
|
+
await octokit.actions.cancelWorkflowRun({
|
|
248
|
+
owner: args.owner,
|
|
249
|
+
repo: args.repo,
|
|
250
|
+
run_id: args.run_id,
|
|
251
|
+
});
|
|
252
|
+
return successResult({ success: true, message: 'Workflow run cancelled' });
|
|
253
|
+
},
|
|
142
254
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
255
|
+
// rerun_workflow - Re-run a workflow
|
|
256
|
+
{
|
|
257
|
+
definition: {
|
|
258
|
+
name: 'github_actions_rerun_workflow',
|
|
259
|
+
description: 'Re-run an entire workflow run',
|
|
260
|
+
inputSchema: {
|
|
261
|
+
type: 'object',
|
|
262
|
+
properties: {
|
|
263
|
+
owner: {
|
|
264
|
+
type: 'string',
|
|
265
|
+
description: 'Repository owner',
|
|
266
|
+
},
|
|
267
|
+
repo: {
|
|
268
|
+
type: 'string',
|
|
269
|
+
description: 'Repository name',
|
|
270
|
+
},
|
|
271
|
+
run_id: {
|
|
272
|
+
type: 'number',
|
|
273
|
+
description: 'The unique identifier of the workflow run',
|
|
274
|
+
},
|
|
275
|
+
enable_debug_logging: {
|
|
276
|
+
type: 'string',
|
|
277
|
+
enum: ['true', 'false'],
|
|
278
|
+
description: 'Enable debug logging for the re-run',
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
required: ['owner', 'repo', 'run_id'],
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
handler: async (octokit, args) => {
|
|
285
|
+
await octokit.actions.reRunWorkflow({
|
|
286
|
+
owner: args.owner,
|
|
287
|
+
repo: args.repo,
|
|
288
|
+
run_id: args.run_id,
|
|
289
|
+
enable_debug_logging: args.enable_debug_logging === 'true',
|
|
290
|
+
});
|
|
291
|
+
return successResult({ success: true, message: 'Workflow re-run triggered' });
|
|
292
|
+
},
|
|
156
293
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
294
|
+
// list_jobs_for_workflow_run - List jobs for a workflow run
|
|
295
|
+
{
|
|
296
|
+
definition: {
|
|
297
|
+
name: 'github_actions_list_jobs_for_workflow_run',
|
|
298
|
+
description: 'List all jobs for a specific workflow run',
|
|
299
|
+
inputSchema: {
|
|
300
|
+
type: 'object',
|
|
301
|
+
properties: {
|
|
302
|
+
owner: {
|
|
303
|
+
type: 'string',
|
|
304
|
+
description: 'Repository owner',
|
|
305
|
+
},
|
|
306
|
+
repo: {
|
|
307
|
+
type: 'string',
|
|
308
|
+
description: 'Repository name',
|
|
309
|
+
},
|
|
310
|
+
run_id: {
|
|
311
|
+
type: 'number',
|
|
312
|
+
description: 'The unique identifier of the workflow run',
|
|
313
|
+
},
|
|
314
|
+
filter: {
|
|
315
|
+
type: 'string',
|
|
316
|
+
enum: ['latest', 'all'],
|
|
317
|
+
description: 'Filter jobs by completion status',
|
|
318
|
+
},
|
|
319
|
+
per_page: {
|
|
320
|
+
type: 'number',
|
|
321
|
+
description: 'Results per page (max 100)',
|
|
322
|
+
},
|
|
323
|
+
page: {
|
|
324
|
+
type: 'number',
|
|
325
|
+
description: 'Page number',
|
|
326
|
+
},
|
|
327
|
+
},
|
|
328
|
+
required: ['owner', 'repo', 'run_id'],
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
handler: async (octokit, args) => {
|
|
332
|
+
const { data } = await octokit.actions.listJobsForWorkflowRun({
|
|
333
|
+
owner: args.owner,
|
|
334
|
+
repo: args.repo,
|
|
335
|
+
run_id: args.run_id,
|
|
336
|
+
filter: args.filter,
|
|
337
|
+
per_page: args.per_page,
|
|
338
|
+
page: args.page,
|
|
339
|
+
});
|
|
340
|
+
return successResult(data);
|
|
341
|
+
},
|
|
171
342
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
343
|
+
// get_job - Get a job for a workflow run
|
|
344
|
+
{
|
|
345
|
+
definition: {
|
|
346
|
+
name: 'github_actions_get_job',
|
|
347
|
+
description: 'Get a specific job from a workflow run',
|
|
348
|
+
inputSchema: {
|
|
349
|
+
type: 'object',
|
|
350
|
+
properties: {
|
|
351
|
+
owner: {
|
|
352
|
+
type: 'string',
|
|
353
|
+
description: 'Repository owner',
|
|
354
|
+
},
|
|
355
|
+
repo: {
|
|
356
|
+
type: 'string',
|
|
357
|
+
description: 'Repository name',
|
|
358
|
+
},
|
|
359
|
+
job_id: {
|
|
360
|
+
type: 'number',
|
|
361
|
+
description: 'The unique identifier of the job',
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
required: ['owner', 'repo', 'job_id'],
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
handler: async (octokit, args) => {
|
|
368
|
+
const { data } = await octokit.actions.getJobForWorkflowRun({
|
|
369
|
+
owner: args.owner,
|
|
370
|
+
repo: args.repo,
|
|
371
|
+
job_id: args.job_id,
|
|
372
|
+
});
|
|
373
|
+
return successResult(data);
|
|
374
|
+
},
|
|
184
375
|
},
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
376
|
+
// download_job_logs - Download job logs
|
|
377
|
+
{
|
|
378
|
+
definition: {
|
|
379
|
+
name: 'github_actions_download_job_logs',
|
|
380
|
+
description: 'Get the download URL for job logs',
|
|
381
|
+
inputSchema: {
|
|
382
|
+
type: 'object',
|
|
383
|
+
properties: {
|
|
384
|
+
owner: {
|
|
385
|
+
type: 'string',
|
|
386
|
+
description: 'Repository owner',
|
|
387
|
+
},
|
|
388
|
+
repo: {
|
|
389
|
+
type: 'string',
|
|
390
|
+
description: 'Repository name',
|
|
391
|
+
},
|
|
392
|
+
job_id: {
|
|
393
|
+
type: 'number',
|
|
394
|
+
description: 'The unique identifier of the job',
|
|
395
|
+
},
|
|
396
|
+
},
|
|
397
|
+
required: ['owner', 'repo', 'job_id'],
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
handler: async (octokit, args) => {
|
|
401
|
+
const { url } = await octokit.actions.downloadJobLogsForWorkflowRun({
|
|
402
|
+
owner: args.owner,
|
|
403
|
+
repo: args.repo,
|
|
404
|
+
job_id: args.job_id,
|
|
405
|
+
});
|
|
406
|
+
return successResult({ download_url: url });
|
|
407
|
+
},
|
|
197
408
|
},
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
409
|
+
// list_artifacts - List artifacts for a repository
|
|
410
|
+
{
|
|
411
|
+
definition: {
|
|
412
|
+
name: 'github_actions_list_artifacts',
|
|
413
|
+
description: 'List all artifacts for a repository',
|
|
414
|
+
inputSchema: {
|
|
415
|
+
type: 'object',
|
|
416
|
+
properties: {
|
|
417
|
+
owner: {
|
|
418
|
+
type: 'string',
|
|
419
|
+
description: 'Repository owner',
|
|
420
|
+
},
|
|
421
|
+
repo: {
|
|
422
|
+
type: 'string',
|
|
423
|
+
description: 'Repository name',
|
|
424
|
+
},
|
|
425
|
+
per_page: {
|
|
426
|
+
type: 'number',
|
|
427
|
+
description: 'Results per page (max 100)',
|
|
428
|
+
},
|
|
429
|
+
page: {
|
|
430
|
+
type: 'number',
|
|
431
|
+
description: 'Page number',
|
|
432
|
+
},
|
|
433
|
+
name: {
|
|
434
|
+
type: 'string',
|
|
435
|
+
description: 'Filter artifacts by exact name match',
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
required: ['owner', 'repo'],
|
|
210
439
|
},
|
|
211
|
-
|
|
212
|
-
|
|
440
|
+
},
|
|
441
|
+
handler: async (octokit, args) => {
|
|
442
|
+
const { data } = await octokit.actions.listArtifactsForRepo({
|
|
443
|
+
owner: args.owner,
|
|
444
|
+
repo: args.repo,
|
|
445
|
+
per_page: args.per_page,
|
|
446
|
+
page: args.page,
|
|
447
|
+
name: args.name,
|
|
448
|
+
});
|
|
449
|
+
return successResult(data);
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
// get_artifact - Get an artifact
|
|
453
|
+
{
|
|
454
|
+
definition: {
|
|
455
|
+
name: 'github_actions_get_artifact',
|
|
456
|
+
description: 'Get a specific artifact by ID',
|
|
457
|
+
inputSchema: {
|
|
213
458
|
type: 'object',
|
|
214
|
-
|
|
215
|
-
|
|
459
|
+
properties: {
|
|
460
|
+
owner: {
|
|
461
|
+
type: 'string',
|
|
462
|
+
description: 'Repository owner',
|
|
463
|
+
},
|
|
464
|
+
repo: {
|
|
465
|
+
type: 'string',
|
|
466
|
+
description: 'Repository name',
|
|
467
|
+
},
|
|
468
|
+
artifact_id: {
|
|
469
|
+
type: 'number',
|
|
470
|
+
description: 'The unique identifier of the artifact',
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
required: ['owner', 'repo', 'artifact_id'],
|
|
216
474
|
},
|
|
217
475
|
},
|
|
218
|
-
|
|
476
|
+
handler: async (octokit, args) => {
|
|
477
|
+
const { data } = await octokit.actions.getArtifact({
|
|
478
|
+
owner: args.owner,
|
|
479
|
+
repo: args.repo,
|
|
480
|
+
artifact_id: args.artifact_id,
|
|
481
|
+
});
|
|
482
|
+
return successResult(data);
|
|
483
|
+
},
|
|
219
484
|
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
485
|
+
// delete_artifact - Delete an artifact
|
|
486
|
+
{
|
|
487
|
+
definition: {
|
|
488
|
+
name: 'github_actions_delete_artifact',
|
|
489
|
+
description: 'Delete an artifact by ID',
|
|
490
|
+
inputSchema: {
|
|
491
|
+
type: 'object',
|
|
492
|
+
properties: {
|
|
493
|
+
owner: {
|
|
494
|
+
type: 'string',
|
|
495
|
+
description: 'Repository owner',
|
|
496
|
+
},
|
|
497
|
+
repo: {
|
|
498
|
+
type: 'string',
|
|
499
|
+
description: 'Repository name',
|
|
500
|
+
},
|
|
501
|
+
artifact_id: {
|
|
502
|
+
type: 'number',
|
|
503
|
+
description: 'The unique identifier of the artifact',
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
required: ['owner', 'repo', 'artifact_id'],
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
handler: async (octokit, args) => {
|
|
510
|
+
await octokit.actions.deleteArtifact({
|
|
511
|
+
owner: args.owner,
|
|
512
|
+
repo: args.repo,
|
|
513
|
+
artifact_id: args.artifact_id,
|
|
514
|
+
});
|
|
515
|
+
return successResult({ success: true, message: 'Artifact deleted' });
|
|
516
|
+
},
|
|
233
517
|
},
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
518
|
+
// list_repo_secrets - List repository secrets
|
|
519
|
+
{
|
|
520
|
+
definition: {
|
|
521
|
+
name: 'github_actions_list_repo_secrets',
|
|
522
|
+
description: 'List all secrets available in a repository (names only, not values)',
|
|
523
|
+
inputSchema: {
|
|
524
|
+
type: 'object',
|
|
525
|
+
properties: {
|
|
526
|
+
owner: {
|
|
527
|
+
type: 'string',
|
|
528
|
+
description: 'Repository owner',
|
|
529
|
+
},
|
|
530
|
+
repo: {
|
|
531
|
+
type: 'string',
|
|
532
|
+
description: 'Repository name',
|
|
533
|
+
},
|
|
534
|
+
per_page: {
|
|
535
|
+
type: 'number',
|
|
536
|
+
description: 'Results per page (max 100)',
|
|
537
|
+
},
|
|
538
|
+
page: {
|
|
539
|
+
type: 'number',
|
|
540
|
+
description: 'Page number',
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
required: ['owner', 'repo'],
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
handler: async (octokit, args) => {
|
|
547
|
+
const { data } = await octokit.actions.listRepoSecrets({
|
|
548
|
+
owner: args.owner,
|
|
549
|
+
repo: args.repo,
|
|
550
|
+
per_page: args.per_page,
|
|
551
|
+
page: args.page,
|
|
552
|
+
});
|
|
553
|
+
return successResult(data);
|
|
554
|
+
},
|
|
245
555
|
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
556
|
+
// get_repo_secret - Get a repository secret
|
|
557
|
+
{
|
|
558
|
+
definition: {
|
|
559
|
+
name: 'github_actions_get_repo_secret',
|
|
560
|
+
description: 'Get metadata about a repository secret (not the value)',
|
|
561
|
+
inputSchema: {
|
|
562
|
+
type: 'object',
|
|
563
|
+
properties: {
|
|
564
|
+
owner: {
|
|
565
|
+
type: 'string',
|
|
566
|
+
description: 'Repository owner',
|
|
567
|
+
},
|
|
568
|
+
repo: {
|
|
569
|
+
type: 'string',
|
|
570
|
+
description: 'Repository name',
|
|
571
|
+
},
|
|
572
|
+
secret_name: {
|
|
573
|
+
type: 'string',
|
|
574
|
+
description: 'The name of the secret',
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
required: ['owner', 'repo', 'secret_name'],
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
handler: async (octokit, args) => {
|
|
581
|
+
const { data } = await octokit.actions.getRepoSecret({
|
|
582
|
+
owner: args.owner,
|
|
583
|
+
repo: args.repo,
|
|
584
|
+
secret_name: args.secret_name,
|
|
585
|
+
});
|
|
586
|
+
return successResult(data);
|
|
587
|
+
},
|
|
259
588
|
},
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
589
|
+
// create_or_update_repo_secret - Create or update a repository secret
|
|
590
|
+
{
|
|
591
|
+
definition: {
|
|
592
|
+
name: 'github_actions_create_or_update_repo_secret',
|
|
593
|
+
description: 'Create or update a repository secret. Value must be encrypted with the repository public key.',
|
|
594
|
+
inputSchema: {
|
|
595
|
+
type: 'object',
|
|
596
|
+
properties: {
|
|
597
|
+
owner: {
|
|
598
|
+
type: 'string',
|
|
599
|
+
description: 'Repository owner',
|
|
600
|
+
},
|
|
601
|
+
repo: {
|
|
602
|
+
type: 'string',
|
|
603
|
+
description: 'Repository name',
|
|
604
|
+
},
|
|
605
|
+
secret_name: {
|
|
606
|
+
type: 'string',
|
|
607
|
+
description: 'The name of the secret',
|
|
608
|
+
},
|
|
609
|
+
encrypted_value: {
|
|
610
|
+
type: 'string',
|
|
611
|
+
description: 'Value for your secret, encrypted with LibSodium using the repository public key',
|
|
612
|
+
},
|
|
613
|
+
key_id: {
|
|
614
|
+
type: 'string',
|
|
615
|
+
description: 'ID of the key used to encrypt the secret',
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
required: ['owner', 'repo', 'secret_name', 'encrypted_value', 'key_id'],
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
handler: async (octokit, args) => {
|
|
622
|
+
await octokit.actions.createOrUpdateRepoSecret({
|
|
623
|
+
owner: args.owner,
|
|
624
|
+
repo: args.repo,
|
|
625
|
+
secret_name: args.secret_name,
|
|
626
|
+
encrypted_value: args.encrypted_value,
|
|
627
|
+
key_id: args.key_id,
|
|
628
|
+
});
|
|
629
|
+
return successResult({ success: true, message: 'Secret created or updated' });
|
|
630
|
+
},
|
|
273
631
|
},
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
632
|
+
// delete_repo_secret - Delete a repository secret
|
|
633
|
+
{
|
|
634
|
+
definition: {
|
|
635
|
+
name: 'github_actions_delete_repo_secret',
|
|
636
|
+
description: 'Delete a repository secret by name',
|
|
637
|
+
inputSchema: {
|
|
638
|
+
type: 'object',
|
|
639
|
+
properties: {
|
|
640
|
+
owner: {
|
|
641
|
+
type: 'string',
|
|
642
|
+
description: 'Repository owner',
|
|
643
|
+
},
|
|
644
|
+
repo: {
|
|
645
|
+
type: 'string',
|
|
646
|
+
description: 'Repository name',
|
|
647
|
+
},
|
|
648
|
+
secret_name: {
|
|
649
|
+
type: 'string',
|
|
650
|
+
description: 'The name of the secret',
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
required: ['owner', 'repo', 'secret_name'],
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
handler: async (octokit, args) => {
|
|
657
|
+
await octokit.actions.deleteRepoSecret({
|
|
658
|
+
owner: args.owner,
|
|
659
|
+
repo: args.repo,
|
|
660
|
+
secret_name: args.secret_name,
|
|
661
|
+
});
|
|
662
|
+
return successResult({ success: true, message: 'Secret deleted' });
|
|
663
|
+
},
|
|
287
664
|
},
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
export async function handleActionsTool(octokit, args) {
|
|
291
|
-
const owner = args.owner;
|
|
292
|
-
const repo = args.repo;
|
|
293
|
-
const workflowId = args.workflow_id;
|
|
294
|
-
const runId = args.run_id;
|
|
295
|
-
const jobId = args.job_id;
|
|
296
|
-
const artifactId = args.artifact_id;
|
|
297
|
-
// List workflows
|
|
298
|
-
if (!workflowId && !runId && !jobId && !artifactId && !('name' in args)) {
|
|
299
|
-
const { data } = await octokit.actions.listRepoWorkflows(args);
|
|
300
|
-
return data;
|
|
301
|
-
}
|
|
302
|
-
// Get workflow
|
|
303
|
-
if (workflowId && !runId && !('ref' in args)) {
|
|
304
|
-
const { data } = await octokit.actions.getWorkflow({ owner, repo, workflow_id: workflowId });
|
|
305
|
-
return data;
|
|
306
|
-
}
|
|
307
|
-
// List workflow runs
|
|
308
|
-
if (!runId && !jobId && ('actor' in args || 'branch' in args || 'event' in args || 'status' in args || 'created' in args)) {
|
|
309
|
-
if (workflowId) {
|
|
310
|
-
const { data } = await octokit.actions.listWorkflowRuns({ owner, repo, workflow_id: workflowId, ...args });
|
|
311
|
-
return data;
|
|
312
|
-
}
|
|
313
|
-
const { data } = await octokit.actions.listWorkflowRunsForRepo(args);
|
|
314
|
-
return data;
|
|
315
|
-
}
|
|
316
|
-
// Get workflow run
|
|
317
|
-
if (runId && !('enable_debug_logging' in args) && !('filter' in args) && !artifactId) {
|
|
318
|
-
const { data } = await octokit.actions.getWorkflowRun({ owner, repo, run_id: runId });
|
|
319
|
-
return data;
|
|
320
|
-
}
|
|
321
|
-
// Re-run workflow
|
|
322
|
-
if (runId && 'enable_debug_logging' in args) {
|
|
323
|
-
await octokit.actions.reRunWorkflow({ owner, repo, run_id: runId, enable_debug_logging: args.enable_debug_logging });
|
|
324
|
-
return { success: true, message: 'Workflow re-run triggered' };
|
|
325
|
-
}
|
|
326
|
-
// Cancel workflow run
|
|
327
|
-
if (runId && Object.keys(args).filter(k => !['owner', 'repo', 'run_id'].includes(k)).length === 0) {
|
|
328
|
-
await octokit.actions.cancelWorkflowRun({ owner, repo, run_id: runId });
|
|
329
|
-
return { success: true, message: 'Workflow run cancelled' };
|
|
330
|
-
}
|
|
331
|
-
// List workflow run jobs
|
|
332
|
-
if (runId && 'filter' in args) {
|
|
333
|
-
const { data } = await octokit.actions.listJobsForWorkflowRun(args);
|
|
334
|
-
return data;
|
|
335
|
-
}
|
|
336
|
-
// Get job
|
|
337
|
-
if (jobId && !('download' in args)) {
|
|
338
|
-
const { data } = await octokit.actions.getJobForWorkflowRun({ owner, repo, job_id: jobId });
|
|
339
|
-
return data;
|
|
340
|
-
}
|
|
341
|
-
// Download job logs
|
|
342
|
-
if (jobId) {
|
|
343
|
-
const { data } = await octokit.actions.downloadJobLogsForWorkflowRun({ owner, repo, job_id: jobId });
|
|
344
|
-
return { logs_url: data };
|
|
345
|
-
}
|
|
346
|
-
// List artifacts
|
|
347
|
-
if (!artifactId && !runId && !workflowId && !('name' in args)) {
|
|
348
|
-
const { data } = await octokit.actions.listArtifactsForRepo(args);
|
|
349
|
-
return data;
|
|
350
|
-
}
|
|
351
|
-
// List workflow run artifacts
|
|
352
|
-
if (runId && !('filter' in args)) {
|
|
353
|
-
const { data } = await octokit.actions.listWorkflowRunArtifacts(args);
|
|
354
|
-
return data;
|
|
355
|
-
}
|
|
356
|
-
// Get artifact
|
|
357
|
-
if (artifactId) {
|
|
358
|
-
const { data } = await octokit.actions.getArtifact({ owner, repo, artifact_id: artifactId });
|
|
359
|
-
return data;
|
|
360
|
-
}
|
|
361
|
-
// Create workflow dispatch
|
|
362
|
-
if (workflowId && 'ref' in args) {
|
|
363
|
-
await octokit.actions.createWorkflowDispatch(args);
|
|
364
|
-
return { success: true, message: 'Workflow dispatch event created' };
|
|
365
|
-
}
|
|
366
|
-
// List secrets
|
|
367
|
-
if ('secrets' in args || (!workflowId && !runId && !artifactId && !('name' in args) && !('value' in args))) {
|
|
368
|
-
const { data } = await octokit.actions.listRepoSecrets(args);
|
|
369
|
-
return data;
|
|
370
|
-
}
|
|
371
|
-
// Get public key
|
|
372
|
-
if ('public_key' in args) {
|
|
373
|
-
const { data } = await octokit.actions.getRepoPublicKey({ owner, repo });
|
|
374
|
-
return data;
|
|
375
|
-
}
|
|
376
|
-
// List variables
|
|
377
|
-
if ('variables' in args) {
|
|
378
|
-
const { data } = await octokit.actions.listRepoVariables(args);
|
|
379
|
-
return data;
|
|
380
|
-
}
|
|
381
|
-
// Create variable
|
|
382
|
-
if ('name' in args && 'value' in args) {
|
|
383
|
-
await octokit.actions.createRepoVariable(args);
|
|
384
|
-
return { success: true, message: 'Variable created' };
|
|
385
|
-
}
|
|
386
|
-
// List runners
|
|
387
|
-
if ('runners' in args) {
|
|
388
|
-
const { data } = await octokit.actions.listSelfHostedRunnersForRepo(args);
|
|
389
|
-
return data;
|
|
390
|
-
}
|
|
391
|
-
// Default: list workflows
|
|
392
|
-
const { data } = await octokit.actions.listRepoWorkflows({ owner, repo });
|
|
393
|
-
return data;
|
|
394
|
-
}
|
|
395
|
-
//# sourceMappingURL=actions.js.map
|
|
665
|
+
],
|
|
666
|
+
};
|