UNPKG

@cyphbt/gitlab-mcp-server

Version:

GitLab MCP Server with tag and merge request functionality - supports both Token and SSH modes

61 lines 1.6 kB
export interface GitInfo { remoteUrl: string; currentBranch: string; projectPath: string; isGitRepo: boolean; } export interface GitLabInfo { gitlabUrl: string; projectPath: string; currentBranch: string; } export declare class GitDetector { /** * 查找 Git 仓库的根目录 */ static findGitRoot(startPath?: string): string | null; /** * 自动切换到 Git 根目录 */ static changeToGitRoot(): string | null; /** * 检测当前目录的 Git 信息 */ static detectGitInfo(projectPath?: string): GitInfo; /** * 从 Git 远程 URL 解析 GitLab 信息 */ static parseGitLabInfo(gitInfo: GitInfo): GitLabInfo | null; /** * 获取项目 ID(需要调用 GitLab API) */ static getProjectId(gitlabUrl: string, projectPath: string, token: string): Promise<string | null>; /** * 检测 GitLab 配置 */ static detectGitLabConfig(token: string, projectPath?: string): Promise<{ gitlabUrl: string; projectId: string; currentBranch: string; } | null>; /** * 获取 Git 配置信息 */ static getGitConfig(projectPath?: string): { user: { name: string; email: string; }; }; /** * 获取最近的提交信息 */ static getRecentCommits(projectPath?: string, limit?: number): Array<{ hash: string; shortHash: string; message: string; author: string; date: string; }>; } //# sourceMappingURL=git-detector.d.ts.map