youngmon/atlassian-qna huggingface dataset:
Any suggested plugin to see affected files&modules by a commit/PR
Asked by Mehmet Berber:

Hi,

We have been using Bitbucket for several years.   
We are looking for a plugin that can show us any other affected files/modules with our commit or PR.   

This is needed for Community Criteria certification.   
"**ALC_CMC.5-12 The evaluator shall examine the CM system to determine that it provides an automated means to identify all other configuration items that are affected by the change of a given configuration item."**

Any suggestion is appreciated.   
Thanks in advance.


Answers:
author: Aron Gombas _Midori_
body: I'm not sure if I understand this. What you're writing about has been pretty much always available...

1. When looking at a commit in the Bitbucket Server web UI, you can clearly see the changed files.
2. When looking at a pull request in the Bitbucket Server web UI, you can clearly see the changed files.

comments: author: Mehmet Berber
body: We want to see not only the changed files but also other files/modules that could be affected by the committed changes.


author: Aron Gombas _Midori_
body: It sounds like a dependency tracking tool - it is not in the scope of Bitbucket. The actual tool depends on the languages, technologies you use.

As you already use a set of tools for it (I guess) and you already us Bitbucket, then I think you should do a research on the integration of these two.


Tags: bitbucket-server

server
How to block push in BitBucket
Asked by Vsevolod Romanchenko:

We have Bitbucket Cloud. My question is how to block the opportunity to "push" but save "create and merge pull requests"?

Groups has the "Write" permission,


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

If you are an admin of a Bitbucket Cloud repo, you can do the following:

