youngmon/atlassian-qna huggingface dataset:
Customer Portal - My request Configuration
Asked by Lan Anh:

Just to clarify this question is **not** for Cloud version.

At the Customer Portal, within the 'Requests' button there are 2 options: 'My requests' and 'All requests'. But regardless of which one I picked, below is the search selections I see.

![2024-04-02_16-43-11.png](https://community.atlassian.com/t5/image/serverpage/image-id/315862i8A1BA87C536B6F19/image-size/large?v=v2&px=999 "2024-04-02_16-43-11.png")

Here, I have to select 'Any status' instead of 'Open requests' in order to see my issue, even for ones that are not closed.

Question 1: is there a way to configured so that the default is 'Any status'?

Question 2: What is considered as 'Open requests' or 'Closed requests'? It seems the only way I can get anything to show up is for 'Any status' option. What do I need to do so requests can show up when I filter the first box?

Thank you.


Answers:
author: Kate Pawlak _Appsvio_
body: Hi [@Lan Anh](/t5/user/viewprofilepage/user-id/4654046)

1. No, there is no option to make changes on this page. You can't define what will be the default.

2. Open / Closed depends on the Resolution value. Open requests are requests which Resolution is Unresolved. Closed Requests has some value in the Resolution field.

comments: author: Lan Anh
body: Thank you so much [@Kate Pawlak _Appsvio_](/t5/user/viewprofilepage/user-id/3795284) for the quick response!

Just to clarify for Closed requests, is that for any value in the Resolution field other than 'Unresolved'?

Also, isn't 'Unresolved' automatically an assigned value for Resolution when the request is created? Perhaps this is something I need to set in my workflow?


Tags: cloud

customer-portal

jira-service-management

jira-service-management-cloud
How do I set up notifications such that users only see changes by other people?
Asked by Peter McGrath:

A JSM team in my organization would like to set up their notifications such that an assignee receives a notification when a ticket is assigned to them -- but only if someone other than themselves is the one making the assignment (i.e., if I assign a ticket to myself, I should not receive a notification). Is there a setting I can use that would allow for that notification rule?


Answers:
author: Laurie Sciutti
body: Hello [@Peter McGrath](/t5/user/viewprofilepage/user-id/5353800) \~ in addition to [@SAzaruddin_mp](/t5/user/viewprofilepage/user-id/5356177)'s answer, users can adjust their personal settings to exclude notifications to issues they make themselves. This is found in the user's individual personal settings (click your user icon in the upper right of the screen and choose **Personal settings**). HTH

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/316075iCB5FF3DCE68E11D8/image-size/large?v=v2&px=999 "Capture.PNG")


author: SAzaruddin_mp
body: Hi [@Peter McGrath](/t5/user/viewprofilepage/user-id/5353800)

In JSM, you can achieve this notification rule configuring a specific notification scheme combined with a condition on the notification event.

Notification scheme configuration:

* Go to Jira Settings \> Issues \> Notification schemes.
* Edit the notification scheme associated with your JSM project
* Find the "Issue Assigned" event and configure it to send notifications to the Assignee.
* Make sure this notification event is set to be triggered only when the assignee is different from the user making the assignment.

Workflow Post Function:

* Edit the workflow associated with your JSM project
* Find the transition(s) where issues are assigned.
* In the post-function, add a condition to check if the assignee is different from the user making the assignment.
* If the condition is met, trigger the "Issue Assigned" event. If not, do not trigger the event.

By configuring the notification scheme to send notifications only when the assignee is different from the user making the assignment and adding a corresponding condition in the workflow transition post-function, you can achieve the desired behavior where assignees receive notifications only when assigned by someone else.

Regards,

Azaruddin

comments: author: Peter McGrath
body: This is helpful. Thanks for replying, and I appreciate the detail.

It doesn't look like I have the option to set a notification to be triggered only when the assignee is different from the user making the assignment. I don't see where I can configure that in the notification scheme.


Tags: cloud

jira-service-management

jira-service-management-cloud
two-step?How to bind a new mobile phone with two-step authentication of bitbucket?
Asked by haojiang_dong:

After setting a new atlassian password, I can't log in to bitbucket, and I must go through two-step authentication.  

But I just replaced my computer and mobile phone with a new one, so I can't do two-step verification. How can I get back my bitbucket account?


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

I checked our logs and I can see that we sent a 2FA recovery verification email to your email address about 7 hours ago.

Can you please confirm if you have received that? Please make sure to also check your Spam folder.

Kind regards,  
Theodora


author: haojiang_dong
body: I sent an email request to recover my account, but I haven't heard back after 24 hours?

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


Tags: bitbucket-cloud

cloud
Git push auth failure
Asked by c ryan:

