mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
ecdcd9df4f
Rewrite of dependency extraction, particularly for npm. Paves way for easier addition of new package managers. Closes #1882
31 lines
1,013 B
JavaScript
31 lines
1,013 B
JavaScript
const { initRepo } = require('./init');
|
|
const { ensureOnboardingPr } = require('./onboarding/pr');
|
|
const { handleError } = require('./error');
|
|
const { processResult } = require('./result');
|
|
const { processRepo } = require('./process');
|
|
const { finaliseRepo } = require('./finalise');
|
|
|
|
module.exports = {
|
|
renovateRepository,
|
|
};
|
|
|
|
// istanbul ignore next
|
|
async function renovateRepository(repoConfig) {
|
|
let config = { ...repoConfig };
|
|
logger.setMeta({ repository: config.repository });
|
|
logger.info('Renovating repository');
|
|
logger.trace({ config });
|
|
try {
|
|
config = await initRepo(config);
|
|
const { res, branches, branchList, packageFiles } = await processRepo(
|
|
config
|
|
);
|
|
await ensureOnboardingPr(config, packageFiles, branches);
|
|
await finaliseRepo(config, branchList);
|
|
return processResult(config, res);
|
|
} catch (err) /* istanbul ignore next */ {
|
|
return processResult(config, await handleError(config, err));
|
|
} finally {
|
|
logger.info('Finished repository');
|
|
}
|
|
}
|