youngmon/atlassian-qna huggingface dataset:
Setting the main branch via REST API
Asked by v-hleb.v:

I'm creating repositories in BitBucket Cloud and I'm looking for a way to configure the main branch. If I use a simple request as in API documentation in response I see *"mainbranch": null* . I tried to add a *mainbranch* parameter to the request body but it's ignored. Actually it looks like any unsupported parameter is ignored.

So the question is how to configure the main branch via API?


Answers:
author: Theodora Boudale
body: Hi [@v-hleb.v](/t5/user/viewprofilepage/user-id/4080990) ,

I'm afraid that it is not possible to configure the main branch of a repo via API.

We have a feature request for supporting the main branch update via API (with the PUT method) for existing repos:

* <https://jira.atlassian.com/browse/BCLOUD-20340>

I went ahead and created an additional one for setting up the main branch on repo creation (with the POST method) as well:

* <https://jira.atlassian.com/browse/BCLOUD-20919>

I would suggest that you add your vote in the feature requests (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature requests.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Bitbucket Scriptrunner Listner
Asked by Hamdy Atakora:

Hello and thank you in advance for the assistance.

I am trying to write a listener for Bitbucket repositories but i am not sure where to start or to go about it.

I am trying to write a listener to on all changes in repositories specifically MergedEvent.

I want to listen for events where a a branch is merged with another matching the condition if the pull request content files with a certain extension.

As a result send an HTTP request with the file name, repository name and other info i can get.


Answers:
author: Robert Giddings [Adaptavist]
body: Hi [@Hamdy Atakora](/t5/user/viewprofilepage/user-id/3017015) ,

If you also have ScriptRunner for Bitbucket available from the marketplace here: <https://marketplace.atlassian.com/apps/1213250/scriptrunner-for-bitbucket> you can write custom Listeners, as you have described.

Here is the relevant documentation for ScriptRunner for Bitbucket: <https://docs.adaptavist.com/sr4bib/latest/features/listeners>

Kind regards,

Robert Giddings,

Product Manager, ScriptRunner for Bitbucket


author: Leo
body: Hi [@Hamdy Atakora](/t5/user/viewprofilepage/user-id/3017015),

There is a event handler comes with scriptrunner and available in Repo Settings

you can try out the logics over there, also you can utilize sample snippets available like changed file PR source branch and target branch, etc.

Hope this helps

BR,

Leo


Tags: bitbucket-development

bitbucket-server

groovy

merge

pull-request

script

script-listener

scriptrunner

server
LFS enabled git clone is too slow for a large repo in the pipeline
Asked by oguzhan:

Hi,

I've a large repo on Bitbucket Cloud, I'm trying to run a Bitbucket Pipeline. Because my repo is too big, and I configured **clone: lfs: enabled** to enable LFS , git clone in the build step consumes too much time. How can I speed up my git clone process?

Thank you.

![Selection_077.png](/t5/image/serverpage/image-id/134983i6C25A55A3B62EB10/image-size/large?v=v2&px=999 "Selection_077.png")


Answers:
author: Theodora Boudale
body: Hi [@oguzhan](/t5/user/viewprofilepage/user-id/4207436) ,

Since you enabled download of LFS files in your bitbucket-pipelines.yml file, I assume that you need those files for your build?

One suggestion I can make would be to adjust the depth of clone to 1 in your bitbucket-pipelines.yml file:

```
clone:
  depth: 1
```

The default depth of the clone is 50 (you can see that depth also in the screenshot you posted). If you set it to 1, only the latest commit will be cloned and this may help speed up the process.

You can check our docs for this option here:

* <https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/>

Could you try this and let me know if it helps with reducing the cloning time?

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines
Not receiving bitbucket invitation emails
Asked by farhat.zaman:

Hi.

My manager try to invite me to a repository. But I couldn't get invitation email. I checked spam, mail box, other and tried to search as well. But no mails arrived from bitbucket.org.

Please help me to solve this problem.

Thank you.

Farhat Zaman.


Answers:
author: Daniel Eads
body: Hi [@farhat.zaman](/t5/user/viewprofilepage/user-id/4310810) , welcome to the Community!

I see that you also opened a support case and were assisted directly by a Bitbucket support engineer. Your mail server returned an error to our mail service initially, and caused further emails (including the invitation) to be suppressed. The support engineer working your support case has already cleared the email delivery pause on our side and you should now be able to receive the invitation email if your manager sends it again.

Cheers,  
Daniel \| Atlassian Community Support

comments: author: farhat.zaman
body: Hi [@Daniel Eads](/t5/user/viewprofilepage/user-id/1527694)   

Thanks for your time and support, and yes you are right. now its working fine.

Cheers

Farhat Zaman


author: Warren D'Costa
body: Hi,

my email/account is *\<Redacted by Atlassian Support\>.* Seems the same problem as others - have not been receiving for past few days. Can you please fix ASAP? How will I be notified when it's done? Thank you...

Kind Regards...Warren

comments: author: Warren D'Costa
body: sorry this was actually a question...


author: Daniel Eads
body: Hi [@Warren D'Costa](/t5/user/viewprofilepage/user-id/4346465) , just replying on this thread as well - I see you were able to open a support case last week and another support engineer was able to resolve the problem for you. I've just edited your email address out of your comment here in order to protect it publicly. Cheers!


Tags: bitbucket-cloud

cloud
Our domain emails do not receive bitbucket notifications
Asked by Sergey:

Hi! After a temporary billing problem in our gsuite mail accounts, bitbucket stopped sending emails to all our mail accounts.

Please remove our emails from the suppression list.


Answers:
author: Luiz Gregorio
body: [@Sergey](/t5/user/viewprofilepage/user-id/4310559) I suggest you open a ticket to Atlassian Support

<https://support.atlassian.com/bitbucket-cloud/>


Tags: bitbucket-cloud

cloud
How do I change my database without using the web panel?
Asked by samtaber:

Hi folks,

My server recently rebooted and now it is claiming that my version of MariaDB is not supported. I have done a backup of that database (as it was too new), and set it up on a MySQL 5.7.x server to use. Since Bitbucket won't let me proceed to the main screen, is there any way of either changing the database info it uses in a config file of sorts, or do I have to reinstall it entirely?

Thanks,

Sam


Answers:
author: Mohamed Adel
body: Hi @

I recommend for you to take a look at bitbucket properties file [configuration-propertie](https://confluence.atlassian.com/bitbucketserver/configuration-properties-776640155.html) it might help in your case


Tags: bitbucket-server

server
How to run git clone command in a pipeline step LFS enabled
Asked by oguzhan:

Hi,

I've a pipeline that is cloning another repository. Pipeline below is running on yyy repository, and it's supposed to clone xxx repository and do some work on it, then upload the results to AWS S3, I have lots of object to be worked on, so git clone step should be LFS enabled. git lfs client is configured on my base image. LFS is also enabled on my xxx repository. My deployment consumes so much time to clone repo with LFS enabled.

- step:  
name: "Pipeline"  
services:  
- docker  
caches:  
- docker  
script:  
- ...  
- ...  
- ...  
- ...  
- git clone git@bitbucket.org:xxx.git

I've tried

**clone:**   
**lfs: true**option to reduce the consumed time but it seems it doesn't work with the setup above.

How can I reduce time consumption for this setup? Is there any workaround here?

Thank you.


Answers:
author: Justin Thomas
body: > I have lots of object to be worked on, so git clone step should be LFS enabled.

[@oguzhan](/t5/user/viewprofilepage/user-id/4207436) Can you explain a bit more about what do mean by objects? Is it the large files tracked by *git lfs?*

Have you tried using *git lfs clone* command to [speed up the clone](https://www.atlassian.com/git/tutorials/git-lfs#speeding-up-clones)?

comments: author: Justin Thomas
body: It [looks like](https://github.blog/2017-09-14-git-lfs-2-3-0-released/#git-clone) the *git lfs clone* has been deprecated and *git clone* has similar performance.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Project Settings -> Hooks option is not visible for any roles
Asked by Krishna S L:

Trying to set a pre-receive hooks to make every commit contain a jira-id. But unfortunately, couldn't see the hooks option inside project settings.

[https://confluence.atlassian.com/bitbucketserver/using-repository-hooks-776639836.html#:\~:text=Pre%2Dreceive%20hooks,-Pre%2Dreceive%20hooks\&text=For%20example%2C%20a%20pre%2Dreceive,valid%20Jira%20application%20issue%20key](https://confluence.atlassian.com/bitbucketserver/using-repository-hooks-776639836.html#:~:text=Pre%2Dreceive%20hooks,-Pre%2Dreceive%20hooks&text=For%20example%2C%20a%20pre%2Dreceive,valid%20Jira%20application%20issue%20key).

The option given here is not shown up. We are using bitbucket cloud and not dataserver. Is this an issue? If so, is there any alternative now?

#hooks, #commit-policies #bitbucket


Answers:
author: Theodora Boudale
body: Hi [@Krishna S L](/t5/user/viewprofilepage/user-id/4310059) and welcome to the community!

Bitbucket Server/Data Center and Bitbucket Cloud have differences and I'm afraid that the hooks option is not available for Bitbucket Cloud.

However, if you'd like to enforce every commit message to contain a JIRA issue key, there is a way to do this in Bitbucket Cloud.

This needs to be set on each repository.

You can open the repository in Bitbucket Cloud website, then go to **Repository settings** \> **Links** \> in there you'll see the option **Require issue keys in commit messages** and you can enable it.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

hook

pre-receive-hook
Error when setting up Bitbucket Deployments
Asked by t1279k:

I followed the instruction and added **deployment: dev** in the pipeline definition

[https://bitbucket.org/blog/introducing-bitbucket-deployments#:\~:text=Environments%20in%20Bitbucket%20are%20configured,via%20the%20Pipelines%20YAML%20file.](https://bitbucket.org/blog/introducing-bitbucket-deployments#:~:text=Environments%20in%20Bitbucket%20are%20configured,via%20the%20Pipelines%20YAML%20file.)

When I run I get the following error. where do set the environment settings

**The environment 'dev' in your bitbucket-pipelines.yml doesn't match any environment defined in your settings. Either update your yml, or your settings, to use the same name.**


Answers:
author: Justin Thomas
body: Hi [@t1279k](/t5/user/viewprofilepage/user-id/4306534)

It looks like the blog is a bit dated. We have added the capability for user-defined deployment environments, you need to now [define your environment](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-monitor-deployments/) before using it in your *bitbucket-pipelines.yml* . Further documentation can be found [here](https://support.atlassian.com/bitbucket-cloud/docs/deployments/).

Thanks,

Justin Thomas

Product Manager, Bitbucket Pipelines


Tags: bitbucket-cloud

cloud
Need to access organization bitbucket repositories information such as commits programmatically
Asked by Garima Adlakha:

Hi Team,

I need to access organization bitbucket repositories information such as commits programmatically. But I am not sure what would be the correct API for accessing an organization repository. Also, what would be the right method to access it using Python. I looked into options such as App Password and Oauth. Since I don't have the right to do Oauth since it is currently disabled in my bitbucket. Can someone please suggest how should I go about it?

Also is the below API right way to access organization's bitbucket repo  
[https://api.bitbucket.org/2.0/repositories/\<organization_name\>?q=repository.name=\<repository_name\>](https://api.bitbucket.org/2.0/repositories/rivian?q=repository.name=%22analysis-battery-pack-capacity%22)

Thank you in advance.


Answers:
author: Theodora Boudale
body: Hi [@Garima Adlakha](/t5/user/viewprofilepage/user-id/4237213) and welcome to the community!

If you want to get a list of all repos owned by a certain workspace, you can use the following API endpoint:

* <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D>

In order to get all commits of a specific repo, you can use this endpoint:

* <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commits>

An example with curl would be:

```
curl -u <Bitbucket_username>:<app-password> https://api.bitbucket.org/2.0/repositories/<workspace-id>/<repo-slug>/commits
```

As you can see in the left hand column of the above link, there are different endpoints for different repository info.

If you cannot use OAuth, you can generate an app password for your Bitbucket account, just make sure that it has appropriate permissions depending on what endpoints you are planning to use it with. You can generate an app password from this page: <https://bitbucket.org/account/settings/app-passwords/>

I'm not sure how you can do this using Python, but I believe that you can search whether there is a Python wrapper for Bitbucket Cloud API developed by a third party.

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Build getting failed in bitbucket pipelines.
Asked by Sandeep.Dash:

Error i am getting is: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project *****: There are test failures.

![Build Failure.png](https://community.atlassian.com/t5/image/serverpage/image-id/134857i2018FD7DEF15B129/image-size/large?v=v2&px=999 "Build Failure.png")


Answers:
author: Davinson Anaya Sierra
body: I?m facing the same issue

comments: author: Davinson Anaya Sierra
body: i found the issue in my case i was using the wrong image, in the file

```
bitbucket-pipelines.yml
```

i change image:maven... to

```
image: markhobson/maven-chrome
```


author: Sandeep.Dash
body: You can create your own image out of a docker file as well and push it to docker repo and then pass it in the yml file. This process worked well for me. Thanks Davinson


Tags: bitbucket-pipelines

bitbucket-cloud

cloud
Migrate own project into Bitbucket
Asked by fr0ster:

I'm migrating my projects (honestly those are forks which i made for backup) from github and receive message

Your account now has more than 30 repositories created today. Don't worry! You can still create more for free, but in order to [prevent Bitbucket misuse](https://www.atlassian.com/legal/acceptable-use-policy), we need to [hear from you](https://support.atlassian.com/bitbucket-cloud/).

What I should do?


Answers:
author: Oliver Drehmann (Antarus)
body: Still after 24h, Bitbucket rejects me to add further repositories. So, the 30 repositories per day seem to be not per day but for total?


author: Theodora Boudale
body: Hi [@fr0ster](/t5/user/viewprofilepage/user-id/1836553) ,

We have a limit on the number of repositories that can be created from the UI ++in a single day++ for free workspaces, to prevent spam in Bitbucket.

It is possible for us to override this limit so you can migrate the rest of your repos.

If you tell me the workspace-id of the workspace where you are migrating these repos, I can do that for you. The workspace-id is in the URL of the workspace, e.g. [https://bitbucket.org/\<my-workspace\>/](https://bitbucket.org/<my-workspace>/)

If you don't want to share the workspace-id here publicly, you can open a ticket with Bitbucket Cloud support team and ask them to override this limit. The support ticket will be visible only to you and Atlassian staff.

You can open a ticket via <https://support.atlassian.com/contact/#/>, in "What can we help you with" select "Technical issues and bugs" and then Bitbucket Cloud as product. If you choose to open a ticket, please make sure to mention in the "Give us more details" field the workspace-id of the workspace where you are migrating your repos.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud
the possibility of agreement to coordinate tasks with the client through confluence
Asked by ??? ???:

Hello!

What plugin can i use to agree all the backlog tasks with client using the confluence?

Perhaps a built-in macro or something else already exists.

Thank you in advance.


Answers:
author: Riley Venable
body: You can use the task report macro in Confluence to display a list of tasks on a page and filter them by various criteria.

comments: author: ??? ???
body: Can i customize fields to highlight the coordinators from the side of client? Look, what i want: i see the list in confluence with jira tasks(in our project this is story that decomposed to sub-tasks(backend/design etc), which client see only in monthly reports). Every field includes issue key, summary and checkbox or button. Everybody client clicks on button, and in jira that initiates filling the approve field.

Is that realised or not?
what does this error mean?
Asked by Chad Bumgarner:

When trying to export a confluence page to a .PDF, I get the following message....

"we couldn't complete your export. Failed to create a location and file for the .PDF format


Answers:
author: Kristin Lyons
body: Are you able to share a screenshot of the message? Have you tried refreshing the page and exporting again or using a different browser? Is the page large or does it have any plugin data on it?


Tags: cloud

confluence-cloud
Searching using Lables
Asked by Alan Thomas Begley:

New User:

Is it possible to search using multiple labels or tags?

or can you only search using one label at a time?


Answers:
author: Juan Carlos Vera
body: Yes, it is possible to search using multiple labels or tags in Confluence. Confluence provides a feature called "Label Search" that allows you to search for content that has multiple labels or tags.

To search for content with multiple labels, follow these steps:

* Navigate to the Confluence search bar and enter the first label you want to search for.
* Click on the "Filter" button that appears next to the search bar.
* In the "Filters" section, click on the "Labels" filter.
* Enter the second label you want to search for in the "Labels" field.
* Click on the "+" button to add another label field.
* Enter any additional labels you want to search for.
* Click the "Apply" button to perform the search.

This will return all the pages or content that have all the labels or tags you entered.

![community_LabelsConfluence.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/246032i58DD9198C65BE7B9/image-size/large?v=v2&px=999 "community_LabelsConfluence.JPG")


Tags: cloud

confluence-cloud
"All Labels" page doesn't show all labels
Asked by Tom Stoeckel:

I sometimes use **https://\<my Confluence base URL\>/labels/listlabels-alphaview.action** to get a list of labels for our instance of Confluence, but the list it shows is never complete.

Where is it getting the list of labels it displays, and why doesn't the "All Labels" page include all the labels in use?


Answers:
author: Kristin Lyons
body: Are you verifying that the labels are being applied to the pages accurately (see this documentation - <https://confluence.atlassian.com/doc/add-remove-and-search-for-labels-136419.html> )

Could it also be that some pages are using labels where the pages are not available to you?

comments: author: Tom Stoeckel
body: Thanks for your response.

As far as I know, labels are being applied as shown in those instructions (I'm also not sure how a label gets applied inaccurately).

I'm a Confluence administrator, so access shouldn't be an issue. I can go to specific pages and see labels that don't appear in the "all labels" list.


author: Kristin Lyons
body: If you search just within one space do all the labels show up or are you getting the same thing when searching through multiple spaces?

    /labels/listlabels-alphaview.action?key=SPACEKEY


author: Tom Stoeckel
body: When I specify a space key, I get a complete list of the labels in that space (the same as I get if I use the Labels List macro in the space). When I tested this on a specific space, I got a list of 30 labels, only two of which appear in the "all labels" list.


Tags: confluence-server

server
What is the best way to review, approve and publish QMS documents?
Asked by Bruce Fratto:

My technical team advised that "Comala Publishing is not available for Confluence server." Is there a work around so I can still review, approve, track records then publish the latest version to others?


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@Bruce Fratto](/t5/user/viewprofilepage/user-id/107497) ,

Comala Publish, as all the other apps, are no longer available for customers for the server instances. My suggestion is to upgrade, if possible, on datacenter version.

Fabio


Tags: confluence-server

server
Display search results in a pop up
Asked by Volker Blum:

Hi everybody, I work on a help page for a Service Center. They are used to type a keyword in a search bar, receive a list of pages as links and klick on them to see, if this page is helpful. If not - the use browser back and start again.

I am looking for a macro/addon or whatever that gives the opportunity to have a preview of the page (or better the entire page) in a pop up window.

This is possible with static pages, but not from a search result list.

Any idea how to solve that?

Thanks a lot in advance

Volker

(best case: this also works on server...but I am happy for any hint)


Answers:
author: Zoriana Bogutska_Adaptavist_
body: Hi [@Volker Blum](/t5/user/viewprofilepage/user-id/5172171)

[Content formatting macros for Confluence](https://marketplace.atlassian.com/apps/247/content-formatting-macros-for-confluence?tab=overview&hosting=cloud&utm_source=Atlassian-Community&utm_medium=referral&utm_campaign=Comment_Display-search-results-in-a-pop-up_20230323) provides pop-up and alert macros.

![Screenshot 2023-03-23 at 21.16.18.png](https://community.atlassian.com/t5/image/serverpage/image-id/247446iDDB096F0243026BA/image-dimensions/366x338?v=v2 "Screenshot 2023-03-23 at 21.16.18.png")![Screenshot 2023-03-23 at 21.16.30.png](https://community.atlassian.com/t5/image/serverpage/image-id/247445i23847164F64C6CFB/image-dimensions/369x139?v=v2 "Screenshot 2023-03-23 at 21.16.30.png")

But I'm not sure if this is what you need.

comments: author: Volker Blum
body: Hello Zoriana,

thanks for your support. Unfortunatly this is not the solution I am looking for.

What I have in mind is this process:

enter keyword in a search bar

receive a list of pages containing the keyword

when clicking the page link the page opens in a pop up on the same page.

In all macros, that I know, the link in a search result list re-directs you to the new page. Thhis is what I would like to avoid.

Maybe you have another idea.

But anyway, your help is highly appreciated.

Have a nice weekend.

Cheers Volker


Tags: cloud

confluence-cloud