I can't push to my own repo.

$ git push  
remote: Login failed due to incorrect login credentials or method.  
remote: If you are unsure of which login details or login method to use, visit:  
remote: <https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/>  
fatal: Authentication failed for ...

I have followed the steps to setup keys locally and in BB. ssh-add'd priv key and set in .ssh/config. The setup up the pub key in BB cloud.

From my git bash shell

$ ssh -T git@bitbucket.org  
authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled

This is the last step in the docs, where do I go from here to debug the auth issue? I can't push via cli or sourcetree.


Answers:
author: c ryan
body: Resolved, perhaps this is useful for others...

in .git/config the old origin entry was still there from a year ago, with username and password

\[remote "origin"\]  
url = <https://user:pw@bitbucket.org/blah/myrepo.git>

Once I changed the URL to remove these it works fine.

url = <https://bitbucket.org/blah/myrepo.git>


Tags: bitbucket-cloud

cloud
I want to install npm dependency from a sub-folder of a bitbucket repo
Asked by Preetam DS:

I wonder if it's possible to npm install a subdirectory of a bitbucket repo.

If the npm package is in the project root, it works like this:

```
npm install ssh://bitbucket.org:<bitbucketname>/<bitbucketrepo>
```

My goal is to just install what's in a subdirectory, is that possible and how?


Answers:
author: Mia Paulin
body: See last post


author: Mia Paulin
body: [@Preetam DS](/t5/user/viewprofilepage/user-id/5200940) for a new directory, it would be

cd \~/\<repository\>

mkdir \<directory-namr\>

What you probably want is to make a child branch:

git branch checkout -b \<branch-name\>

Then, you have to merge/put it in the branch(main/master) that you are working in:

merge branch \<branch-name\>

comments: author: Preetam DS
body: i don't think it will work in the Bitbucket pipeline, how to solve this?


Tags: bitbucket-cloud

cloud
How i can give a single branch access of my repository access to any user.
Asked by Ankit Verma:

Problem:   

We have some sensitive information in one of our code branches.   
And for now, we need to give access to one user because we don't want the user to checkout that particular branch in clone or any other pull command.


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

It is not possible to restrict user access to a certain branch or branches only. When you grant a user access to a repo, this user can clone and pull all of the repo's branches, there is no way to prevent that.

You may want to look into submodules if you want to restrict access:

<https://git-scm.com/book/en/v2/Git-Tools-Submodules>

<https://www.atlassian.com/git/tutorials/git-submodule>

Instead of storing the code you don't want to share in a separate branch, you could create a repo instead and make it a submodule of your main repo. You can then grant access to a user to the main repo, but not to the submodule.

<br />

Another option would be to create a fork of your repo, delete the branch(es) you don't want to share from the fork, and then grant this user access to the fork. Please keep in mind that this will work if the branch is not the repo's main one, and if it has not been merged into other branches. If the branch you don't want to share has been merged into other branches, you would need to delete these other branches from the fork as well.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Deploying Jenkins to EKS and Injecting a job in Jenkins
Asked by Muhammad Suleman:

I want to deploy Jenkins on EKS using manifests files and I want to inject a job in jenkins using Bitbucket pipelines.

Can you please help how can i do that

Best Regards

Suleman


Answers:
author: Theodora Boudale
body: Hi Suleman,

If by "inject a job in jenkins using Bitbucket pipelines." you mean triggering a jenkins job from pipelines, you can check the following pipe:

