Skip to content

Commit

Permalink
fix: add new disabled commands to result handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Feb 11, 2021
1 parent cb8a94b commit e28e8b4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/workers/repository/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ import {
REPOSITORY_BLOCKED,
REPOSITORY_CANNOT_FORK,
REPOSITORY_CHANGED,
REPOSITORY_CLOSED_ONBOARDING,
REPOSITORY_DISABLED,
REPOSITORY_DISABLED_BY_CONFIG,
REPOSITORY_EMPTY,
REPOSITORY_FORKED,
REPOSITORY_MIRRORED,
REPOSITORY_NOT_FOUND,
REPOSITORY_NO_CONFIG,
REPOSITORY_NO_PACKAGE_FILES,
REPOSITORY_RENAMED,
REPOSITORY_UNINITIATED,
Expand All @@ -46,7 +49,13 @@ export default async function handleError(
delete config.branchList; // eslint-disable-line no-param-reassign
return err.message;
}
if (err.message === REPOSITORY_DISABLED) {
const disabledMessages = [
REPOSITORY_CLOSED_ONBOARDING,
REPOSITORY_DISABLED,
REPOSITORY_DISABLED_BY_CONFIG,
REPOSITORY_NO_CONFIG,
];
if (disabledMessages.includes(err.message)) {
logger.info('Repository is disabled - skipping');
return err.message;
}
Expand Down

0 comments on commit e28e8b4

Please sign in to comment.