File tree Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Expand file tree Collapse file tree 3 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ describe('modules/platform/bitbucket/index', () => {
61
61
}
62
62
63
63
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 ( ) => {
65
65
expect . assertions ( 1 ) ;
66
66
await expect ( bitbucket . initPlatform ( { } ) ) . rejects . toThrow ( ) ;
67
67
} ) ;
@@ -91,20 +91,6 @@ describe('modules/platform/bitbucket/index', () => {
91
91
) . toEqual ( expectedResult ) ;
92
92
} ) ;
93
93
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
-
108
94
it ( 'should init with only token' , async ( ) => {
109
95
const expectedResult : PlatformResult = {
110
96
endpoint : baseUrl ,
Original file line number Diff line number Diff line change @@ -73,11 +73,10 @@ let renovateUserUuid: string | null = null;
73
73
export async function initPlatform ( {
74
74
endpoint,
75
75
username,
76
- email,
77
76
password,
78
77
token,
79
78
} : PlatformParams ) : Promise < PlatformResult > {
80
- if ( ! ( username && password ) && ! ( email && password ) && ! token ) {
79
+ if ( ! ( username && password ) && ! token ) {
81
80
throw new Error (
82
81
'Init: You must configure either a Bitbucket access token or email and password' ,
83
82
) ;
@@ -93,9 +92,6 @@ export async function initPlatform({
93
92
const options : HttpOptions = { memCache : false } ;
94
93
if ( token ) {
95
94
options . token = token ;
96
- } else if ( email ) {
97
- options . username = email ;
98
- options . password = password ;
99
95
} else {
100
96
options . username = username ;
101
97
options . password = password ;
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ export interface PlatformParams {
14
14
endpoint ?: string ;
15
15
token ?: string ;
16
16
username ?: string ;
17
- email ?: string ;
18
17
password ?: string ;
19
18
gitAuthor ?: string ;
20
19
}
You can’t perform that action at this time.
0 commit comments