Skip to content

Commit a092231

Browse files
committed
revert email
1 parent c6e59eb commit a092231

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

lib/modules/platform/bitbucket/index.spec.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('modules/platform/bitbucket/index', () => {
6161
}
6262

6363
describe('initPlatform()', () => {
64-
it('should throw if no token, username/password or email/password', async () => {
64+
it('should throw if no token or username/password', async () => {
6565
expect.assertions(1);
6666
await expect(bitbucket.initPlatform({})).rejects.toThrow();
6767
});
@@ -91,20 +91,6 @@ describe('modules/platform/bitbucket/index', () => {
9191
).toEqual(expectedResult);
9292
});
9393

94-
it('should init with email/password', async () => {
95-
const expectedResult: PlatformResult = {
96-
endpoint: baseUrl,
97-
};
98-
httpMock.scope(baseUrl).get('/2.0/user').reply(200);
99-
expect(
100-
await bitbucket.initPlatform({
101-
endpoint: baseUrl,
102-
email: 'abc@gmail.com',
103-
password: '123',
104-
}),
105-
).toEqual(expectedResult);
106-
});
107-
10894
it('should init with only token', async () => {
10995
const expectedResult: PlatformResult = {
11096
endpoint: baseUrl,

lib/modules/platform/bitbucket/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ let renovateUserUuid: string | null = null;
7373
export async function initPlatform({
7474
endpoint,
7575
username,
76-
email,
7776
password,
7877
token,
7978
}: PlatformParams): Promise<PlatformResult> {
80-
if (!(username && password) && !(email && password) && !token) {
79+
if (!(username && password) && !token) {
8180
throw new Error(
8281
'Init: You must configure either a Bitbucket access token or email and password',
8382
);
@@ -93,9 +92,6 @@ export async function initPlatform({
9392
const options: HttpOptions = { memCache: false };
9493
if (token) {
9594
options.token = token;
96-
} else if (email) {
97-
options.username = email;
98-
options.password = password;
9995
} else {
10096
options.username = username;
10197
options.password = password;

lib/modules/platform/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export interface PlatformParams {
1414
endpoint?: string;
1515
token?: string;
1616
username?: string;
17-
email?: string;
1817
password?: string;
1918
gitAuthor?: string;
2019
}

0 commit comments

Comments
 (0)