/**
 * Git Provider Abstraction Layer
 *
 * Platform-agnostic interface for Git hosting providers (GitHub, GitLab, Bitbucket, Azure DevOps).
 * Enables SpecWeave to work seamlessly across multiple Git platforms.
 *
 * @module git-provider
 */
/**
 * Base Git Provider (abstract implementation)
 *
 * Provides common functionality that all providers can extend.
 */
export class BaseGitProvider {
    constructor(config) {
        this.config = config;
    }
    /**
     * Generate Git remote URL (common implementation)
     */
    getRemoteUrl(owner, repo, urlType) {
        const host = this.config.customDomain || this.config.host;
        const sshUser = this.getSSHUser();
        if (urlType === 'ssh') {
            return `${sshUser}@${host}:${owner}/${repo}.git`;
        }
        else {
            return `https://${host}/${owner}/${repo}.git`;
        }
    }
    /**
     * Get SSH user for the platform
     * Override for platforms that use different SSH users
     */
    getSSHUser() {
        return 'git';
    }
    /**
     * Get full API URL
     */
    getApiUrl(path) {
        const baseUrl = this.config.apiBaseUrl;
        return `${baseUrl}${path}`;
    }
    /**
     * Create authorization headers
     */
    getAuthHeaders(token) {
        // Default implementation (Bearer token)
        // Override for platform-specific auth (e.g., GitLab uses 'PRIVATE-TOKEN')
        return {
            'Authorization': `Bearer ${token}`,
            'Accept': 'application/json'
        };
    }
}
//# sourceMappingURL=git-provider.js.map