UNPKG

@monsoft/mcp-github-project-manager

Version:

A Model Context Protocol GitHub Project Manager implementation

253 lines (252 loc) 5.54 kB
/** * GitHub Issue types */ export type CreateIssueParams = { owner: string; repo: string; title: string; body?: string; labels?: string[]; assignees?: string[]; milestone?: number; }; export type UpdateIssueParams = { owner: string; repo: string; issue_number: number; title?: string; body?: string; state?: 'open' | 'closed'; labels?: string[]; assignees?: string[]; milestone?: number | null; }; export type ListIssuesParams = { owner: string; repo: string; state?: 'open' | 'closed' | 'all'; sort?: 'created' | 'updated' | 'comments'; direction?: 'asc' | 'desc'; since?: string; per_page?: number; page?: number; labels?: string[]; assignee?: string; creator?: string; mentioned?: string; milestone?: string; }; export type AddIssueCommentParams = { owner: string; repo: string; issue_number: number; body: string; }; export type GetIssueParams = { owner: string; repo: string; issue_number: number; }; /** * GitHub Milestone types */ export type CreateMilestoneParams = { owner: string; repo: string; title: string; description?: string; due_on?: string; state?: 'open' | 'closed'; }; export type UpdateMilestoneParams = { owner: string; repo: string; milestone_number: number; title?: string; description?: string; due_on?: string; state?: 'open' | 'closed'; }; export type ListMilestonesParams = { owner: string; repo: string; state?: 'open' | 'closed' | 'all'; sort?: 'due_on' | 'completeness'; direction?: 'asc' | 'desc'; per_page?: number; page?: number; }; export type GetMilestoneParams = { owner: string; repo: string; milestone_number: number; }; /** * GitHub Pull Request types */ export type CreatePullRequestParams = { owner: string; repo: string; title: string; body?: string; head: string; base: string; draft?: boolean; maintainer_can_modify?: boolean; }; export type UpdatePullRequestParams = { owner: string; repo: string; pull_number: number; title?: string; body?: string; state?: 'open' | 'closed'; base?: string; maintainer_can_modify?: boolean; }; export type ListPullRequestsParams = { owner: string; repo: string; state?: 'open' | 'closed' | 'all'; head?: string; base?: string; sort?: 'created' | 'updated' | 'popularity' | 'long-running'; direction?: 'asc' | 'desc'; per_page?: number; page?: number; }; export type GetPullRequestParams = { owner: string; repo: string; pull_number: number; }; export type MergePullRequestParams = { owner: string; repo: string; pull_number: number; commit_title?: string; commit_message?: string; merge_method?: 'merge' | 'squash' | 'rebase'; }; export type CreatePullRequestReviewParams = { owner: string; repo: string; pull_number: number; body?: string; event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT'; comments?: Array<{ path: string; position: number; body: string; }>; }; export type ListPullRequestReviewsParams = { owner: string; repo: string; pull_number: number; per_page?: number; page?: number; }; export type CreatePullRequestReviewCommentParams = { owner: string; repo: string; pull_number: number; body: string; commit_id?: string; path?: string; position?: number; in_reply_to?: number; }; export type ListPullRequestReviewCommentsParams = { owner: string; repo: string; pull_number: number; sort?: 'created' | 'updated'; direction?: 'asc' | 'desc'; since?: string; per_page?: number; page?: number; }; export type RequestReviewersParams = { owner: string; repo: string; pull_number: number; reviewers?: string[]; team_reviewers?: string[]; }; export type UpdatePullRequestBranchParams = { owner: string; repo: string; pull_number: number; expected_head_sha?: string; }; /** * GitHub Project v2 types */ export type CreateProjectParams = { owner: string; name: string; body?: string; }; export type AddProjectItemParams = { projectId: string; contentId: string; }; export type UpdateProjectItemParams = { projectId: string; itemId: string; fieldId?: string; columnId?: string; position?: 'top' | 'bottom' | number; }; export type ListProjectsParams = { owner: string; first?: number; }; export type ListProjectItemsParams = { projectId: string; columnId?: string; first?: number; }; export type GraphQLResponse<T> = { data?: T; errors?: Array<{ message: string; locations?: Array<{ line: number; column: number; }>; path?: string[]; extensions?: Record<string, any>; }>; }; export type GitHubApiError = { status: number; message: string; documentation_url?: string; }; export type GetProjectFieldsParams = { projectId: string; }; export type ProjectField = { id: string; name: string; type: string; options?: Array<{ id: string; name: string; }>; }; export type GetProjectColumnsParams = { projectId: string; }; export type ProjectColumn = { id: string; name: string; }; export type AddProjectItemWithColumnParams = { projectId: string; contentId: string; fieldId: string; columnId: string; };