@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
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const licensesCategory = {
|
|
3
|
+
name: 'licenses',
|
|
4
|
+
description: 'GitHub licenses tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// get_all_commonly_used - List commonly used licenses
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_licenses_get_all_commonly_used',
|
|
10
|
+
description: 'List commonly used open source licenses',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
featured: {
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
description: 'Whether to only return featured licenses (popular ones like MIT, Apache, GPL)',
|
|
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
|
+
},
|
|
28
|
+
},
|
|
29
|
+
handler: async (octokit, args) => {
|
|
30
|
+
const { data } = await octokit.licenses.getAllCommonlyUsed({
|
|
31
|
+
featured: args.featured,
|
|
32
|
+
per_page: args.per_page,
|
|
33
|
+
page: args.page,
|
|
34
|
+
});
|
|
35
|
+
return successResult(data);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
// get - Get a license by key
|
|
39
|
+
{
|
|
40
|
+
definition: {
|
|
41
|
+
name: 'github_licenses_get',
|
|
42
|
+
description: 'Get a license by its SPDX key (e.g., "mit", "apache-2.0", "gpl-3.0")',
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
license: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'The license SPDX identifier (e.g., "mit", "apache-2.0", "gpl-3.0")',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
required: ['license'],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
handler: async (octokit, args) => {
|
|
55
|
+
const { data } = await octokit.licenses.get({
|
|
56
|
+
license: args.license,
|
|
57
|
+
});
|
|
58
|
+
return successResult(data);
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
// get_for_repo - Get license info for a repository
|
|
62
|
+
{
|
|
63
|
+
definition: {
|
|
64
|
+
name: 'github_licenses_get_for_repo',
|
|
65
|
+
description: 'Get the license for a repository',
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
owner: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
description: 'The account owner of the repository',
|
|
72
|
+
},
|
|
73
|
+
repo: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
description: 'The name of the repository',
|
|
76
|
+
},
|
|
77
|
+
ref: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
description: 'The Git reference (branch, tag, or commit SHA) to get the license from. Defaults to the default branch.',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
required: ['owner', 'repo'],
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
handler: async (octokit, args) => {
|
|
86
|
+
const { data } = await octokit.licenses.getForRepo({
|
|
87
|
+
owner: args.owner,
|
|
88
|
+
repo: args.repo,
|
|
89
|
+
ref: args.ref,
|
|
90
|
+
});
|
|
91
|
+
return successResult(data);
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const markdownCategory = {
|
|
3
|
+
name: 'markdown',
|
|
4
|
+
description: 'GitHub markdown tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// render - Render markdown
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_markdown_render',
|
|
10
|
+
description: 'Render a markdown document. Use mode "gfm" for GitHub Flavored Markdown with repository context.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
text: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The markdown text to render',
|
|
17
|
+
},
|
|
18
|
+
mode: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
enum: ['markdown', 'gfm'],
|
|
21
|
+
description: 'The rendering mode. "markdown" for plain markdown, "gfm" for GitHub Flavored Markdown',
|
|
22
|
+
},
|
|
23
|
+
context: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'The repository context (owner/repo) for gfm mode. Required when mode is "gfm".',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
required: ['text'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
handler: async (octokit, args) => {
|
|
32
|
+
const { data } = await octokit.markdown.render({
|
|
33
|
+
text: args.text,
|
|
34
|
+
mode: args.mode,
|
|
35
|
+
context: args.context,
|
|
36
|
+
});
|
|
37
|
+
return successResult({ html: data });
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
// render_raw - Render raw markdown
|
|
41
|
+
{
|
|
42
|
+
definition: {
|
|
43
|
+
name: 'github_markdown_render_raw',
|
|
44
|
+
description: 'Render raw markdown text. This endpoint renders plain markdown without GitHub-specific features.',
|
|
45
|
+
inputSchema: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
data: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'The raw markdown text to render',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
required: ['data'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
handler: async (octokit, args) => {
|
|
57
|
+
const { data } = await octokit.markdown.renderRaw({
|
|
58
|
+
data: args.data,
|
|
59
|
+
});
|
|
60
|
+
return successResult({ html: data });
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const metaCategory = {
|
|
3
|
+
name: 'meta',
|
|
4
|
+
description: 'GitHub API metadata tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// get - Get GitHub API meta information
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_meta_get',
|
|
10
|
+
description: 'Get GitHub API meta information including IP ranges, SSH keys, and more',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
handler: async (octokit) => {
|
|
17
|
+
const { data } = await octokit.meta.get();
|
|
18
|
+
return successResult(data);
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
// get_octocat - Get the octocat ASCII art
|
|
22
|
+
{
|
|
23
|
+
definition: {
|
|
24
|
+
name: 'github_meta_get_octocat',
|
|
25
|
+
description: 'Get the octocat ASCII art with an optional custom message',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
s: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Custom text to include in the octocat speech bubble',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
handler: async (octokit, args) => {
|
|
37
|
+
const { data } = await octokit.meta.getOctocat({
|
|
38
|
+
s: args.s,
|
|
39
|
+
});
|
|
40
|
+
return successResult(data);
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
// get_zen - Get a random GitHub zen quote
|
|
44
|
+
{
|
|
45
|
+
definition: {
|
|
46
|
+
name: 'github_meta_get_zen',
|
|
47
|
+
description: 'Get a random GitHub zen quote',
|
|
48
|
+
inputSchema: {
|
|
49
|
+
type: 'object',
|
|
50
|
+
properties: {},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
handler: async (octokit) => {
|
|
54
|
+
const { data } = await octokit.meta.getZen();
|
|
55
|
+
return successResult(data);
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
// get_all_versions - List all API versions
|
|
59
|
+
{
|
|
60
|
+
definition: {
|
|
61
|
+
name: 'github_meta_get_all_versions',
|
|
62
|
+
description: 'List all available GitHub API versions',
|
|
63
|
+
inputSchema: {
|
|
64
|
+
type: 'object',
|
|
65
|
+
properties: {},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
handler: async (octokit) => {
|
|
69
|
+
const { data } = await octokit.meta.getAllVersions();
|
|
70
|
+
return successResult(data);
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { successResult } from '../types.js';
|
|
2
|
+
export const migrationsCategory = {
|
|
3
|
+
name: 'migrations',
|
|
4
|
+
description: 'GitHub migrations tools',
|
|
5
|
+
tools: [
|
|
6
|
+
// list_for_org - List organization migrations
|
|
7
|
+
{
|
|
8
|
+
definition: {
|
|
9
|
+
name: 'github_migrations_list_for_org',
|
|
10
|
+
description: 'List the most recent migrations for 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
|
+
exclude: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Exclude attributes from the API response (comma-separated: repositories)',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ['org'],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
handler: async (octokit, args) => {
|
|
35
|
+
const exclude = args.exclude
|
|
36
|
+
? args.exclude.split(',').map((s) => s.trim())
|
|
37
|
+
: undefined;
|
|
38
|
+
const { data } = await octokit.migrations.listForOrg({
|
|
39
|
+
org: args.org,
|
|
40
|
+
per_page: args.per_page,
|
|
41
|
+
page: args.page,
|
|
42
|
+
exclude,
|
|
43
|
+
});
|
|
44
|
+
return successResult(data);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
// start_for_org - Start an organization migration
|
|
48
|
+
{
|
|
49
|
+
definition: {
|
|
50
|
+
name: 'github_migrations_start_for_org',
|
|
51
|
+
description: 'Start a migration for an organization. Initiates the generation of a migration archive.',
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
properties: {
|
|
55
|
+
org: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'Organization name',
|
|
58
|
+
},
|
|
59
|
+
repositories: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Comma-separated list of repository names to include in the migration',
|
|
62
|
+
},
|
|
63
|
+
lock_repositories: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
enum: ['true', 'false'],
|
|
66
|
+
description: 'Lock the repositories being migrated at the start of the migration',
|
|
67
|
+
},
|
|
68
|
+
exclude_metadata: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
enum: ['true', 'false'],
|
|
71
|
+
description: 'Exclude metadata from the migration (excludes releases only)',
|
|
72
|
+
},
|
|
73
|
+
exclude_git_data: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
enum: ['true', 'false'],
|
|
76
|
+
description: 'Exclude git data from the migration',
|
|
77
|
+
},
|
|
78
|
+
exclude_attachments: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
enum: ['true', 'false'],
|
|
81
|
+
description: 'Exclude attachments from the migration',
|
|
82
|
+
},
|
|
83
|
+
exclude_releases: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['true', 'false'],
|
|
86
|
+
description: 'Exclude releases from the migration',
|
|
87
|
+
},
|
|
88
|
+
exclude_owner_projects: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
enum: ['true', 'false'],
|
|
91
|
+
description: 'Exclude organization-owned projects from the migration',
|
|
92
|
+
},
|
|
93
|
+
org_metadata_only: {
|
|
94
|
+
type: 'string',
|
|
95
|
+
enum: ['true', 'false'],
|
|
96
|
+
description: 'Only export organization metadata (no repository data)',
|
|
97
|
+
},
|
|
98
|
+
exclude: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
description: 'Exclude attributes from the API response (comma-separated: repositories)',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
required: ['org', 'repositories'],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
handler: async (octokit, args) => {
|
|
107
|
+
const repositories = args.repositories.split(',').map((s) => s.trim());
|
|
108
|
+
const exclude = args.exclude
|
|
109
|
+
? args.exclude.split(',').map((s) => s.trim())
|
|
110
|
+
: undefined;
|
|
111
|
+
const { data } = await octokit.migrations.startForOrg({
|
|
112
|
+
org: args.org,
|
|
113
|
+
repositories,
|
|
114
|
+
lock_repositories: args.lock_repositories === 'true',
|
|
115
|
+
exclude_metadata: args.exclude_metadata === 'true',
|
|
116
|
+
exclude_git_data: args.exclude_git_data === 'true',
|
|
117
|
+
exclude_attachments: args.exclude_attachments === 'true',
|
|
118
|
+
exclude_releases: args.exclude_releases === 'true',
|
|
119
|
+
exclude_owner_projects: args.exclude_owner_projects === 'true',
|
|
120
|
+
org_metadata_only: args.org_metadata_only === 'true',
|
|
121
|
+
exclude,
|
|
122
|
+
});
|
|
123
|
+
return successResult(data);
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
// get_status_for_org - Get the status of an organization migration
|
|
127
|
+
{
|
|
128
|
+
definition: {
|
|
129
|
+
name: 'github_migrations_get_status_for_org',
|
|
130
|
+
description: 'Get the status of an organization migration',
|
|
131
|
+
inputSchema: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
org: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'Organization name',
|
|
137
|
+
},
|
|
138
|
+
migration_id: {
|
|
139
|
+
type: 'number',
|
|
140
|
+
description: 'The unique identifier of the migration',
|
|
141
|
+
},
|
|
142
|
+
exclude: {
|
|
143
|
+
type: 'string',
|
|
144
|
+
description: 'Exclude attributes from the API response (comma-separated: repositories)',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
required: ['org', 'migration_id'],
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
handler: async (octokit, args) => {
|
|
151
|
+
const exclude = args.exclude
|
|
152
|
+
? args.exclude.split(',').map((s) => s.trim())
|
|
153
|
+
: undefined;
|
|
154
|
+
const { data } = await octokit.migrations.getStatusForOrg({
|
|
155
|
+
org: args.org,
|
|
156
|
+
migration_id: args.migration_id,
|
|
157
|
+
exclude,
|
|
158
|
+
});
|
|
159
|
+
return successResult(data);
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
// get_archive_for_org - Download an organization migration archive
|
|
163
|
+
{
|
|
164
|
+
definition: {
|
|
165
|
+
name: 'github_migrations_get_archive_for_org',
|
|
166
|
+
description: 'Download an organization migration archive. Returns a URL to download the migration archive.',
|
|
167
|
+
inputSchema: {
|
|
168
|
+
type: 'object',
|
|
169
|
+
properties: {
|
|
170
|
+
org: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
description: 'Organization name',
|
|
173
|
+
},
|
|
174
|
+
migration_id: {
|
|
175
|
+
type: 'number',
|
|
176
|
+
description: 'The unique identifier of the migration',
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
required: ['org', 'migration_id'],
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
handler: async (octokit, args) => {
|
|
183
|
+
const { url } = await octokit.migrations.downloadArchiveForOrg({
|
|
184
|
+
org: args.org,
|
|
185
|
+
migration_id: args.migration_id,
|
|
186
|
+
});
|
|
187
|
+
return successResult({ archive_url: url });
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
// delete_archive_for_org - Delete an organization migration archive
|
|
191
|
+
{
|
|
192
|
+
definition: {
|
|
193
|
+
name: 'github_migrations_delete_archive_for_org',
|
|
194
|
+
description: 'Delete an organization migration archive',
|
|
195
|
+
inputSchema: {
|
|
196
|
+
type: 'object',
|
|
197
|
+
properties: {
|
|
198
|
+
org: {
|
|
199
|
+
type: 'string',
|
|
200
|
+
description: 'Organization name',
|
|
201
|
+
},
|
|
202
|
+
migration_id: {
|
|
203
|
+
type: 'number',
|
|
204
|
+
description: 'The unique identifier of the migration',
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
required: ['org', 'migration_id'],
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
handler: async (octokit, args) => {
|
|
211
|
+
await octokit.migrations.deleteArchiveForOrg({
|
|
212
|
+
org: args.org,
|
|
213
|
+
migration_id: args.migration_id,
|
|
214
|
+
});
|
|
215
|
+
return successResult({ success: true, message: 'Migration archive deleted' });
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
// unlock_repo_for_org - Unlock a repository after migration
|
|
219
|
+
{
|
|
220
|
+
definition: {
|
|
221
|
+
name: 'github_migrations_unlock_repo_for_org',
|
|
222
|
+
description: 'Unlock a repository that was locked for migration. This will allow the repository to be modified again.',
|
|
223
|
+
inputSchema: {
|
|
224
|
+
type: 'object',
|
|
225
|
+
properties: {
|
|
226
|
+
org: {
|
|
227
|
+
type: 'string',
|
|
228
|
+
description: 'Organization name',
|
|
229
|
+
},
|
|
230
|
+
migration_id: {
|
|
231
|
+
type: 'number',
|
|
232
|
+
description: 'The unique identifier of the migration',
|
|
233
|
+
},
|
|
234
|
+
repo_name: {
|
|
235
|
+
type: 'string',
|
|
236
|
+
description: 'The name of the repository to unlock',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
required: ['org', 'migration_id', 'repo_name'],
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
handler: async (octokit, args) => {
|
|
243
|
+
await octokit.migrations.unlockRepoForOrg({
|
|
244
|
+
org: args.org,
|
|
245
|
+
migration_id: args.migration_id,
|
|
246
|
+
repo_name: args.repo_name,
|
|
247
|
+
});
|
|
248
|
+
return successResult({ success: true, message: 'Repository unlocked' });
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
// list_repos_for_org - List repositories in an organization migration
|
|
252
|
+
{
|
|
253
|
+
definition: {
|
|
254
|
+
name: 'github_migrations_list_repos_for_org',
|
|
255
|
+
description: 'List the repositories in an organization migration',
|
|
256
|
+
inputSchema: {
|
|
257
|
+
type: 'object',
|
|
258
|
+
properties: {
|
|
259
|
+
org: {
|
|
260
|
+
type: 'string',
|
|
261
|
+
description: 'Organization name',
|
|
262
|
+
},
|
|
263
|
+
migration_id: {
|
|
264
|
+
type: 'number',
|
|
265
|
+
description: 'The unique identifier of the migration',
|
|
266
|
+
},
|
|
267
|
+
per_page: {
|
|
268
|
+
type: 'number',
|
|
269
|
+
description: 'Results per page (max 100)',
|
|
270
|
+
},
|
|
271
|
+
page: {
|
|
272
|
+
type: 'number',
|
|
273
|
+
description: 'Page number',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
required: ['org', 'migration_id'],
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
handler: async (octokit, args) => {
|
|
280
|
+
const { data } = await octokit.migrations.listReposForOrg({
|
|
281
|
+
org: args.org,
|
|
282
|
+
migration_id: args.migration_id,
|
|
283
|
+
per_page: args.per_page,
|
|
284
|
+
page: args.page,
|
|
285
|
+
});
|
|
286
|
+
return successResult(data);
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export declare const orgsTools: Tool[];
|
|
4
|
-
export declare function handleOrgsTool(octokit: Octokit, args: Record<string, unknown>): Promise<unknown>;
|
|
5
|
-
//# sourceMappingURL=orgs.d.ts.map
|
|
1
|
+
import type { ToolCategory } from '../types.js';
|
|
2
|
+
export declare const orgsCategory: ToolCategory;
|