Skip to content

Commit

Permalink
Add support for PAT in Bitbucket Server. Fixes renovatebot#14900
Browse files Browse the repository at this point in the history
  • Loading branch information
aulisius committed Mar 16, 2023
1 parent c31eb5f commit 1cfdf1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/modules/platform/bitbucket-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,14 @@ export function initPlatform({
endpoint,
username,
password,
token,
}: PlatformParams): Promise<PlatformResult> {
if (!endpoint) {
throw new Error('Init: You must configure a Bitbucket Server endpoint');
}
if (!(username && password)) {
if (!(username && password) && !token) {
throw new Error(
'Init: You must configure a Bitbucket Server username/password'
'Init: You must configure either a Bitbucket Server token or username and password'
);
}
// TODO: Add a connection check that endpoint/username/password combination are valid (#9595)
Expand Down

0 comments on commit 1cfdf1a

Please sign in to comment.