mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-13 07:26:26 +00:00
31 lines
606 B
JavaScript
31 lines
606 B
JavaScript
module.exports = {
|
|
processResult,
|
|
};
|
|
|
|
function processResult(config, res) {
|
|
const disabledStatuses = [
|
|
'archived',
|
|
'blocked',
|
|
'cannot-fork',
|
|
'disabled',
|
|
'forbidden',
|
|
'fork',
|
|
'no-package-files',
|
|
'not-found',
|
|
'renamed',
|
|
'uninitiated',
|
|
'empty',
|
|
];
|
|
let status;
|
|
// istanbul ignore next
|
|
if (disabledStatuses.includes(res)) {
|
|
status = 'disabled';
|
|
} else if (config.repoIsOnboarded) {
|
|
status = 'enabled';
|
|
} else if (config.repoIsOnboarded === false) {
|
|
status = 'onboarding';
|
|
} else {
|
|
status = 'unknown';
|
|
}
|
|
return { res, status };
|
|
}
|