Skip to content

Commit

Permalink
fix: Add support for PAT in Bitbucket Server. Closes #14900 (#20974)
Browse files Browse the repository at this point in the history
  • Loading branch information
aulisius authored Mar 16, 2023
1 parent 85834b2 commit d739141
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 d739141

Please sign in to comment.