Adds possible default branch name 'main': Bitbucket

Adds `main` as a possible default branch name to invoke `$this->getLatestTag()` inside of `Puc_v4p11_Vcs_BitBucketApi::chooseReference()`.

Previously, only branches named `master` inherited this special behavior. With more VCS providers opting for an inclusive default branch name, this commit adds `main` as a default branch name configuration.

Related to #422.
This commit is contained in:
Geoff Thibeau 2021-05-18 18:49:36 -05:00 committed by GitHub
parent cd4df885c4
commit 048b78cdd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ if ( !class_exists('Puc_v4p11_Vcs_BitBucketApi', false) ):
$updateSource = $this->getStableTag($configBranch);
//Look for version-like tags.
if ( !$updateSource && ($configBranch === 'master') ) {
if ( !$updateSource && ($configBranch === 'master' || $configBranch === 'main') ) {
$updateSource = $this->getLatestTag();
}
//If all else fails, use the specified branch itself.