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,
|
processResult,
|
||||||
};
|
};
|
||||||
|
|
||||||
function processResult(config, result) {
|
function processResult(config, res) {
|
||||||
let res = result;
|
|
||||||
const disabledStatuses = [
|
const disabledStatuses = [
|
||||||
'archived',
|
'archived',
|
||||||
'blocked',
|
'blocked',
|
||||||
|
@ -15,23 +14,16 @@ function processResult(config, result) {
|
||||||
'renamed',
|
'renamed',
|
||||||
'uninitiated',
|
'uninitiated',
|
||||||
];
|
];
|
||||||
const errorStatuses = [
|
|
||||||
'config-validation',
|
|
||||||
'error',
|
|
||||||
'unknown-error',
|
|
||||||
'not-found',
|
|
||||||
];
|
|
||||||
let status;
|
let status;
|
||||||
// istanbul ignore next
|
// istanbul ignore next
|
||||||
if (disabledStatuses.includes(res)) {
|
if (disabledStatuses.includes(res)) {
|
||||||
status = 'disabled';
|
status = 'disabled';
|
||||||
} else if (errorStatuses.includes(res)) {
|
|
||||||
status = 'error';
|
|
||||||
} else if (config.repoIsOnboarded) {
|
} else if (config.repoIsOnboarded) {
|
||||||
status = 'enabled';
|
status = 'enabled';
|
||||||
} else {
|
} else if (config.repoIsOnboarded === false) {
|
||||||
status = 'onboarding';
|
status = 'onboarding';
|
||||||
res = 'done';
|
} else {
|
||||||
|
status = 'unknown';
|
||||||
}
|
}
|
||||||
return { res, status };
|
return { res, status };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue