Use username password or token for bitbucket server
The bitbucket server publish action allows setting the token like other platforms, if the integration has a username and password configured though, not the token but the credentials are used In config.ts the docs claim token takes precedence which only holds true if username & password are not set Signed-off-by: Robert Schuh <github@eneticum.de>
This commit is contained in:
@@ -139,8 +139,7 @@ export function getBitbucketServerRequestOptions(
|
||||
|
||||
if (config.token) {
|
||||
headers.Authorization = `Bearer ${config.token}`;
|
||||
}
|
||||
if (config.username && config.password) {
|
||||
} else if (config.username && config.password) {
|
||||
const buffer = Buffer.from(`${config.username}:${config.password}`, 'utf8');
|
||||
headers.Authorization = `Basic ${buffer.toString('base64')}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user