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
37 lines
715 B
JavaScript
37 lines
715 B
JavaScript
module.exports = {
|
|
processResult,
|
|
};
|
|
|
|
function processResult(config, result) {
|
|
let res = result;
|
|
const disabledStatuses = [
|
|
'archived',
|
|
'blocked',
|
|
'disabled',
|
|
'forbidden',
|
|
'fork',
|
|
'no-package-files',
|
|
'not-found',
|
|
'renamed',
|
|
'uninitiated',
|
|
];
|
|
const errorStatuses = [
|
|
'config-validation',
|
|
'error',
|
|
'unknown-error',
|
|
'not-found',
|
|
];
|
|
let status;
|
|
// istanbul ignore next
|
|
if (disabledStatuses.includes(res)) {
|
|
status = 'disabled';
|
|
} else if (errorStatuses.includes(res)) {
|
|
status = 'error';
|
|
} else if (config.repoIsOnboarded) {
|
|
status = 'enabled';
|
|
} else {
|
|
status = 'onboarding';
|
|
res = 'done';
|
|
}
|
|
return { res, status };
|
|
}
|