UNPKG

@mcp-apps/azure-devops-mcp-server

Version:

A Model Context Protocol (MCP) server for Azure DevOps integration

123 lines (122 loc) 4.33 kB
import { PullRequest, PRChanges, PRSummary } from "../models/pr-models"; export declare class AzureDevOpsService { /** * Retrieve pull requests from a repository within a date range */ getPullRequests(organizationUrl: string, project: string, repositoryName: string, days?: number, includeActive?: boolean): Promise<{ pullRequests: PullRequest[]; summary: PRSummary; }>; /** * Get detailed changes for a specific pull request */ getPRChanges(organizationUrl: string, project: string, repositoryName: string, pullRequestId: number): Promise<PRChanges>; /** * Get code diffs for a pull request with actual diff content */ getPRDiffs(organizationUrl: string, project: string, repositoryName: string, pullRequestId: number, maxFiles?: number): Promise<any[]>; /** * Get basic information for a specific pull request */ getPRBasicInfo(organizationUrl: string, project: string, repositoryName: string, pullRequestId: number): Promise<{ basicInfo: PullRequest; reviewProcess: { totalReviewers: number; reviewers: { name: string; vote: number; hasDeclined: boolean; hasApproved: boolean; hasApprovedWithSuggestions: boolean; isRequired: boolean; }[]; requiredReviewers: number; approvals: number; rejections: number; }; commits: { totalCommits: number; commitShas: (string | undefined)[]; }; linkedWorkItems: { totalWorkItems: number; workItemIds: (string | undefined)[]; }; metadata: { pullRequestUrl: string; repositoryId: string | undefined; lastMergeSourceCommit: string | undefined; lastMergeTargetCommit: string | undefined; }; }>; /** * Analyze test impact and coverage implications of a pull request */ getPRTestImpact(organizationUrl: string, project: string, repositoryName: string, pullRequestId: number, options?: { includeTestFiles?: boolean; analysisDepth?: "basic" | "standard" | "comprehensive"; }): Promise<{ pullRequestId: number; repositoryName: string; basicInfo: PullRequest; testImpactAssessment: { overall: any; analysis: { testFiles: any; codeFiles: any; coverage: any; testStrategy: any; }; }; recommendations: any[]; executionPlan: any; summary: any; options: { includeTestFiles: boolean; analysisDepth: "basic" | "standard" | "comprehensive"; }; analyzedAt: string; }>; /** * Get comprehensive repository context information */ getRepositoryContext(organizationUrl: string, project: string, repositoryName: string, options?: { includeFileStructure?: boolean; includeActivity?: boolean; activityDays?: number; analysisDepth?: "basic" | "standard" | "comprehensive"; }): Promise<any>; private createEmptySummary; private createSummary; private transformPullRequest; private mapPRStatus; private analyzePRChanges; private getChangeTypeString; private isBinaryFile; private getFileDiffContent; private getFileContentAtCommit; private streamToString; private formatAsUnifiedDiff; private countAddedLines; private countDeletedLines; private countModifiedLines; private isCriticalFile; private isConfigurationFile; private isMigrationFile; private isTestFile; private analyzeTestFiles; private analyzeCodeFiles; private analyzeCoverageImpact; private analyzeTestingStrategy; private calculateTestImpact; private generateTestRecommendations; private generateTestExecutionPlan; private generateTestImpactSummary; private extractRepositoryMetadata; private analyzeBranches; private analyzeFileStructure; private analyzeRepositoryActivity; private performComprehensiveAnalysis; private generateRepositoryInsights; private generateRepositorySummary; }