youngmon/atlassian-qna huggingface dataset:
Ability to fetch attachments from Jira issue and send to Freshservice via Rest API
Asked by Ward Schwillens_ Schwillie:

I am working out the Rest API integration with our company's Freshservice cloud. I am able to create a Jira issue from Freshservice in Jira software (Cloud) and send updates in both directions.

The hump I encounter relates to sending over an attachment that is attached to the Jira issue to Freshservice, as Freshservice API needs a file location to fetch the attachment from.

Is there a way in Jira automation to fetch a (the latest) added attachment from the Jira issue, and store it somewhere, E.g. on a Sharepoint folder and then call the Freshservice API that get's it and uploads that attachment in the Freshservice ticket or in a note to the ticket?

Thanks for your suggestions!


Answers:
author: Erin Quick-Laughlin
body: I believe you can pull attachments if the FS user account has permissions, using the rest path in <https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-attachment-content-id-get>

Haven't used it myself, but PostMan seems to return a file.

To get attachment IDs, I would try #1 if automation is initiated in FS, #2 if initiated in Jira

1. first make a call using the rest path in <https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get> which returns JSON that will include an array of attachments and their IDs

-or-

2. send over the ID(s) from JIra when pushing to FS   

I'm not sure about how to get the last attachment. The closest I could find (for the Jira Automation side) was this: <https://community.atlassian.com/t5/Jira-Software-questions/Get-last-added-attachment-to-issue-using-smart-values/qaq-p/1479825#M123079> but it looks like it didn't work for them as expected since .last refers to the place in the list, not the greatest ID.

HTH!

Erin

comments: author: Ward Schwillens_ Schwillie
body: Hi Erin,

Thank you for your response. I am able to fetch the attachment from the Jira issue, with it's ID, the type etc. The problem that I have is that I cannot store it with automation on a filesystem path from where I can fetch it again for the second part of my function, that is is sending the attachment in a note to FreshService. The FreshService API needs a file path to fetch the attachment from.

I did not discover that ability in the Rest API documentation that you shared, or might I have missed that?

Thank you for your help!


author: Erin Quick-Laughlin
body: You didn't miss anything - I missed the requirement that FS needs a filepath.

What about using PowerAutomate to get the attachment via API and push it to Sharepoint or OneDrive?


Tags: attachment

rest-api
Automation: Assign label to a Github Pull Request.
Asked by Nikodem Macuk:

Hello,  
Is there an option to automatically assign a label to the pull request when it is created?  

Example:  

I have a ticket(Jiras' issue) with "Priority: Medium".  
![Screenshot 2023-10-06 at 11.25.49.png](https://community.atlassian.com/t5/image/serverpage/image-id/284895iBEBF2D7A40808D69/image-size/large?v=v2&px=999 "Screenshot 2023-10-06 at 11.25.49.png")  
I start working on the ticket, create a Pull Request (no issue on github, just a Jira ticket + Pull request) that is linked to the issue.  
Is there an automation rule that will assign a label with "priority: medium" to the pull request?  

![Screenshot 2023-10-06 at 11.27.03.png](https://community.atlassian.com/t5/image/serverpage/image-id/284896i8DD49F657BAAD048/image-size/large?v=v2&px=999 "Screenshot 2023-10-06 at 11.27.03.png")  

I did not find any template to do that.


Answers:
author: Bill Sheboy
body: Hi [@Nikodem Macuk](/t5/user/viewprofilepage/user-id/5334465) -- Welcome to the Atlassian Community!

I do not believe there is anything built-in to modify the PR that way from an automation rule.

Instead have you tried calling the Github REST API from the rule, using a send web request action, to add the label?

Kind regards,  
Bill

comments: author: Nikodem Macuk
body: Hey!  
No I did not, I first wanted to make sure that I'm not gonna do something that is maybe already built in. :D  

Thanks for the suggestion. Will definitely take a look!


author: Bill Sheboy
body: And...here is an article on calling a REST API function from a rule to help:

<https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828>


author: Bill Sheboy
body: Hi [@Nikodem Macuk](/t5/user/viewprofilepage/user-id/5334465)

Just following up to check if this answered your question. If so, please consider marking this one as "answered". That will help others with a similar need find solutions faster. If not, please let the community know what help you need with the rule changes.

Thanks!
Automation Script status resulting in throttled.
Asked by Snehal Singh:

How to set the service limit


Answers:
author: Bill Sheboy
body: Hi [@Snehal Singh](/t5/user/viewprofilepage/user-id/5333812) -- Welcome to the Atlassian Community!

Customers do not set the service limits. Instead they are defined by Atlassian. To learn about the limits, please look here: <https://support.atlassian.com/cloud-automation/docs/automation-service-limits/>

And if your rule processing was throttled, that could be caused by exceeding limits or a design problem with the rule.

If you explain the problem your rule is trying to solve, post an image of the complete rule, and post an image of the audit log details showing the rule execution, the community may be able to suggest how to improve the rule design.

Kind regards,  
Bill

comments: author: Bill Sheboy
body: Hi [@Snehal Singh](/t5/user/viewprofilepage/user-id/5333812)

Just following up to check if this answered your question. If so, please consider marking this one as "answered". That will help others with a similar need find solutions faster. If not, please let the community know what help you need with the rule changes.

Thanks!
Can i assign a Guest to a Space via API?
Asked by Juergen Koeck:

I use Confluence Cloud and i want to assign a Space to a Guest, is this possible via REST API and if so, how?


Answers:
author: Sayed Bares [ServiceRocket]
body: [@Juergen Koeck](/t5/user/viewprofilepage/user-id/5127866) you can use [Add user to group](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/#api-rest-api-2-group-user-post) endpoint to add users to guest group.

comments: author: Juergen Koeck
body: [@Sayed Bares \[ServiceRocket\]](/t5/user/viewprofilepage/user-id/1480984)   
Yes, but this is not what i want, i want to Assign a Guest to the Space. Confluence Guest or do guest users still get Access to a Space with the new guest feature by adding them to the group?


Tags: assign

confluence

rest-api

space
Method to write bitbucket-pipelines.yml to publish dotnet core project by refer to solution file
Asked by LIM WEE BENG:

I have a dotnet core repository/project (in the bitbucket) and would like to publish this project by using CI/CD provided by bitbucket. Do you have a guideline for this?

The publish setting - Target Runtime linux-arm64


Answers:
author: Gajesh Bhat
body: Hello! Welcome to the Bitbucket Community. You can use Self hosted Runners <https://support.atlassian.com/bitbucket-cloud/docs/runners/> and Docker Based ARM Runners <https://bitbucket.org/blog/announcing-support-for-linux-arm-runners-in-bitbucket-pipelines>


Tags: bitbucket-cloud

cloud
Account Limit Exceeded and Need to Restore Write Access
Asked by Nimesh Raut:

Dear Technical Support Team,

I hope this message finds you well. I am writing to seek assistance regarding an issue with our account, esplatform.

Currently, we have encountered a restriction where all repositories under this account are limited to read-only access due to exceeding the user limit on our current plan.

To resolve this issue, we would like to upgrade our plan to restore write access and regain full functionality for our repositories. Could you please guide us through the steps or make the necessary adjustments on your end to facilitate this upgrade?

Here are the specific details:

Account: esplatform Issue: User limit exceeded, restricting repositories to read-only access. Requested Action: Upgrade our plan to restore write access.

We would appreciate your prompt assistance in resolving this matter. If you require any additional information or clarification, please let me know.  

Thanks \& Regards  
Nimesh Raut


Answers:
author: Nimesh Raut
body: Hi! I administer the repository for ++**git clone <https://Eventus_Security@bitbucket.org/esplatform/threat-intelligence-application.git>**++ and my recent attempt at a push has yielded the following result:  

AzureAD+NimeshRaut\*\*\*\*\*\* \*\*\*\*\*\*/d/GITBASH/New folder/main (main)  
$ git push origin main  
remote: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
remote: \[ALERT\] Your push failed because the account 'esplatform' has exceeded its  
remote: \[ALERT\] user limit and this repository is restricted to read-only access.  
remote: \[ALERT\] Change your plan to restore write access:  
remote: \[ALERT\] <https://bitbucket.org/account/user/Eventus_Security/plans>  
remote: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: unable to access '<https://bitbucket.org/esplatform/threat-intelligence-application/src/main/>': The requested URL returned error: 402  

Would changing the plan for my main account workspace or removing users from repository resolve this issue or would it be unnecessary?


author: Syahrul
body: G'day, [@Nimesh Raut](/t5/user/viewprofilepage/user-id/5533785)

Welcome to the community!

The error message you're receiving indicates that your workspace, "esplatform," has surpassed the free plan's limit of 5 users.

<br />

This means you have two options to resolve this issue. You can either upgrade your workspace to a paid plan, such as the Standard or Premium plans or reduce the number of users in your workspace to 5 or fewer.

* To upgrade your plan, go to your workspace settings, find the "Plan Details" section, and choose the plan you'd like to upgrade to.
* If you prefer to remove users to meet the free plan's limit, navigate to your workspace settings, go to the "User Directory," select the user(s) you wish to remove, and proceed with their removal.

Let me know if you have any questions.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
What is the maximum token size limit on all your token types?
Asked by Sakshi Nayak:

What is the maximum token size limit on all your token types?   
For example what i the maximum length of bitbucket repository token?


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

The length of the tokens is subject to change, we cannot guarantee a specific maximum length.

May I ask why you are asking that?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Custom body in Webhooks
Asked by Petr AST:

In automation for Jira there was a setting in the rules that allowed you to edit the content of the body of the JSON when sending a web request  
Due to new restrictions from Atlassian, using automation to send webhooks is too expensive and consumes all the rules in a few days.  
In the system settings there is a Webhooks tab, where you can also configure sending a webhook when creating and updating a request. But I don't see the body settings so as not to send the entire data set, which contains a lot of garbage, but only a part of the required fields.  
Thank you.


Answers:
author: Bill Sheboy
body: Hi [@Petr AST](/t5/user/viewprofilepage/user-id/4029972)

You posted this in a question and seem to be making a statement instead. Did you have a question?

You appear to be commenting about the [changes to the automation packaging/limits](https://community.atlassian.com/t5/Automation-articles/Introducing-our-new-packaging-model-for-Jira-Cloud-Automation/ba-p/2446099) and the behavior of the [admin-managed webhooks feature](https://developer.atlassian.com/cloud/jira/platform/webhooks/). There is an open request to improve the webhooks JSON body configuration, which you may vote for/watch to see progress: <https://jira.atlassian.com/browse/JRACLOUD-63205>

Kind regards,  
Bill

comments: author: Bill Sheboy
body: Hi [@Petr AST](/t5/user/viewprofilepage/user-id/4029972)

Just following up to check if this answered your question. If so, please consider marking this one as "answered". That will help others with a similar need find solutions faster. If not, please let the community know what help you need with the rule changes.

Thanks!


Tags: cloud

webhook
Trigger a webhook only when there is a commit on an opened pull request
Asked by Lo?c Nguemegne Temena:

We were using our local bitbucket server and we were able to use the webhook **Source branch updated** but since we migrated to Bitbucket Cloud I don't have this option available.

Is there a way to have this webhook - **Source branch updated** in bitbucket cloud?


Answers:
author: Dave Parrish _Atlassian_
body: Hi [@Lo?c Nguemegne Temena](/t5/user/viewprofilepage/user-id/5535678) ? Bitbucket Cloud PM here. We have a public feature request logged for exactly what you're describing:

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

As it happens, we're actively looking at adding this. Would you mind sharing a little bit about your use case?

comments: author: Lo?c Nguemegne Temena
body: HI [@Dave Parrish _Atlassian_](/t5/user/viewprofilepage/user-id/853503) the opened feature request you sent is exactly what I'm looking for because right now I'm using the event Pull request updated and it triggers a lot of hooks when a reviewer is added or removed my goal is to trigger my hooks only if I have new commits on my pull request and ignore all other events on the PR.


author: Saxea _Flowie_
body: Hi [@Lo?c Nguemegne Temena](/t5/user/viewprofilepage/user-id/5535678)

There is no **source branch updated** event on the webhooks. We do provide an addon, [Flowie](https://marketplace.atlassian.com/apps/1231101?tab=overview) which has support for source branch updated events. Depending on what you are trying to do it might be already covered by the plugins, and if not you can use a custom extension for that. E.g.: 'Trigger a HTTP endpoint on source branch update if the PR if target main and has a specific label'


author: Nicolas Grossi
body: [@Lo?c Nguemegne Temena](/t5/user/viewprofilepage/user-id/5535678) As you a have a premium license you might want to contact support.atlassian.com to validate that or find the "recommended best way".

HTH

Nicolas


author: Nicolas Grossi
body: [@Lo?c Nguemegne Temena](/t5/user/viewprofilepage/user-id/5535678) welcome! Here you have the list of events for the webhooks :

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

HTH

Nicolas

comments: author: Lo?c Nguemegne Temena
body: Hi [@Nicolas Grossi](/t5/user/viewprofilepage/user-id/676185) thank you I've seen this list but there is not the option I need before starting about another way to do it I wanted to make sure that this event is not available on Bitbucket Cloud


Tags: bitbucket-cloud

cloud
how to provide bitbucket source code access to the user
Asked by adas1:

user requested-I would like to get access to all project source code. I assume that means Bitbucket access, but if we have source code elsewhere such as on GitHub or GitLab this request is to get access to all repositories.  
how to provide bitbucket source code access to the user


Answers:
author: Nicolas Grossi
body: [@adas1](/t5/user/viewprofilepage/user-id/5065251) You might take a look at this link: <https://support.atlassian.com/bitbucket-cloud/docs/grant-repository-access-to-users-and-groups/>

HTH

Nicolas

comments: author: adas1
body: HI Nicolas  
thanks for the update  
but i suspect user want to access our org workspace all repository via source code


Tags: bitbucket-cloud

cloud
How to backup my Wordpress code to bitbuckets
Asked by Matthew Berger:

Hi. Where do I find my backup source and database code in Wordpress and how do I transfer it to my bitbuckets repository?


Answers:
author: Jim Knepley - ReleaseTEAM
body: **I do not suggest this for most use cases. You might get away with it if you mean to build and publish the site in a CICD process.**

My WordPress site isn't "live" on the Internet, and only exists in a private VM. In my environment, The WordPress install location on my VM is a git repository, which you should probably never do.

My deployment process mirrors the site using wget and saves the pages in a different directory. The static pages are copied to an AWS S3 bucket for static hosting.

**Never include a .git directory in a published website, ever. [It is a target](https://www.firecompass.com/blog/how-do-attackers-utilize-git-for-fun-and-profit/) for people doing naughty things.**

I do backups in two stages:

1. Use pg_dump/mysqldump to create a database dump and store it in the repository. My database is small enough that I don't compress it, your mileage may vary.

2. Do the usual git add, commit, push process.

Restoration is as simple as rolling back a commit.


Tags: bitbucket-cloud

cloud
Bitbucket and GIT LFS (Does BB automatically detects if a repo needs LFS)
Asked by G_ W_:

Hello,

Could you please help me with the following questions regarding LFS support in Bitbucket :

* When migrating from a 3rd party GIT repository that contains large files (\>=100MB), does Bitbucket automatically flag the repository as needing LFS?
* If we push the repository to BB as is (LFS not enabled), will BB error out and refuse the push?
* Is there a way to migrate a "regular" GIT repository to an LFS enabled repository without re-writing GIT history? (repo cloning speed is not a concern for us)

Best,

G.


Answers:
author: Theodora Boudale
body: Hi G.,

The 100 MB limit is not enforced if you push to an empty Bitbucket Cloud repo with no commits.

Additionally, it is possible to disable the limit (if you are a repo admin) from **Repository settings** \> **Repository details** \> select **ADVANCED** \> uncheck the option **Block pushes with files over 100MB**.

You mentioned that cloning speed is not a conecrn for you. Please keep in mind that apart from cloning speed, multiple large files also contribute to the repository size. Every Bitbucket Cloud repo has a limit of 4 GB. If a repo exceeds this limit, it will become read-only and you won't be able to push any changes.

The extra storage of 100 GB for $10/Month is only for LFS, and not for the core Git repo.

If you want to track with LFS files that are already committed to a repo, then a history rewrite is necessary.

Please feel free to reach out if you have any other questions!  

Kind regards,  
Theodora

comments: author: G_ W_
body: Thank you [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) !

May I ask a follow up question: Is the 4GB limit per repository? Is there a limit on how big the a Bitbucket Workspace can be (Is there a limit of the total size of all the repositories under an account) ?

Best,

G.


author: Theodora Boudale
body: You are very welcome, G.!

The 4 GB limit is per repository. We don't have a limit on the total size of all repos under a workspace.

Please feel free to let me know if you need anything further.

Kind regards,  
Theodora


author: Nicolas Grossi
body: [@G_ W_](/t5/user/viewprofilepage/user-id/5531002) If you have an active license you might ask that to support team support.atlassian.com

comments: author: G_ W_
body: Thank you Nicolas!

G.


author: Nicolas Grossi
body: [@G_ W_](/t5/user/viewprofilepage/user-id/5531002) Welcome you might take a look at this link: <https://support.atlassian.com/bitbucket-cloud/docs/manage-large-files-with-git-large-file-storage-lfs/>

HTH

Nicolas

comments: author: G_ W_
body: Hi Nicolas,

Thank you for your reply. Could I ask you a follow up question:

* If we buy the 100GB storage for $10/Month, can we use it for only LFS storage, or can it be used for storing additional "regular" GIT repositories?

Thank you again!

G.


Tags: bitbucket-cloud

cloud

git-lfs
Deactivated User. Unable to access Bitbucket cloud account
Asked by Kulsoom Asghar:

The user shows up as deactivated in the group they were added to. They are missing from the user directory.

How to reactivate this user to have full access to that group and repos.

Thanks


Answers:
author: Ben
body: Hi Kulsoom,

This is not a question that would be appropriate to answer in a public forum - as you have access to paid workspaces, please raise a support ticket directly with our support team by using its workspaceID:

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

If you have issues raising a ticket, please let me know your timezone so I may raise it on your behalf and ensure you receive support from a technician in your timezone.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How to add SSH key to a snippet
Asked by Laura A.:

Hello,   
I would like to clone a snippet on a Linux server using SSH.   

When trying to clone a snippet using SSH, I get:

accessing snippet via an access key is not supported fatal:

Could not read from remote repository.

<br />

On a "repo", I can go to a "repo" settings and add the server's public key, how do I do this with a snippet?  

<br />

<br />

I can clone it with HTTPS, but we are a team accessing this snippet, and if doing HTTPS, only the person who cloned it can pull from the server -it asks for the bitbucket password.


Answers:
author: Syahrul
body: G'day, Laura

You'll need to configure your account for SSH before you can clone via SSH. Please check our guide below on step-by-step to configure SSH in Bitbucket:

[Configure SSH and two-step verification](https://support.atlassian.com/bitbucket-cloud/docs/configure-ssh-and-two-step-verification/)

Regards,  
Syahrul


Tags: bitbucket-cloud

clone

cloud

snippet

ssh
fatal: not a git repository (or any of the parent directories): .git during build setup
Asked by Tamas _Gensam_:

Hello,

I have get an error where my bitbucket pipeline fails during build setup:

![bb-pl-fail.png](https://community.atlassian.com/t5/image/serverpage/image-id/333229i5245CF3632A40E27/image-size/large?v=v2&px=999 "bb-pl-fail.png")  
The runner is self hosted and I've followed: the guide [set up runners for windows](https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/)

On my computer I've got:

* OpenJDK 11 (11.0.15 or newer) is installed

  * Im running BellSoft Liberica 11.0.17
* Git 2.35.0 and above

  * 2.45.x
* PowerShell 5.0 and above

  * Yes and got pwsh 7 installed
* A 64-Bit Windows 10+

  * windows 11

I've tried runner version 2.5.0 and 2.4.0 just to be sure.

The runner is installed in C: drive and powershell was run as admin at all times during installation.

<br />

It seems like the runner is not changing directory but no way for me to confirm this.

Since in quite new to all of this i would hope for some advice on how to correct this.  

PS:  
I've seen the following issue

<https://community.atlassian.com/t5/Bitbucket-questions/quot-fatal-not-a-git-repository-or-any-of-the-parent-directories/qaq-p/2739265>  

But there seems to be no solution as i am posting this.


Answers:
author: Syahrul
body: G'day, [@Tamas _Gensam_](/t5/user/viewprofilepage/user-id/5527489)

Welcome to the community!

We may need more information to investigate this issue, and I can see that you have a paid workspace. So, could you raise a support ticket on our [Support portal](https://support.atlassian.com/contact)?

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud