mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 15:36:25 +00:00
28 lines
767 B
JavaScript
28 lines
767 B
JavaScript
async function checkBaseBranch(config) {
|
|
logger.debug('checkBaseBranch()');
|
|
logger.debug(`config.repoIsOnboarded=${config.repoIsOnboarded}`);
|
|
let error = [];
|
|
if (config.baseBranch) {
|
|
// Read content and target PRs here
|
|
if (await platform.branchExists(config.baseBranch)) {
|
|
await platform.setBaseBranch(config.baseBranch);
|
|
} else {
|
|
// Warn and ignore setting (use default branch)
|
|
const message = `The configured baseBranch "${
|
|
config.baseBranch
|
|
}" is not present. Ignoring`;
|
|
error = [
|
|
{
|
|
depName: 'baseBranch',
|
|
message,
|
|
},
|
|
];
|
|
logger.warn(message);
|
|
}
|
|
}
|
|
return { ...config, errors: config.errors.concat(error) };
|
|
}
|
|
|
|
module.exports = {
|
|
checkBaseBranch,
|
|
};
|