1. Open the repository on Bitbucket cloud website
2. Select **Repository settings** from the left sidebar
3. Select **Branch restrictions** from the left sidebar
4. You can then set up a branch restriction with the following options:  

   ![Screenshot 2023-03-01 at 15.23.19.png](https://community.atlassian.com/t5/image/serverpage/image-id/243184iB89645795A3E3B5F/image-size/large?v=v2&px=999 "Screenshot 2023-03-01 at 15.23.19.png")

<br />

If you set **Write access** to **Only specific people or groups have write access** and then leave the field below it empty, no one will be able to push to the branch or branches with this restriction.

In the **Select branches** option, you need to specify the branch name or pattern for which the restriction will apply.

You can see more details on branch restrictions here:

* <https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/>

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

Kind regards,  
Theodora

comments: author: Vsevolod Romanchenko
body: I have already do this. The main problem: what if I will have 150 repos, I need to go into each repo settings ? Maybe, in the future BitBucket Cloud will have some automation rules, like in Jira Cloud...


author: Theodora Boudale
body: Hi [@Vsevolod Romanchenko](/t5/user/viewprofilepage/user-id/5035244),

Our development team has been working on a feature that will allow admins to set branch permissions on a project (and then these will apply to all repos of a certain project). When this is implemented, we are going to update the public feature request we have in our issue tracker:

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

You can also add yourself as a watcher to that feature request (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

In the meantime, until this feature is implemented, another option would be to write a script that uses our APIs in order to set the branch restrictions.

The following API endpoint gets all repos in a workspace:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-get>

This API endpoint creates a branch restriction for a repository:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-branch-restrictions/#api-repositories-workspace-repo-slug-branch-restrictions-post>

Kind regards,  
Theodora


author: Mehmet Berber
body: Yolu can arrange that by Branch Permissions. There is an option "changes without PR"


Tags: bitbucket-cloud

cloud
Pricing for Workzone Plugin for Bitbucket Cloud?
Asked by Sascha Ottolski:

Nothing about it on the marketplace nor on the company website, very inconvenient...


Answers:
author: Sean Manwarring _Izymes_
body: Hi [@Sascha Ottolski](/t5/user/viewprofilepage/user-id/232987) - Sean here from the Izymes team (Workzone app).

Thank you for bringing this to our attention. Unfortunately, Atlassian does not offer **Paid via Atlassian** for Bitbucket Cloud apps, so instead, we offer what is called **Paid via Vendor**. With this, however, comes some complexity for us vendors, such as clearly displaying the price.

([you can visit/vote for the Paid via Atlassian ticket we raised two years ago here](https://jira.atlassian.com/browse/BCLOUD-21373))

To help display the pricing to potential customers such as yourself, I have just added the pricing for Workzone Cloud to the [description section of the marketplace listing.](https://marketplace.atlassian.com/apps/1211303/workzone-pullrequest-workflow?tab=overview&hosting=cloud#:~:text=Free%20for%20teams%20up%20to%205%20users%20and%20%240.50%20per%20user%20for%20larger%20teams.) I will soon work with the team to add pricing to the website.

**To answer your question,** Workzone is free for teams of up to 5 users and $0.50 per user for larger teams.

Hopefully, this solves the inconvenience?

Please don't hesitate to reach out via our [support desk here](https://izymes.atlassian.net/servicedesk/customer/portal/1) if there is anything else we can do to help


author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

I do not understand your post. A search in marketplace finds the app, and the links given in the support tab lead to the vendor's website which talks about the app quite a lot.

Could you explain what you are missing here? What is the actual problem you have with accessing marketplace and Izyme's site?

comments: author: Ulrich Kuhnhardt _IzymesCo_
body: Thanks Nic!

I think the problem is that PvV apps don't show their pricing on their MP listing. Bitbucket cloud apps are **forced** to use PvV - see [BCLOUD-21373](https://jira.atlassian.com/browse/BCLOUD-21373)

The MP UX for PvV apps leaves visitors in the dark about app pricing. They have to install the app to see the app subscription page!!!

Cheers, Ulrich

// Izymes.


author: Sascha Ottolski
body: That's correct, and I believe that my question was simple and clear. Not sure why, but Izymes choose not to disclose there pricing on their own website either. But thankfully they quickly responded and updated the marketplace listing.


Tags: addon-com.izymes.workzone

bitbucket-cloud

cloud
Check that user name in a commit matches the authentication credentials
Asked by Damian Viz?r:

Hi all,

when experimenting with our own instance of Bitbucket, we determined that it is possible to

* clone a repository
* configure the local clone with an arbitrary user name and email
* create commits
* push to Bitbucket server using SSH, such that the author of the commits does not match the user authenticating over SSH.

This could allow a developer to submit commits on behalf of another user without the consent of the latter (we tested this).

Is there any way to check upon a push that all commits being pushed are (co-)authored by the user authenticating to the server?

Thanks in advance!

Damian


Answers:
author: Damian Viz?r
body: We investigated this further and found out that Azure Dev Ops,for example, does log the user credentials used to push commits (see attached).

Is this information logged in Bitbucket as well?  
![Azurecommit.png](https://community.atlassian.com/t5/image/serverpage/image-id/243463iF2395FDE5769ACB9/image-size/large?v=v2&px=999 "Azurecommit.png")


Tags: bitbucket-server

server
Is it possible to get all comments made on a file in a commit via Bitbucket Cloud Rest API 2.0
Asked by Bala:

The bitbucket cloud UI allows me to add a comment at any place in a file in a commit.

Hence most likely it is possible to get list of comments made in a file (in a commit) .  
I tried to check the documentation , but couldn't .  

Can you please point me to the api/link documentation ?  

PS: should i use snippets for this ? but i don't know how to link between commit \& snippet  

Thanks  
Bala


Answers:
author: Bala
body: Just found this link - which answers above!  

<https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commit-commit-comments-get>


Tags: bitbucket-cloud

cloud
Is it possible to mirror a Bit bucket repository to GITLAB??
Asked by Srikanth Vemuluri:

Hello All,  

We need to mirror one Bit bucket repository to GitLab. Is it possible to do this??  
If so please let us know the process to do it in Bit bucket cloud version.


Answers:
author: Theodora Boudale
body: Hi [@Srikanth Vemuluri](/t5/user/viewprofilepage/user-id/4636631),

<br />

If you have a Premium subscription with GitLab, I see in their documentation that they offer a pull mirroring functionality from repositories that aren't hosted in GitLab:

* <https://docs.gitlab.com/ee/user/project/repository/mirror/pull.html>

<br />

If you don't have a Premium GitLab subscription, there are other ways to set this up:

If you make a clone of the Bitbucket Cloud repo on your machine with the --mirror option, you have a copy of the repo with all branches:

```
git clone --mirror <bitbucket_repo_url>
```

You can then navigate to the directory of the mirror clone and push to an empty GitLab repo:
> git push --mirror \<gitlab_repo_url\>

In order to update the mirrored repository in GitLab, you can run the following commands in the directory of the mirror clone

```
git fetch -p origin
git push --mirror <gitlab_repo_url>
```

You could write a script that performs these operations (fetch and push) and schedule it to run periodically.

<br />

Another option is to use [Bitbucket Pipelines](https://support.atlassian.com/bitbucket-cloud/docs/build-test-and-deploy-with-pipelines/) to automate this process and run a pipelines build every time there is a push to the repo. You could use a bitbucket-pipelines.yml file similar to that one:

```
image: atlassian/default-image:4

pipelines:
  default:
    - step:
        clone:
          enabled: false
        name: 'Mirror repository'
        script:
          - git clone --mirror ${BITBUCKET_GIT_SSH_ORIGIN}
          - cd ${BITBUCKET_REPO_SLUG}.git
          - git push --mirror <gitlab_repo_url>
```

Such a pipeline will run on every push to the repo, but you can also use a custom pipeline and [schedule](https://confluence.atlassian.com/bitbucket/scheduled-builds-for-pipelines-933078702.html) it to run at certain times/days.

You will need to set up authentication details to push to the GitLab repo. If you want to use SSH keys, you can set up SSH keys in Pipelines, and upload the public key to a GitLab account that has write access to that GitLab repo:

* <https://support.atlassian.com/bitbucket-cloud/docs/using-ssh-keys-in-bitbucket-pipelines/>

You could also check what other authentication methods GitLab provides, e.g. tokens, and use HTTPS Basic Authentication with a token, instead of SSH.

If you have any questions, please feel free to reach out.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

git

github

repository
I want to create ecr repository while using aws-ecr-push-image with OIDC
Asked by ???(FMS????):

I use aws-ecr-push-image in atlassian/bitbucket pipelines pipe  
I want to automate ecr deploy  
but I must create a repository manually or Add manual create repository pipeline code to all repo (It's not wise)  
I want option that create if ecr repository does not exist with OIDC  
Please add this option for me to escape from manual work.


Answers:
author: Patrik S
body: Hello [@???(FMS????)](/t5/user/viewprofilepage/user-id/5157944) ,

Welcome to Atlassian Community!

The **[atlassian/aws-ecr-push-image](https://bitbucket.org/atlassian/aws-ecr-push-image/src/master/)**indeed currently requires the ECR repository to be already created on the AWS side. I went ahead and create a feature request to add the support for this pipe to automatically create the ECR repository in case it does not exist. You can access the feature request using the following link :

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

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

Thank you, [@???(FMS????)](/t5/user/viewprofilepage/user-id/5157944) !

Patrik S


Tags: aws

bitbucket-cloud

bitbucket-pipelines

cloud
bitbucket showing diff after merge
Asked by spratap2312:

Hi ,

I have merged a feature branch in master and I can see that files which were changing are exactly same in master and feature branch post merge.

but when I compare both the branches i still see the same diffs. this is causing issue in merge of subsequent branches which are based on this feature branch , they are showing the past changes even though they are merged.

I suspected that one revert I did after pulling master might have caused it , but i created dummy branches and did similar test and didnt see the issue.

Any idea what could be causing this ?


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

Could you please first confirm if your question concerns a Bitbucket Cloud or a Bitbucket Server repo? If you are unsure, the URL of a Bitbucket Cloud repo starts with <https://bitbucket.org/>, while a Bitbucket Server repo has a different custom URL. The two products have different source codebases so it's important to know which one your repo is hosted on.

I see that your question has the tag 'bitbucket-cloud', but your Bitbucket Cloud account has access to a repo that hasn't been worked on for years. Do you have a second Bitbucket Cloud account with a different email?

Kind regards,  
Theodora

comments: author: spratap2312
body: I am using my company bibucket which is not an org url so I can assume its a bitbucket server repo where product is installed in our env


Tags: bitbucket-server

server
How to prevent secrets from being exported as an artifact?
Asked by Tim Chaffin:

We've found an issue with Bitbucket cloud, where any user with write permissions has the ability to export the runtime secrets, including workspace / repository / deployment secrets, to an artifact. Like so:

1. A user with write access creates a new branch from the main branch.

2. That user then modifies the bitbucket-pipelines.yml file, and adds a step similar to this:

```
...
steps:
  - printenv | tee output.txt
...

artifacts:
  paths:
    output.txt
```

3. Then that user can push the changes, and within that branch execute the step, and download the artifact, revealing all of the secrets.

How do you prevent this kind of leakage?


Answers:
author: Theodora Boudale
body: Hi Tim,

We mention this in our documentation here:

* <https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/>

> Workspace variables can be accessed by all users with write permission for any repository (private or public) that belongs to the team or account.

> Pipelines variables added at the repository level can be used by any user who has write access in the repository.

There is no way to prevent this for workspace and repository variables. However, it is possible to restrict access to deployment variables to admins only:

* Open the page of a repo on Bitbucket Cloud website and go to **Repository settings \> Deployments**
* For every deployment environment, there is an option **Only allow admins to deploy to this environment**.

If your workspace is on the Premium plan, you can enable this option for certain or all deployment environments. If someone who is not an admin triggers a pipeline to an environment that has this feature enabled, the build will get paused.

An admin of the repo can resume a paused build or do nothing. Selecting the cog icon from the following screenshot in the paused build, will show you the yml file for the commit/branch that triggered the pipeline:

![Screenshot 2023-03-01 at 11.30.23.png](https://community.atlassian.com/t5/image/serverpage/image-id/243098i6FBD59C8123D4F06/image-size/large?v=v2&px=999 "Screenshot 2023-03-01 at 11.30.23.png")

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Error sending invitation email
Asked by Ivan:

Hi,

In bitbucket, members -\> Invite people

Return message, when clicking on the "invite" button:
> One or more invitations could not be sent.

It only happens with that user. In the past this user had a bitbucket account, however, using another email account.

Impression that there is some specific restriction or blocking for the e-mail account.

Grateful


Answers:
author: Patrik S
body: Hello [@Ivan](/t5/user/viewprofilepage/user-id/1927478) ,

Thank you for reaching out to Atlassian Community!

In order to better understand the issue and for you to share the user's e-mail address, I will create an internal support ticket using the same e-mail you used to post this question. You should receive an e-mail with the link to the support ticket soon. In case you don't receive it, please let me know so I can share it with you here.

Thank you, [@Ivan](/t5/user/viewprofilepage/user-id/1927478) !

Patrik S


Tags: bitbucket-cloud

cloud
Is there a way to automate creating an issue across multiple bitbucket repos?
Asked by mpilayre:

We have 5 repositories for our frameworks we need to maintain and I'm wondering how to create an issue across all five without having to manually create an issue ticket for each of those repos every time.  

I was only able to see this link:  
<https://support.atlassian.com/bitbucket-cloud/docs/export-or-import-issue-data/>

Is there another way?  

Thank you!


Answers:
author: Theodora Boudale
body: Hi [@mpilayre](/t5/user/viewprofilepage/user-id/2056109)!

You could write a script that uses our API to create the same issue in all 5 repos. The following API endpoint can be used for creating an issue in a certain repository:

* <https://developer.atlassian.com/cloud/bitbucket/rest/api-group-issue-tracker/#api-repositories-workspace-repo-slug-issues-post>

The link you provided is for importing issue data to a repository and please keep in mind that this operation overwrites all existing issues. Even if you modify the json file of the zip in order to add an extra issue, you would still need to make an import manually to 5 repos.

If you write a script using our API, you can configure it to run the same API call for each of the repos you want.

Kind regards,  
Theodora

comments: author: mpilayre
body: Thank you!


author: Theodora Boudale
body: You are very welcome! Please feel free to reach out if you ever need anything else!


Tags: bitbucket-cloud

cloud
Can a repo created by standard admin and allow more than 5 free users access?
Asked by chonrawi.p:

standard plan of 1 admin

free plan of 6 users

I want to create a repo so more than 5 users can access it.

Do I need to change all users to standard plan or change 1 user to standard admin and create a repo and allow more than 5 free users access?

According to the above users, how much do I have to pay for this case?


Answers:
author: Theodora Boudale
body: Hi [@chonrawi.p](/t5/user/viewprofilepage/user-id/4869771),

In Bitbucket Cloud, a billing plan is associated with a workspace, not with a user account.

* A user account is what you use to log in to <https://bitbucket.org/>
* A workspace is a container for repositories. Every repo belongs to a certain workspace, e.g. a workspace with the URL <https://bitbucket.org/my_workspace/my-repo> belongs to the workspace <https://bitbucket.org/my_workspace>
* Every user can create or be invited to become a member of multiple workspaces.

If you want to give access to more than 5 users to a repo of a certain workspace, you only need to upgrade the billing plan of this specific workspace via <https://bitbucket.org/>**my_workspace** /workspace/settings/plans-and-billing , where **my_workspace** replace with the id of the workspace where this repo belongs to. Only an admin of a workspace has access to that page.

For the billing plan of a certain workspace, we count users with access to all of the workspace's **private** repositories (you can grant as many users as you want to have access to the public repositories).

If a workspace's plan is upgraded to the **Standard** one, and there are 6 users with access to this workspace's private repositories, then the price is $18 / month (it's $3 per user/month).

If you have any questions or if anything is unclear, please feel free to reach out!

Kind regards,  
Theodora

comments: author: chonrawi.p
body: Hello [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086)

Thank you for your assistance in this matter.

Best regards,

Chonrawi


Tags: bitbucket-cloud

cloud
LFS Invoice
Asked by Jeremie:

Hello,

We recently bought a Standard plan for LFS on Bitbucket and I'm looking for an invoice or billing receipt to give to our accounting department. So far no luck, I don't have an order # or any kind of purchase number.

Where can I find this information ?

Thank you


Answers:
author: Patrik S
body: Hey [@Jeremie](/t5/user/viewprofilepage/user-id/5157273) ,

You can check for all the licenses where you are a billing or technical contact by going to <https://my.atlassian.com>.

It's important to note that you will only be able to see the licenses and access orders, invoices and quotes if you are a billing or technical contact. If you want to be added as a billing/technical contact, any *existing* billing or technical contacts can log into [my.atlassian.com](http://my.atlassian.com/), select the product or subscription in question, and enter your e-mail address.

Hope that helps! Let me know if you have any other questions.

Thank you, [@Jeremie](/t5/user/viewprofilepage/user-id/5157273) !

Patrik S


author: Jeremie
body: All sorted out,

Thank you for your help


author: Jeremie
body: Hello,

Unfortunately, the LFS for Bitbucket Licence does not show there, I'm assuming it's because I'm not set as a Billing contact, but we can't find a way to change this.

Any other options ?

Thank you.

![Screenshot 2023-02-28 092202.png](https://community.atlassian.com/t5/image/serverpage/image-id/242809i766C6807C964F404/image-size/large?v=v2&px=999 "Screenshot 2023-02-28 092202.png")

comments: author: Nic Brough -Adaptavist-
body: Ok, it's either a non-marketplace app (in which case, you'll need to contact the vendor directly), or you're not a billable person (you'll need to ask who is, and talk to them), or it's part of your Bitbucket licence already (same answer as "you're not the billable person")


author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

Go to my.atlassian.com and click on the "orders" option.

comments: author: Jeremie
body: Hello,

Unfortunately, the LFS for Bitbucket Licence does not show there, I'm assuming it's because I'm not set as a Billing contact, but we can't find a way to change this.

Any other options ?

Thank you.![Screenshot 2023-02-28 092202.png](https://community.atlassian.com/t5/image/serverpage/image-id/242810i56336953F21AED38/image-size/large?v=v2&px=999 "Screenshot 2023-02-28 092202.png")


Tags: bitbucket-cloud

cloud