"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteOnboardingCache = exports.setOnboardingCache = void 0;
const logger_1 = require("../../../../logger");
const repository_1 = require("../../../../util/cache/repository");
function setOnboardingCache(onboardingBranch, defaultBranchSha, onboardingBranchSha) {
    const cache = (0, repository_1.getCache)();
    const onboardingCache = {
        onboardingBranch,
        defaultBranchSha,
        onboardingBranchSha,
    };
    if (cache.onboardingBranchCache) {
        logger_1.logger.debug('Update Onboarding Cache');
    }
    else {
        logger_1.logger.debug('Create Onboarding Cache');
    }
    cache.onboardingBranchCache = onboardingCache;
}
exports.setOnboardingCache = setOnboardingCache;
function deleteOnboardingCache() {
    const cache = (0, repository_1.getCache)();
    if (cache?.onboardingBranchCache) {
        logger_1.logger.debug('Delete Onboarding Cache');
        delete cache.onboardingBranchCache;
    }
}
exports.deleteOnboardingCache = deleteOnboardingCache;
//# sourceMappingURL=onboarding-branch-cache.js.map