/**
 * Git Platform Integration
 *
 * Native integration with GitHub and GitLab:
 * - Repository management
 * - Pull/Merge request operations
 * - Issue tracking
 * - CI/CD status
 */
import { EventEmitter } from 'events';
export interface GitPlatformConfig {
    /** Platform type */
    platform: 'github' | 'gitlab' | 'auto';
    /** API token */
    token?: string;
    /** API base URL (for enterprise/self-hosted) */
    baseUrl?: string;
    /** Default owner/organization */
    defaultOwner?: string;
    /** Default repository */
    defaultRepo?: string;
}
export interface Repository {
    id: string | number;
    name: string;
    fullName: string;
    description: string;
    url: string;
    defaultBranch: string;
    private: boolean;
    language?: string;
    stars: number;
    forks: number;
}
export interface PullRequest {
    id: number;
    number: number;
    title: string;
    description: string;
    state: 'open' | 'closed' | 'merged';
    author: string;
    sourceBranch: string;
    targetBranch: string;
    url: string;
    createdAt: Date;
    updatedAt: Date;
    labels: string[];
    reviewers: string[];
    draft: boolean;
}
export interface Issue {
    id: number;
    number: number;
    title: string;
    description: string;
    state: 'open' | 'closed';
    author: string;
    url: string;
    createdAt: Date;
    updatedAt: Date;
    labels: string[];
    assignees: string[];
    milestone?: string;
}
export interface CIStatus {
    state: 'pending' | 'running' | 'success' | 'failure' | 'cancelled';
    context: string;
    description: string;
    url?: string;
    createdAt: Date;
}
export interface CommitInfo {
    sha: string;
    message: string;
    author: string;
    date: Date;
    url: string;
}
/**
 * Git Platform Integration
 */
export declare class GitPlatformIntegration extends EventEmitter {
    private config;
    private detectedPlatform;
    private repoInfo;
    constructor(config: GitPlatformConfig);
    /**
     * Initialize and detect platform
     */
    init(): Promise<void>;
    /**
     * Detect platform from git remote
     */
    private detectPlatform;
    /**
     * Detect repository info from git remote
     */
    private detectRepoInfo;
    /**
     * Get repository info
     */
    getRepository(): Promise<Repository | null>;
    /**
     * List pull/merge requests
     */
    listPullRequests(state?: 'open' | 'closed' | 'all'): Promise<PullRequest[]>;
    /**
     * Get pull/merge request details
     */
    getPullRequest(number: number): Promise<PullRequest | null>;
    /**
     * Create pull/merge request
     */
    createPullRequest(options: {
        title: string;
        description: string;
        sourceBranch: string;
        targetBranch: string;
        draft?: boolean;
    }): Promise<PullRequest | null>;
    /**
     * List issues
     */
    listIssues(state?: 'open' | 'closed' | 'all'): Promise<Issue[]>;
    /**
     * Create issue
     */
    createIssue(options: {
        title: string;
        description: string;
        labels?: string[];
        assignees?: string[];
    }): Promise<Issue | null>;
    /**
     * Get CI status for a commit
     */
    getCIStatus(sha: string): Promise<CIStatus[]>;
    /**
     * Get recent commits
     */
    getCommits(branch?: string, limit?: number): Promise<CommitInfo[]>;
    /**
     * Add comment to issue or PR
     */
    addComment(number: number, body: string, isPullRequest?: boolean): Promise<boolean>;
    /**
     * Make API request
     */
    private apiRequest;
    /**
     * Parse pull request response
     */
    private parsePullRequest;
    /**
     * Parse issue response
     */
    private parseIssue;
    /**
     * Map CI state
     */
    private mapState;
}
/**
 * Get or create git platform integration
 */
export declare function getGitPlatform(config?: GitPlatformConfig): GitPlatformIntegration;
export default GitPlatformIntegration;
