From d1a64fceeb27c2517f026d62904f2e50632a3b20 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Fri, 15 Jul 2022 01:23:43 +0200 Subject: [PATCH] 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 --- SourceBitBucket/SourceBitBucket.php | 10 +++++++++- SourceBitBucket/lang/strings_english.txt | 11 ++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/SourceBitBucket/SourceBitBucket.php b/SourceBitBucket/SourceBitBucket.php index 31434a130..545644bcb 100644 --- a/SourceBitBucket/SourceBitBucket.php +++ b/SourceBitBucket/SourceBitBucket.php @@ -22,6 +22,7 @@ class SourceBitBucketPlugin extends MantisSourceGitBasePlugin { */ const URL_MAIN = "https://bitbucket.org/"; const URL_API = self::URL_MAIN . 'api/2.0/'; + const URL_APP_PWD = self::URL_MAIN . 'account/settings/app-passwords/'; public $type = 'bb'; @@ -148,7 +149,14 @@ public function update_repo_form( $p_repo ) { diff --git a/SourceBitBucket/lang/strings_english.txt b/SourceBitBucket/lang/strings_english.txt index f05c3f247..480859695 100644 --- a/SourceBitBucket/lang/strings_english.txt +++ b/SourceBitBucket/lang/strings_english.txt @@ -5,11 +5,12 @@ $s_plugin_SourceBitBucket_bitbucket = 'BitBucket'; $s_plugin_SourceBitBucket_title = 'Source BitBucket Integration'; $s_plugin_SourceBitBucket_description = 'Adds BitBucket integration to the Source Integration framework.'; -$s_plugin_SourceBitBucket_bit_basic_login = 'BitBucket login (for basic auth)'; -$s_plugin_SourceBitBucket_bit_basic_pwd = 'BitBucket password (for basic auth)'; -$s_plugin_SourceBitBucket_bit_username = 'BitBucket Username/Teamname'; -$s_plugin_SourceBitBucket_bit_reponame = 'BitBucket Repository Name
(no spaces; must match the name as received from the webservice\'s payload)'; -$s_plugin_SourceBitBucket_master_branch = 'Primary Branches
(comma-separated list, * imports all branches)'; +$s_plugin_SourceBitBucket_bit_basic_login = 'BitBucket Username (for REST API access)
This is the Id, NOT the e-mail address'; +$s_plugin_SourceBitBucket_bit_basic_pwd = 'BitBucket App Password'; +$s_plugin_SourceBitBucket_generate_app_pwd = 'Generate one at %1$s'; +$s_plugin_SourceBitBucket_bit_username = 'BitBucket Repository Owner
Username or Team name'; +$s_plugin_SourceBitBucket_bit_reponame = 'BitBucket Repository Name
(no spaces; must match the name as received from the webservice\'s payload)'; +$s_plugin_SourceBitBucket_master_branch = 'Primary Branches
(comma-separated list, * imports all branches)'; $s_plugin_SourceBitBucket_repo_authorized = '

MantisBT is now authorized to access this BitBucket repository.

'; $s_plugin_SourceBitBucket_repo_authorization_failed = 'Sorry, MantisBT could not be authorized to access this BitBucket repository.';