Pull Requests in Bitbucket Cloud are not creating new branches in Bamboo

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Pull Requests in Bitbucket Cloud are not creating new branches in Bamboo.

Environment

  • Bamboo integrated with Bitbucket Cloud through Linked Repositories, with authentication occurring through an App Password.

  • In Bamboo, the Build Plan is configured to create new branches "When pull request is created"

Diagnosis

The logs in Bamboo indicate that the access is forbidden

1 2021-12-09 20:29:54,119 WARN [14-PullRequestDetectionBackgroundThread:pool-21-thread-3] [PullRequestDetector] com.sun.jersey.api.client.UniformInterfaceException: GET https://api.bitbucket.org/2.0/repositories/PROJECT/REPOSITORY/pullrequests?state=OPEN returned a response status of 403 Forbidden

Cause

The App Password is used to authenticate against Bitbucket Cloud doesn't have the "Pull Request read" permission set. Because of this, Bamboo is unable to read the pull request information and, therefore, can't create branches when pull requests are performed.

Solution

Since Bitbucket Cloud App Passwords can't have their permissions edited, you'll need to create a new one, grant the required permissions, and then update the Linked Repository information in Bamboo to use the newly created password. Please see App passwords for instructions on how to do that.

(Auto-migrated image: description temporarily unavailable)

Updated on March 12, 2025

Still need help?

The Atlassian Community is here for you.