mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-18 08:03:26 +02:00
cleanup
This commit is contained in:
committed by
Peter M. Elias
parent
a79ec67d9c
commit
7c72d987f9
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { githubRequest } from "../common/utils";
|
||||
import { GitHubReferenceSchema } from "../common/types";
|
||||
import { githubRequest } from "../common/utils.js";
|
||||
import { GitHubReferenceSchema } from "../common/types.js";
|
||||
|
||||
// Schema definitions
|
||||
export const CreateBranchOptionsSchema = z.object({
|
||||
@@ -109,4 +109,4 @@ export async function updateBranch(
|
||||
);
|
||||
|
||||
return GitHubReferenceSchema.parse(response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { githubRequest, buildUrl } from "../common/utils";
|
||||
import { GitHubCommitSchema, GitHubListCommitsSchema } from "../common/types";
|
||||
import { githubRequest, buildUrl } from "../common/utils.js";
|
||||
import { GitHubCommitSchema, GitHubListCommitsSchema } from "../common/types.js";
|
||||
|
||||
// Schema definitions
|
||||
export const ListCommitsSchema = z.object({
|
||||
@@ -92,4 +92,4 @@ export async function compareCommits(
|
||||
ahead_by: z.number(),
|
||||
behind_by: z.number(),
|
||||
}).parse(response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { githubRequest } from "../common/utils";
|
||||
import { githubRequest } from "../common/utils.js";
|
||||
import {
|
||||
GitHubContentSchema,
|
||||
GitHubAuthorSchema,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
GitHubCommitSchema,
|
||||
GitHubReferenceSchema,
|
||||
GitHubFileContentSchema,
|
||||
} from "../common/types";
|
||||
} from "../common/types.js";
|
||||
|
||||
// Schema definitions
|
||||
export const FileOperationSchema = z.object({
|
||||
@@ -216,4 +216,4 @@ export async function pushFiles(
|
||||
const tree = await createTree(owner, repo, files, commitSha);
|
||||
const commit = await createCommit(owner, repo, message, tree.sha, [commitSha]);
|
||||
return await updateReference(owner, repo, `heads/${branch}`, commit.sha);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { z } from "zod";
|
||||
import { githubRequest, buildUrl } from "../common/utils";
|
||||
import { githubRequest, buildUrl } from "../common/utils.js";
|
||||
import {
|
||||
GitHubIssueSchema,
|
||||
GitHubLabelSchema,
|
||||
GitHubIssueAssigneeSchema,
|
||||
GitHubMilestoneSchema,
|
||||
} from "../common/types";
|
||||
} from "../common/types.js";
|
||||
|
||||
// Schema definitions
|
||||
export const CreateIssueOptionsSchema = z.object({
|
||||
@@ -148,4 +148,4 @@ export async function getIssue(
|
||||
);
|
||||
|
||||
return GitHubIssueSchema.parse(response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { z } from "zod";
|
||||
import { githubRequest } from "../common/utils";
|
||||
import { githubRequest } from "../common/utils.js";
|
||||
import {
|
||||
GitHubIssueAssigneeSchema,
|
||||
GitHubRepositorySchema
|
||||
} from "../common/types";
|
||||
} from "../common/types.js";
|
||||
|
||||
// Schema definitions
|
||||
export const GitHubPullRequestHeadSchema = z.object({
|
||||
@@ -115,4 +115,4 @@ export async function listPullRequests(
|
||||
|
||||
const response = await githubRequest(url.toString());
|
||||
return z.array(GitHubPullRequestSchema).parse(response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { githubRequest } from "../common/utils";
|
||||
import { GitHubRepositorySchema, GitHubSearchResponseSchema } from "../common/types";
|
||||
import { githubRequest } from "../common/utils.js";
|
||||
import { GitHubRepositorySchema, GitHubSearchResponseSchema } from "../common/types.js";
|
||||
|
||||
// Schema definitions
|
||||
export const CreateRepositoryOptionsSchema = z.object({
|
||||
@@ -62,4 +62,4 @@ export async function forkRepository(
|
||||
parent: GitHubRepositorySchema,
|
||||
source: GitHubRepositorySchema,
|
||||
}).parse(response);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { githubRequest, buildUrl } from "../common/utils";
|
||||
import { githubRequest, buildUrl } from "../common/utils.js";
|
||||
|
||||
// Schema definitions
|
||||
export const SearchCodeSchema = z.object({
|
||||
@@ -101,4 +101,4 @@ export async function searchUsers(params: SearchUsersParams): Promise<SearchUser
|
||||
const url = buildUrl("https://api.github.com/search/users", params);
|
||||
const response = await githubRequest(url);
|
||||
return SearchUsersResponseSchema.parse(response);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user