Bamboo Environment Variables Return Unexpected Branch Name with Multiple Repositories

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 12.1.2
    • Affects Version/s: 10.2.12
    • Component/s: Branch Status
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      When configuring a Bamboo plan with multiple repositories (e.g., GitHub and Bitbucket), each with different default branches (e.g., main for GitHub (default) and master for Bitbucket), the environment variables ${bamboo_repository_git_branch} and ${bamboo_repository_branch_name} always return master (from Bitbucket), regardless of the default repo set as GitHub.

      Steps to Reproduce

      1. Create a plan with 2 linked repository
        1. Github > branch > main -->default
        2. Bitbucket > branch > master
      2. Configure a task to return environment variables ${bamboo_repository_git_branch}, ${bamboo_repository_branch_name}.

      Expected Results

      Is expected, that they will have value main, because default repository has branch = main

      Actual Results

      Whereas it always return master branch.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available.

       

              Assignee:
              Mateusz Szmal
              Reporter:
              Khushboo Gupta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: