Add file attachments to pull requests in Bitbucket Cloud

During code review, static image files might not be adequate when a developer wants to demo their changes. Starting now, teams can attach any type of file to a pull request. No need to worry about the file size either. For example, “before and after” screen recordings can be uploaded and viewed directly in a pull request.

Let’s dive in.

Adding attachments to an existing pull request

When viewing a pull request, you can add or remove attachments inside the attachment filmstrip. No need to return to the edit view.

bitbucket-blog-edit-attachment-on-pull-request.png

At the moment, it is not possible to add an attachment when creating a pull request. You can vote for and watch this ticket for updates: https://jira.atlassian.com/browse/BCLOUD-22604

 

What’s next?

From the very beginning, we were confident this feature would add value to code reviews. Beyond that, we realized it could unleash some powerful workflows.

Post attachments from build tools

A public API for pull request attachments is on the way. Right now, internal teams at Atlassian are using this feature to post visual diffs from their build tools. The same could be done with logs in text files. The possibilities are endless.

Additional context for attachments

Pull request attachments by themselves are useful, but greater flexibility and context is ideal. Your attachments will soon have information like the uploader, file metadata, and an editable description in a modal sidebar.

Start attaching today!

Give pull request attachments a spin and let us know what you think in the comment below.

12 comments

maddy302 October 28, 2020

This is a great feature indeed. Helps keep track of many documentations, inferences within the PR.

 

When can we expect a public API for POST?

Like Tyler T likes this
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 2, 2020

@maddy302 glad you find the feature useful! We have the public API project roadmapped for early next year.

Nikos Houssos February 1, 2021

@Tyler T Making it possible through the public API to add attachments to PRs would indeed be an awesome feature. Are there any news on when this is foreseen to be included in the public API?

Like maddy302 likes this
dmitriy September 8, 2021

you say in the article "No need to worry about the file size either."

 

but currently it shows the limit 1MB, which is quite small with modern resolution screenshots

 

I could not find any file limit settings in the repo settings, can you please help with that ?

 

image.png

Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 8, 2021

@dmitriy that looks like the comment attachment modal. Try using the Pull Request Attachments upload instead.

Nick Ford September 14, 2021

@Tyler T  Is there updated documentation around the Public PR Attachment API? Earlier you said there would be an update earlier this year, but I have yet to find the feature.

Like maddy302 likes this
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 27, 2021

Hi @Nick Ford , unfortunately we do not have any updates as this project has been de-prioritized for the moment. Please watch and follow this public issue to receive the latest updates: https://jira.atlassian.com/browse/BCLOUD-21023

Bala November 25, 2021

Please guide me on , if it is possible to read/download the pullrequest attachment content using bitbucket api ?

if it is possible, please let me know - the rest api - for cloud & for server that will help in this.

Thanks

Liron Burrack April 3, 2022

@Tyler T What does it mean if i don't have the "browse to upload" link in my companies Bitbucket repo? how can i add that?

Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2022

@Liron Burrack are you on Bitbucket Cloud? If you don't see the upload button I suggest filing a bug. The feature is available to all customers by default.

Liron Burrack April 4, 2022

Hi @Tyler T

I found it eventually. it seems like it is only showing up when creating a pull request but when editing.

Is there a plan to make the `upload image` modal work without the 1mb limit?

Rabinarayan Jena May 11, 2022

@Tyler T  Is the bitbucket cloud API to upload file to pull request publicly available ? Please suggest as I can't find it in the documentation.  

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events