renovate
Version:
Automated dependency updates. Flexible so you don't need to be.
26 lines • 1.28 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkReconfigureBranch = checkReconfigureBranch;
const global_1 = require("../../../config/global");
const logger_1 = require("../../../logger");
const scm_1 = require("../../../modules/platform/scm");
const reconfigure_cache_1 = require("./reconfigure-cache");
const utils_1 = require("./utils");
const validate_1 = require("./validate");
async function checkReconfigureBranch(config) {
logger_1.logger.debug('checkReconfigureBranch()');
if (global_1.GlobalConfig.get('platform') === 'local') {
logger_1.logger.debug('Not attempting to reconfigure when running with local platform');
return;
}
const reconfigureBranch = (0, utils_1.getReconfigureBranchName)(config.branchPrefix);
const branchExists = await scm_1.scm.branchExists(reconfigureBranch);
// this is something the user initiates, so skip if no branch exists
if (!branchExists) {
logger_1.logger.debug('No reconfigure branch found');
(0, reconfigure_cache_1.deleteReconfigureBranchCache)(); // in order to remove cache when the branch has been deleted
return;
}
await (0, validate_1.validateReconfigureBranch)(config);
}
//# sourceMappingURL=index.js.map