"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.githubRepositoryHostProvider = void 0;
const octokit_github_repository_host_client_1 = require("../repository-host/octokit-github-repository-host-client");
const auth_1 = require("./auth");
const octokit_loader_1 = require("./octokit-loader");
const project_ref_1 = require("./project-ref");
exports.githubRepositoryHostProvider = {
    kind: "github",
    async createClient(configSlice, authProvider) {
        const token = await authProvider.getRepositoryHostToken(configSlice);
        const octokit = await (0, octokit_loader_1.createGitHubOctokit)({ auth: token });
        return new octokit_github_repository_host_client_1.OctokitGitHubRepositoryHostClient(configSlice, octokit);
    },
    ...project_ref_1.githubProjectRefCapabilities,
    buildRemoteUrl: project_ref_1.buildGitHubRemoteUrl,
    auth: auth_1.githubRepositoryHostAuth,
};
