Skip to content

Commit

Permalink
fix(bitbucket-server): check for empty repo (#6999)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Aug 17, 2020
1 parent 81328fa commit 4a2a8ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/platform/bitbucket-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RenovateConfig } from '../../config/common';
import {
REPOSITORY_CHANGED,
REPOSITORY_DISABLED,
REPOSITORY_EMPTY,
REPOSITORY_NOT_FOUND,
} from '../../constants/error-messages';
import { PLATFORM_TYPE_BITBUCKET_SERVER } from '../../constants/platforms';
Expand Down Expand Up @@ -213,6 +214,9 @@ export async function initRepo({
if (err.statusCode === 404) {
throw new Error(REPOSITORY_NOT_FOUND);
}
if (err.statusCode === 204) {
throw new Error(REPOSITORY_EMPTY);
}
logger.debug({ err }, 'Unknown Bitbucket initRepo error');
throw err;
}
Expand Down

0 comments on commit 4a2a8ec

Please sign in to comment.