Skip to content

Commit d1a64fc

Browse files
committed
Update BitBucket repo properties labels
Reflect end of support for account passwords for API authentication: change the labels for bit_basic_login and bit_basic_pwd to reference Username ant App Password instead of login/password for basic auth. Also adapt bit_usernname and bit_reponame to avoid confusion. Define a new label string and a constant to display a link to generate an App Password. Fixes #399
1 parent 8b0ebae commit d1a64fc

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

SourceBitBucket/SourceBitBucket.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class SourceBitBucketPlugin extends MantisSourceGitBasePlugin {
2222
*/
2323
const URL_MAIN = "https://bitbucket.org/";
2424
const URL_API = self::URL_MAIN . 'api/2.0/';
25+
const URL_APP_PWD = self::URL_MAIN . 'account/settings/app-passwords/';
2526

2627
public $type = 'bb';
2728

@@ -148,7 +149,14 @@ public function update_repo_form( $p_repo ) {
148149
<tr>
149150
<th class="category">
150151
<label for="bit_basic_pwd">
151-
<?php echo plugin_lang_get( 'bit_basic_pwd' ) ?>
152+
<?php
153+
echo plugin_lang_get( 'bit_basic_pwd' );
154+
echo '<br>';
155+
/** @noinspection HtmlUnknownTarget */
156+
printf( '<span class="small">' . plugin_lang_get( 'generate_app_pwd' ) . '</span>',
157+
sprintf( '<a href="%1$s" target="_blank">%1$s</a>', self::URL_APP_PWD )
158+
);
159+
?>
152160
</label>
153161
</th>
154162
<td>

SourceBitBucket/lang/strings_english.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ $s_plugin_SourceBitBucket_bitbucket = 'BitBucket';
55
$s_plugin_SourceBitBucket_title = 'Source BitBucket Integration';
66
$s_plugin_SourceBitBucket_description = 'Adds BitBucket integration to the Source Integration framework.';
77

8-
$s_plugin_SourceBitBucket_bit_basic_login = 'BitBucket login (for basic auth)';
9-
$s_plugin_SourceBitBucket_bit_basic_pwd = 'BitBucket password (for basic auth)';
10-
$s_plugin_SourceBitBucket_bit_username = 'BitBucket Username/Teamname';
11-
$s_plugin_SourceBitBucket_bit_reponame = 'BitBucket Repository Name<br/><span class="small">(no spaces; must match the name as received from the webservice\'s payload)</span>';
12-
$s_plugin_SourceBitBucket_master_branch = 'Primary Branches<br/><span class="small">(comma-separated list, * imports all branches)</span>';
8+
$s_plugin_SourceBitBucket_bit_basic_login = 'BitBucket Username (for REST API access)<br><span class="small">This is the Id, NOT the e-mail address</span>';
9+
$s_plugin_SourceBitBucket_bit_basic_pwd = 'BitBucket App Password';
10+
$s_plugin_SourceBitBucket_generate_app_pwd = 'Generate one at %1$s';
11+
$s_plugin_SourceBitBucket_bit_username = 'BitBucket Repository Owner<br><span class="small">Username or Team name</span>';
12+
$s_plugin_SourceBitBucket_bit_reponame = 'BitBucket Repository Name<br><span class="small">(no spaces; must match the name as received from the webservice\'s payload)</span>';
13+
$s_plugin_SourceBitBucket_master_branch = 'Primary Branches<br><span class="small">(comma-separated list, * imports all branches)</span>';
1314

1415
$s_plugin_SourceBitBucket_repo_authorized = '<p>MantisBT is now authorized to access this BitBucket repository.</p>';
1516
$s_plugin_SourceBitBucket_repo_authorization_failed = 'Sorry, MantisBT could not be authorized to access this BitBucket repository.';

0 commit comments

Comments
 (0)