* [https://bitbucket.org/product/features/pipelines/integrations?search=jenkins\&p=atlassian/jenkins-job-trigger](https://bitbucket.org/product/features/pipelines/integrations?search=jenkins&p=atlassian/jenkins-job-trigger)

You can use this pipe in the bitbucket-pipelines.yml file of your repo in order to trigger a job in jenkins during a pipelines build.

I am not sure about deploying to EKS from Jenkins; you may want to check Jenkins and EKS documentation about that and/or reach out to a forum specific to these two products.

Kind regards,  
Theodora


Tags: aws

bitbucket-cloud

bitbucket-pipelines

cloud

kubernetes
NewLiquidCrystal Library
Asked by Mark Moore:

I'm looking for a library to use for an Arduino Uno project. The author of the project has a link (<https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/>) to bitbucket but when I go there I'm told the repsitory not found.

How do I find this library?

Mark


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

I'm afraid you are asking the wrong people here. All we can tell you is that the repository does not exist, or that if it does, then it's secured away from public view and you'll need to log into Bitbucket with an account that has access in order to be able to see it.

We have less access to, and knowledge of, that site than you do!

You will need to contact the project owners, ask them where it has moved to, confirm if it's been deleted, or get them to grant you the access you need.

comments: author: Mark Moore
body: Thank you sir


Tags: bitbucket-cloud

cloud
"Default pull request tasks" YAML file setup?
Asked by Aaron Yarhouse:

![Screen Shot 2023-04-20 at 4.03.51 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/253135i49D2E29DA815A20C/image-size/large?v=v2&px=999 "Screen Shot 2023-04-20 at 4.03.51 PM.png")

How is this `.bitbucket/pull_request_tasks.yml` file supposed to be setup?  

Literally no documentation on it at the [expected support page.](https://support.atlassian.com/bitbucket-cloud/docs/pull-request-and-merge-settings/)  

Is a task a description property? Maybe a title? How about just task?  

```
- title: Documentation

- description: Documentation

- task: Documentation
```

These are what I've tried in the YAML, but none work to show a single task for "Documentation" on a basic PR for develop -\> master.

So what could it be?


Answers:
author: Ben
body: G'day Aaron!

Welcome to the Bitbucket Cloud Community! :)

I must admit, I am also struggling to find relevant documentation for configuring the **pull_request_tasks.yml** externally or internally for that matter.

I am aware that we have instructions for configuring pull request tasks in the UI located at the following link below:  
<https://bitbucket.org/blog/default-pull-request-tasks>

I am also aware that this applies to all pull requests and does not yet support specific source/destination branches - you can **"Watch"** this feature request to receive updates and **"Vote"** for it to improve visibility with respect to our policies for implementing features:

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

I will need to get back to you regarding the YML configuration aspect, I have reached out to our developers for further information.

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: Ben
body: Hi Aaron,

I've just confirmed with our developers that this **pull_request_tasks.yml** was accidentally rolled out and should not have been rolled out to customers, hence why there was no documentation. You should not see this message any further as the feature has been rolled back.

Thank you for spotting this.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud

pull-request

task
How to disable deployment concurrency control?
Asked by Hakan Lindestaf:

We have a pipeline that automatically updates an Azure web site. If we push too fast to this repo then the deployment is paused. Is there a way to turn off the deployment concurrency control? Obviously we don't want multiple deployments to happen in parallel, but it's ok if it happens right after each other, since we pushed multiple commits (that each triggered the pipeline). I just expect it to deploy the last commit at the end.


Answers:
author: Theodora Boudale
body: Hi Hakan,

I'm afraid that it is not possible to disable this at the moment.

We have a feature request for the automatic resuming of paused deployment steps:

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

As per the [latest update](https://jira.atlassian.com/browse/BCLOUD-16304?focusedCommentId=3232761&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-3232761) from one of our product managers, this is something we plan to deliver in the future, but we don't have an ETA yet. You can 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, you can check the script that another customer developed (using our APIs) which checks for paused deployments, and in case the last deployment is paused, it triggers a new build:

* [https://jira.atlassian.com/browse/BCLOUD-16304?focusedCommentId=2589197\&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-2589197](https://jira.atlassian.com/browse/BCLOUD-16304?focusedCommentId=2589197&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-2589197)

You can take a look, and if it would be helpful for you, you can adjust it to your use case.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Dockerfile Copy Optional
Asked by rsalazari:

In my pipeline I am using service docker. I am trying to Copy a file if it exists, but the engine version , Copy needs at least one file to exist otherwise it fails. I have tried with global expressions, resource/\*.txt, resource/\*.tx\[t\] resource/\*.?xt. it doesn't work but in docker desktop it works normal to date. but in my pipeline the same instruction returns this error no error is returned:**no source files were specified**


Answers:
author: Theodora Boudale
body: Hi [@rsalazari](/t5/user/viewprofilepage/user-id/5202090) and welcome to the community.

If the resource/ directory contains only text files (when it's not empty) and you want to copy all of them, you can try the following command instead

```
COPY resource/ /path-to-destination-dir/
```

I have tested this in Pipelines and the command doesn't fail if the resource/ directory is empty.

If the resource/ directory may contain files other than .txt ones that you don't want to copy, I would suggest copying the txt files first in a separate directory before you build the Docker image, so you can then use a COPY command similar to what I have shared.

You mentioned that locally you haven't had any issues. Could you perhaps let me know the output of **docker version** on this machine, and the OS + version of the machine?

Kind regards,  
Theodora

comments: author: rsalazari
body: Thank you very much for the answer in that in my resources folder there are more than one sensitive file and I do not want to copy all of them, only one specific one, of course, as long as the file exists. This is because the idea is to make a dockerfile Generic - my projects contain the same instructions with the differential that some do not have that file and also not copy


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

Thank you for your reply and the additional details about your use case. Does my suggestion work for you or are you still having any issues?

Kind regards,  
Theodora


author: rsalazari
body: It works, but since I have files that should not be copied for security reasons, copying them is not feasible yet. I would think it would be great if the COPY instruction would not fail even if it does not find a resource, it would just throw a waring.


author: Theodora Boudale
body: Hi,

I understand what you are saying; this is the only workaround I can think of at the moment, which would work if the files you want to copy are saved in a separate folder from the ones you don't want to copy.

With Docker Desktop this indeed does not fail. However, I tried installing the latest version of Docker Engine on a Linux machine, and the copy fails as well (with resource/\*.txt and resource/\*) if there are no files in the directory. It doesn't look like the issue is specific to Pipelines and the version of Docker in Pipelines; it looks like this is something that works with Docker Desktop but not with Docker Engine.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

docker
Reduce PR email messages from Bitbucket
Asked by Bryon Root:

Our developers have asked if we could reduce the number of PR Comments

emails sent to the team. I have researched how to exclude the PR comment, and I'm not finding any option.

++Request by the development team:++

The team would like to get fewer email messages from Bitbucket on a Pull Requests (PR).

It would be nice if the PR reviewers only got emails on the following:

* PR Creation

* PR Update

* PR Merge

* PR Approval Statuses

**And not on these:**

* PR Comments

Only the initiator of the PR needs to get emails on the comments.

Help on this request is appreciated


Answers:
author: Theodora Boudale
body: Hi Bryon and welcome to the community.

I'm afraid that it is not possible to control what PR notifications will be sent. When someone watches a PR, an email notification will be sent for all activities related to the PR.

We have a feature request to provide more granular control over what notifications will be sent:

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

The request has been closed as it's not likely to be implemented in the near future. However, I would encourage you to leave your feedback there, as our product managers continue to monitor even closed requests.

Kind regards,  
Theodora

comments: author: Bryon Root
body: Thank you for the update. I look forward to the new feature.

Cheers,

Bryon


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


Tags: bitbucket-cloud

cloud
Webhooks and validate HMAC
Asked by Chamara Samaranayake:

Hello,

I'm trying to execute an AWS Lambda function using the Bitbucket webhooks. I've generated a function url from the Lambda function and configured it as the URL for the webhook. Also setup a secret in the webhook.

I can successfully execute the Lambda function when I do any code pushes to the repository. I am trying to validate the HMAC using the x-hub-signature header. I'm using Python in my Lambda function. Every time when I compare the hash values they are different.

Below is what I'm trying in Python.

def checkSignature(signingSecret, signature, event):  
signatureHash = signature.split('=')\[1\]  
digest = hmac.new(signatureHash.encode('utf-8'), json.dumps(event).encode(), hashlib.sha256).hexdigest()  

return hmac.compare_digest(digest, signatureHash)

Any help on what I am doing wrong would be really appreciated.

Thank you


Answers:
author: frrusi
body: Hello, the following Python code successfully compares HMAC

```
import hashlib
import hmac

from aiohttp.web_request import Request


class CompareError(Exception):
    def __init__(self) -> None:
        super().__init__("HMAC did not match")


def _generate_hmac(body: bytes, key: str, algorithm: hashlib) -> str:
    key = key.encode("utf-8")
    return hmac.new(key, body, algorithm).hexdigest()


async def calculate(request: Request, secret_key: str) -> None:
    body = await request.read()
    client_hmac = _generate_hmac(body, secret_key, hashlib.sha256)

    if not hmac.compare_digest(f"sha256={client_hmac}", request.headers["X-Hub-Signature"]):
        raise CompareError
```

*** ** * ** ***

My Stack:

* Atlassian Bitbucket v7.17.3
* aiohttp 3.8
* Python 3.10.10


author: Brian Dannenmueller
body: Thanks for posting this Chamara. I am having the exact same issue. Wanted to follow up and see if you are still working on this problem. My code is practically identical.   

A few questions:  
1) How are you testing this? Do you copy-paste the body of the request from the admin console and put it in the body field of the Lambda test request?

2) Do you happen to know the version of Bitbucket Server that you are using?

3) Is the event being given to your checkSignature function actually the event body? Or are you trying to recreate the HMAC signature from the entire event, including its headers?

comments: author: Chamara Samaranayake
body: Hi Brian,

Please find my answers below.

1. I tried adding the request body into the test request. Also tried pushing changes to the repository few times so it triggers the Lambda function when the code has changed.

2. It's version 8.9.5

3. I couldn't remember what I was passing there. After multiple tries I started looking for other alternative methods and found below.

<https://aws.amazon.com/blogs/devops/integrating-codepipeline-with-on-premises-bitbucket-server/>

I've proceed with this method and it's working fine for me so far.

Thank you


Tags: bitbucket-server

server