@@ -70,7 +70,7 @@ export class BitbucketCloudUrlReader implements UrlReaderService {
|
||||
this.deps = deps;
|
||||
const { host, username, appPassword, token } = integration.config;
|
||||
|
||||
if (username && (!token || !appPassword)) {
|
||||
if (username && !token && !appPassword) {
|
||||
throw new Error(
|
||||
`Bitbucket Cloud integration for '${host}' has configured a username but is missing a required token or appPassword.`,
|
||||
);
|
||||
|
||||
@@ -143,7 +143,9 @@ describe('readBitbucketCloudIntegrationConfig', () => {
|
||||
readBitbucketCloudIntegrationConfig(
|
||||
buildConfig({ ...valid, appPassword: undefined, token: undefined }),
|
||||
),
|
||||
).toThrow(/must configure either a token or appPassword/);
|
||||
).toThrow(
|
||||
/must be configured with as username and either a token or an appPassword/,
|
||||
);
|
||||
});
|
||||
|
||||
it('credentials hidden on the frontend', async () => {
|
||||
|
||||
Reference in New Issue
Block a user