mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
fix: better enabled/disabled/onboarding/unknown status
This commit is contained in:
parent
f37d1fd515
commit
449f72131b
1 changed files with 4 additions and 12 deletions
|
@ -2,8 +2,7 @@ module.exports = {
|
|||
processResult,
|
||||
};
|
||||
|
||||
function processResult(config, result) {
|
||||
let res = result;
|
||||
function processResult(config, res) {
|
||||
const disabledStatuses = [
|
||||
'archived',
|
||||
'blocked',
|
||||
|
@ -15,23 +14,16 @@ function processResult(config, result) {
|
|||
'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 {
|
||||
} else if (config.repoIsOnboarded === false) {
|
||||
status = 'onboarding';
|
||||
res = 'done';
|
||||
} else {
|
||||
status = 'unknown';
|
||||
}
|
||||
return { res, status };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue