youngmon/atlassian-qna huggingface dataset:
Is there an order of events delivered by a webhook?
Asked by ?ystein Walle:

Hi!

I have set up webooks for the "repo:push" and "pullrequest:updated" events. (Other "pullrequest" events too, but not relevant to the question I think).

I want to act on the update of a pull request by checking the commit(s) in various ways. Both the "repo:push" and "pullrequest:updated" events are sent off when a pull request is updated, but only the "repo:push" event contains information about the old value of the updated ref. The two events seem to always be delievered in separate payloads.

Is there a way to "tie" these two events together? For example, is one guaranteed to be delivered before the other? Or is there some ID in the payloads that are the same? From what I can see "repo:push" is always delivered first, but I'm not sure if that's reliable.

Thanks!


Answers:
author: Patrik S
body: Hello [@?ystein Walle](/t5/user/viewprofilepage/user-id/3081866) and thank you for reaching out to Community!

The webhooks for different events are indeed sent in different payloads.

I would not rely on the order of the delivery to link the payload of both the events together, as they are separate requests, and Bitbucket will attempt to send each webhook 3 times, it's not always granted that one event will be delivered before the other.

In your case, as you want to link the payload of a repo:push with a pullrequest:updated, I would suggest checking the commit hash in each of the payloads.

In the ***pullrequest:updated*** you will have the head commit of the source branch in the *pullrequest.source.commit.hash* field. This can be compared with the *push.changes.new.target.hash* field of the *repo:push* event, as it will contain the commit that triggered the event.

You could use the commit hashes as described above to link the content of each payload and get the information you are looking for.

For additional details on the webhook payload of each event, the following documentation may also be of help :

* [Event Payloads](https://support.atlassian.com/bitbucket-cloud/docs/event-payloads/)

Thank you, [@?ystein Walle](/t5/user/viewprofilepage/user-id/3081866) !

Patrik S


Tags: bitbucket-cloud

cloud

webhook
Hi, I am trying to push tag from python script using bitbucket set_tag api and unable to sign tags
Asked by Shanthi Sivagnanam:

I have gpg keys setup and have tag.gpgsign=true in global git config.

I am able to push tags from terminal.

But when I try to push from python script using set_tag api, it errors out that the tag is not signed.

Can you please help me with this ? Thanks


Answers:
author: Theodora Boudale
body: Hi Shanthi and welcome to the community!

Does your question concern Bitbucket Cloud (repo url starting with <https://bitbucket.org/>) or Bitbucket Server / Data Center?

I see that your question has the tag 'bitbucket-cloud', but I don't see a Bitbucket Cloud account with your community account's email.

If your question indeed concerns Bitbucket Cloud, signed commits are not supported at the moment, we have a feature request about this in our issue tracker:

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

You also mention set_tag api, are you using the following python library?

* <https://atlassian-python-api.readthedocs.io/index.html>

If so, please keep in mind that this library is not developed or maintained by Atlassian. If you face issues when using this library, it may be best to create a question in the library's issue tracker here:

* <https://github.com/atlassian-api/atlassian-python-api/issues>

You could also use the following API endpoint to create a tag (in Bitbucket Cloud):

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
My repositories are missing!! Need help
Asked by josephsantiago1996:

I haven't logged in for a long time and upon checking I've been missing a lot of repos in my account and I needed it badly. I don't know what to do.


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

Does this issue concern the Bitbucket Cloud account with the same email as the community account you used to make this post?

I can see in our system that this account has access to several workspaces and repos. A few months ago we changed the Bitbucket navigation to a single workspace view, so you may be only checking repos in one workspace. You can see the repos that belong to each workspace you have access to in the following way:

* Log in to <https://bitbucket.org/>
* Select your avatar (top right corner) \> **All workspaces**

This page will show you all the workspaces your account has access to. You can then select a workspace from this list, and then select **Repositories** from the top menu to view this workspace's repos.

Please feel free to let me know if you can find your repos this way and if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Problem to deploy Azure Static Web App
Asked by Blagovest Doshkov:

Hello,  

We are using BitBucket pipelines and we haven't got an issue until now.  
We are using the pipeline to deploy Azure Static Web App.  

The pipeline was working correctly until now. It executes "successfully" but deployment is not conducted.   

Our pipeline looks like this:

```
image: atlassian/default-image:3
image: node:20.10.0

pipelines: 
custom:
Build and deploy:
- step: 
name: Build and Deploy to Dev
caches:
- node
deployment: Dev
script:
- cd App.Destination

- npm install @angular/cli -g
- npm install

#production configuration actually holds the variable names of the Bibucket deployment variables
- ng build --configuration=production
#- uname -mrs

- pipe: microsoft/azure-static-web-apps-deploy:main
variables:
VERBOSE: 'true'
APP_LOCATION: '$BITBUCKET_CLONE_DIR/App.Destination/dist/app'
SKIP_APP_BUILD: "true"
```

We saw that the pipe "microsoft/azure-static-web-apps-deploy:main" is not initiating a deployment any longer. The output of this pipe can be seen in the attached screenshots.  
The last two line of the output of this pipe are the following:  

    Digest: sha256:c5c8b14fb91853c4903ea62c5f25d57b5913e6c09efaa24e2aa1c9324101f748
    Status: Downloaded newer image for http://staticwebapps.azurecr.io/bitbucket-deploy:stable

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/295395i44BF84BB47CCADEB/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/295397iDA4007387FA9C550/image-size/large?v=v2&px=999 "image.png")![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/295398i373FEDEB579C6050/image-size/large?v=v2&px=999 "image.png")

Is there any alternative to configure the BitBucket pipeline to deploy the Azure Static Web App other than the usage of "microsoft/azure-static-web-apps-deploy:main" pipe.  

Thanks in advance.


Answers:
author: Blagovest Doshkov
body: For those who are still trying to find a workaround:

Instead using the mentioned pipe "microsoft/azure-static-web-apps-deploy:main" we are installing the [swa cli](https://azure.github.io/static-web-apps-cli/) and calling the "[deploy](https://azure.github.io/static-web-apps-cli/docs/cli/swa-deploy/)" command.  

This has been tested for Angular app without an API.  

    - npm install -g @azure/static-web-apps-cli- swa --verbose=silly deploy "$BITBUCKET_CLONE_DIR/<app-folder>" --deployment-token=$deployment_token --en


author: Yee Jian Tan
body: Hi Blagovest Doshkov,

I have the same issue and have opened a Github Issue here: [Pipe skipped after \`Downloaded newer image for staticwebapps.azurecr.io/bitbucket-deploy:stable\` ? Issue #1366 ? Azure/static-web-apps (github.com)](https://github.com/Azure/static-web-apps/issues/1366)


Tags: bitbucket-cloud

cloud
Install 8.14.2 Bitbucket Server to Windows
Asked by Johann Sebastian Ramirez:

I was trying to install the last version of Bitbucket that can be installed on our Windows server but I cannot seem to make it work. What I did was download 7.21.18 and I saw windows installer option.

My question is there a BitBucket v8 that has a windows installer as well? I haven't tried downloading all versions. My boss wants to migrate the database to SQL 2022 and it seems the version I installed (upgraded to) only supports up to SQL 2019.

Thanks


Answers:
author: Christian Glockner
body: Hi Johann,

Bitbucket Server version 8 is not supported on Windows anymore, so there is no installer and you'll need to switch to Linux.

Cheers,  
Christian  

Premier Support Engineer  
Atlassian


Tags: bitbucket-server

server
Problem with editing issue with line feed (carriage return)
Asked by matix2008:

When editing a issue, at the end of a line when a line feed (return) occurs, nothing happens. The cursor remains in place. The problem can be solved using the mouse by clicking after returning to the next line. Inserting tables also stopped working.

Does anyone know about this problem?  
My browser Chrome version Version 119.0.6045.200 (Official build), (64 bit)

In browser console I have an errors after every enter-key down:

Uncaught TypeError: (0 , a.isCapsLockOnAndModifyKeyboardEvent) is not a function  
at n.handleKeyDown (41.js:96:1797733)  
at vendor.js:463:93056  
at e.value (vendor.js:463:101410)  
at wn (vendor.js:463:93011)  
at e.handleDOMChange (vendor.js:463:96657)  
at e.value (vendor.js:463:87335)  
at MutationObserver.\<anonymous\> (vendor.js:463:83692)


Answers:
author: Theodora Boudale
body: Hi [@matix2008](/t5/user/viewprofilepage/user-id/5379797), welcome to the community, and thank you for reaching out.

These issues are both bugs recently introduced. We have the following bug reports in our issue tracker:

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

You can add yourself as a watcher (by selecting the **Start watching this issue** link in the bug reports) if you'd like to get notified via email on updates. You can also select the **This affects my team** link to indicate you are affected by these issues. Bug fixing is done as per our policy [here](https://confluence.atlassian.com/support/atlassian-cloud-bug-fix-policy-206865884.html) and updates are posted in the tickets of the public issue tracker.

Our apologies for the inconvenience caused but this.

Kind regards,  
Theodora

comments: author: matix2008
body: Hi, Thanks a lot!


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


Tags: bitbucket-cloud

cloud
changed email address of connected account
Asked by Emrys Roberts:

my work email changed, I changed my email in the atlassian.

my previous account was logged in via my microsoft account

I got this message:  

*Connected account* {#toc-hId--409793612}
-----------------------------------------

*Your account is connected to a Microsoft account. Changing the email address here will disconnect your account from the Microsoft account.*  
*...*  
I'm stuck in a loop now and can't change my account email address as the change of email confirmation link needs me to login to confirm the email link... as i'd previously linked my Microsoft account i didn't have a password to log in with...  

not sure how to continue?


Answers:
author: Theodora Boudale
body: Hi Emrys and welcome to the community!

If I understand correctly, you're having issues logging in to Atlassian to confirm the email change?

Even if you never set a password for your Atlassian account (<https://id.atlassian.com/>), you can request a password reset email via this link:

* <https://id.atlassian.com/login/resetpassword>

We will send you an email to reset the Atlassian account password, and you'll be able to set a password without needing to enter an existing one.

Please feel free to let me know how it goes and if you need anything further.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Reduce Repo size
Asked by subhojit1480:

The size of the repo showing is 3.5 GB.

Could you delete large files from old commit history so size will be decreased?


Answers:
author: Ben
body: G'day!

As per our policies, we are unable to modify customer data in any way - so you will need to resolve this issue by diagnosing the large files and making steps toward removing them or converting them to GIT LFS.

Here's an example command to view your largest files (Linux/Mac):

```
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| awk '/^blob/ {print substr($0,6)}' \
| sort -r --numeric-sort --key=2 \
| numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
```

We then have articles that you can follow to manage large files in your repository:

* <https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/>
* <https://support.atlassian.com/bitbucket-cloud/docs/use-bfg-to-migrate-a-repo-to-git-lfs/>

Please let me know once you have made the necessary changes to your repository and when it is ready for garbage collection, we can execute this for you on the server end to finalise the size reduction.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
conditional TASK_DEFINITION variable in pipe
Asked by rushabh:

I want to create new task definition only when some environment variable in the files is updated. Pipe has variable TASK_DEFINITION which i am conditionally setting via script. If TASK_DEFINITION is empty i don't want to create new revision. Just do a force deployment. how can i achieve this?


Answers:
author: Aron Gombas _Midori_
body: Although you can [add conditions to pipeline steps](https://support.atlassian.com/bitbucket-cloud/docs/step-options/#Condition), those aren't very powerful as you can only test for which files were included in the change.

What you could do is, that basically your steps are UNIX commands, and in the shell you can [test for existence of a environment variable](https://stackoverflow.com/questions/39296472/how-to-check-if-an-environment-variable-exists-and-get-its-value) in a dead-simple way.


Tags: bitbucket-cloud

cloud
deploy from artifact to ec2 without s3
Asked by Anuradha Mitra:

this is my yml image:

```
pipelines:
  default:
    - step: 
        name: Build 
        caches: 
          - node 
        script: 
          - npm install 
          - npm run build 
        artifacts: 
          - build/** 
    - step:
        name: Deploy artifacts using SCP to PROD 
        deployment: production 
        script: 
          - pipe: atlassian/scp-deploy:0.3.3 
            variables: 
              USER: $USER 
              SERVER: $SERVER 
              REMOTE_PATH: "/home/ubuntu/" 
              LOCAL_PATH: "build/*" 
  branches: 
    master: 
      - step: 
          name: Deploy to Production 
          script: 
            - echo "Deploying to production..."

definitions: 
  steps: 
    - step: &run_tests 
        name: Run Tests 
        script: 
          - echo "Skipping tests" 
  caches: 
    node: # Keep the node cache 
      - node
```


Answers:
author: Theodora Boudale
body: Hi Anuradha and welcome to the community!

Just a heads up, I edited the format of the yml file in your post for readability.

Could you please explain what kind of issue you are facing with this pipeline?

Are you experiencing any errors? If so, could you please post the part of the build log that shows which command is giving an error and the output of this command? Please make sure to sanitize any private/sensitive data before sharing.

If you have any questions, please let us know what it is that you need help with.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Variables in default pull request descriptions?
Asked by Sebastian Penhouet:

In the original announcement of this feature (2019) the question for variables was left unanswered: [Save time with default pull request descriptions (atlassian.com)](https://community.atlassian.com/t5/Bitbucket-discussions/Save-time-with-default-pull-request-descriptions/td-p/971663#M1513)

The docs just mention a single "special variable" **{{commit_messages}}** : [Pull request and merge settings \| Bitbucket Cloud \| Atlassian Support](https://support.atlassian.com/bitbucket-cloud/docs/pull-request-and-merge-settings/#Pullrequestandmergesettings-defaultdescription)

I would need the PR number as variable.

Others might need the source branch, target branch, etc.

Does this already exist and is just not documented?


Answers:
author: Patrik S
body: Hello [@Sebastian Penhouet](/t5/user/viewprofilepage/user-id/3728092) ,

thank you for reaching out to Community!

Currently, the only special variable available to be used in the default description template is the *{{commit_messages}}*as you correctly stated.

I understand the benefit of having additional variables to reference other parameters of the pull request, so I went ahead and created a new feature request with our development team :

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

I encourage you to add your Vote there to help our product managers understand the interest. You can also mark yourself as a watcher to be notified of any future updates on that feature. Feel free to also comment on that feature with your user case, or any other pull request parameter you would like to be accessible through variables. All features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

Thank you, [@Sebastian Penhouet](/t5/user/viewprofilepage/user-id/3728092) !

Patrik S

comments: author: Sebastian Penhouet
body: Hi Patrik,

Sad to hear that this isn't and will never be implemented. We are aware that a "feature request" is Atlassian's "rejected".

But thanks for clarifying what is there and what isn't.

Best regards,  
Sebastian


Tags: bitbucket-cloud

cloud

pull-request
missing repo after check all workspaces
Asked by Remon thabet ibrahim:

from long time ago I created a repo and pushed code and now when try to see it (not found).  
and I followed the steps that check all my workspace


Answers:
author: Patrik S
body: Hello, [@Remon thabet ibrahim](/t5/user/viewprofilepage/user-id/5379215) and welcome to the Community!

The bitbucket account associated with the email you used to post this question has access to only one workspace, and this workspace has no repositories within it.

It might be the case that you created the repository in a different account. In this case, you can try to log in to any other Bitbucket account you own and check if it has access to the repository in question.

One suggestion is to check the Inbox of other emails you own and look for emails coming from Bitbucket. This is an indication that you have a Bitbucket account created in the past with that email, so you can try to login using that email and check if it has access to the repository.

Hope that helps. If you have any questions, let us know!

Thank you, [@Remon thabet ibrahim](/t5/user/viewprofilepage/user-id/5379215) !

Patrik S


Tags: bitbucket-cloud

cloud
Git Repository Deleted/Archived
Asked by Muhammed Irshad:

We have noticed that the repo has been deleted/archived and need to understand who has deleted the same and how can it be retrieved.


Answers:
author: Patrik S
body: Hello [@Muhammed Irshad](/t5/user/viewprofilepage/user-id/5378926) and welcome to the Community!

The repository deletion event is logged in the Audit Log of a workspace. An admin of the workspace can check the Audit Logs by following the below steps :

1. Navigate to htpps://bitbucket.org
2. Click on the cog icon in the top right corner and select **Workspace Settings**
3. In the left side panel click on **Audit Logs** option
4. Look for an event of **repository deletion**

If the repository was indeed deleted, you will see an entry with that information in the Audit Logs.

Also, I see that your workspace has an active Bitbucket Cloud subscription that is entitled for Premium support, so if you want further assistance, I would recommend opening an internal ticket with us using the following portal :

* <https://support.atlassian.com/contact/>

selecting the option *Technical Issues and Bugs* \> *Bitbucket Cloud* \> *provide the workspaceID*

Hope that helps!

Thank you, [@Muhammed Irshad](/t5/user/viewprofilepage/user-id/5378926) !

Patrik S


Tags: bitbucket-cloud

cloud
I can not login
Asked by D?niel R?tai:

Dear Bitbucket,

I can not login to my account. I got the following message:

"

We couldn't log you in {#toc-hId--409819813}
--------------------------------------------

You may run into this issue when you use specific browsers or add-ons that hide the referer header for id.atlassian.com and other Atlassian sites. Check for these and then try logging in again.

"

I have tried several browsers already. I removed all my add-ons and it still does not work. Please help me, it has become really urgent.

Many thanks!

Daniel


Answers:
author: Theodora Boudale
body: Hi D?niel and welcome to the community!

Your Bitbucket Cloud account's status was dormant which is the reason for the error you were seeing.

I went ahead and reactivated it. Could you please try logging in when you have some time, and let me know if it works now?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
How to reset account password if using Microsoft email account?
Asked by HL:

It looks like I cannot reset any account password when my email is a Microsoft email account.

I cannot clone repo to my local computer due to failed password..


Answers:
author: Patrik S
body: Hello [@HL](/t5/user/viewprofilepage/user-id/5378874) and welcome to the Community!

If when you created your account you select the **Continue with Microsoft option**, you'll need to set up a password before you can use your email address and password as a login method.

To create a password for your Atlassian account:

1. Go to [id.atlassian.com/login](https://id.atlassian.com/login).

2. Select **Can't log in?** at the bottom of the page.

3. Enter your email address and select **Send recovery link**.

4. Select the recovery link in the email we send you and set a password for your account.

It's important to note that this password is only used to login in the website.

For authenticating git operation over HTTPs and Bitbucket Cloud API, you should use an [app password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) instead.

If you haven't already, you can [create a new app password](https://support.atlassian.com/bitbucket-cloud/docs/create-an-app-password/). Then, you can use the **app password** along with your **bitbucket username** (found in your [Bitbucket personal settings](https://bitbucket.org/account/settings/)) as the credentials for the authentication.

Hope that helps!

Thank you, [@HL](/t5/user/viewprofilepage/user-id/5378874) !

Patrik S


Tags: bitbucket-cloud

cloud