Enhancements to your code review workflow

On this page:

Keep your work in progress with draft pull requests

Are you working on a piece of code that you’d like to get some early feedback on but that still isn’t ready for the final review? You no longer have to bother about how to let the team know that your work is still in progress. Instead, you can simply create a draft!

You can work on a draft pull request as long as you need and add only wanted reviewers to it manually. Until you make the pull request ready for review, it can’t be merged. At the same time, with the help of webhooks, you can update your integrations with CI tools and other platforms to track draft pull requests, thus maintaining total control over your workflows.

Add reviewers to pull requests with quick adds

You can now use the quick add buttons to share your code with all the preconfigured default reviewers or code owners.

When you remove any of the automatically added reviewers from your pull request when creating or editing it, you can quickly add them back with the Default reviewers and Code owners buttons. The buttons will appear under the Reviewers field if any default reviewers or code owners, respectively, have been configured for the branches you’re working with. When hovering over the buttons, you can also check how many more reviewers from each group you can add.

The text editor in pull request comments now also allows you to paste a copied link right into the text you highlighted by hitting CTRL+V or Command+V on your keyboard. No need to play around with brackets.

Add tables to comments in pull requests

Adding tables to pull request comments is now faster and more convenient! When commenting on a pull request, you can now add a table to your message by simply selecting the table icon in the text editor and creating a scaffolding of a table with the Markdown syntax.

Signed system commits

All commits created by Bitbucket Data Center can now be automatically signed with a public system GPG key. System-signed commits ensure that all code commits in Bitbucket have verifiable signatures, helping you comply with the strictest security and compliance standards.

Learn more about signed system commits

Download .patch and .diff files from a pull request

You can now download .diff and .patch files directly from pull requests. Conducting a thorough code review in the comfort of your IDE and easily share the files with your team, streamlining collaboration and maintaining flexibility in your project work to stay aligned with diverse developer workflows and preferences.

Copy code blocks with one click

No more tedious manual selection of code snippets! To copy a code block, select the Copy button that will appear when you hover over any code block in comments.

Auto-merge your pull requests

How often are you pulled away from your work to check if a pull request is ready for merge? With auto-merge for pull requests, this tedious monitoring will no longer take your precious time!

Auto-merge allows users to select whether they want Bitbucket to merge a pull request on their behalf when it’s ready to be merged. If auto-merge is available, the clock icon will appear on the Merge button.

Auto-merge pull request

When all merge checks have passed, Bitbucket will automatically merge this pull request on behalf of the user who submitted the pull request for auto-merge.

Learn more about auto-merging pull requests

Define code owners for pull request reviews and shared codebase expertise (releases 8.14)

SERVER DATA CENTER

You can now define owners with expertise for specific areas of the codebase by creating a CODEOWNERS file in your repository. A code owner will be automatically notified about any pull request that introduces changes to the code they’re responsible for. Code owners will also be automatically added to pull requests as reviewers.

Learn more about how to define code owners

Preview and watch videos from pull requests with a web video player (released 8.13)

DATA CENTER

With a built-in video player, you can now preview and watch videos from descriptions and comments in pull requests. If you’re attaching a video file from your own storage to a pull request, make sure that the video meets the following requirements:

  • The supported formats are mp4, mov, and webm.

  • The maximum file size is 10 Mb.

Discover unsigned commits and inspect committers' identities (released 8.13)

SERVER DATA CENTER

While signing commits with GPG keys has already been available in Bitbucket, you can now check if a commit has a verified signature or not on the Commits page. A quick glance at the page will help you find signed and unsigned commits and identify their authors. So you can always monitor the security of changes to your code and timely react to any suspicious issues.

Updated Commits page

Custom template for commit messages (released 8.12)

SERVER DATA CENTER

After release 8.12, you can configure a custom template for a commit message. When you merge a pull request, the value set in the template will be used to populate the title and body fields of the commit message in the merge modal. Commit message templates also support variables, allowing your commit messages to include details such as the source and target branch or the approvers of the pull request. 

If the custom template isn’t set, Bitbucket will generate a commit message suggestion for you in the same way it does in previous versions.

This feature helps you establish a standard practice for your pull requests. Your team will add consistent, informative commit messages and create a useful Git commit history without wasting time copying and pasting the required details.

Learn how to configure commit message templates

Resolve and collapse comments (released 8.9)

SERVER DATA CENTER

When a pull request has lots of comments it becomes hard to navigate and focus on really important discussions. You can now resolve comment threads to communicate to the rest of the pull request participants that the issue has been addressed, the decision has been made, and no further discussion is needed.

If many comments on the pull request are still open and you want to focus on the code diff, you can quickly declutter your view by collapsing comment threads.

Learn how to resolve comments

Diff view updates (released 8.0)

In 7.0, we redesigned pull requests and gave them a makeover. We’ve now moved all the diff views (including commit diffs, branch compares, and the Create Pull Request page) to the new format – enjoy a faster and consistent code collaboration experience!

If your app or integration uses frontend plugin points on these pages, refer to the API changes in the original pull request update.

Reviewer groups for pull requests (released 7.13)

 DATA CENTER

Spending more time than you should be, adding the same reviewers to your pull request, one user at a time? Reviewer groups are here to help you quickly add the right reviewers that need to be involved with your code review.

While creating a pull request, start by simply typing a group name into the Reviewers field, and then select a reviewer group to add.

Project and repository admins create and manage reviewer groups. This makes it easier for development teams to self-manage these groups. Select group members from existing Bitbucket users that have access to the project or repository.

Get more information on how reviewer groups can help speed up your code review workflow.

Pull request description templates (released 7.13)

 DATA CENTER

Having a template for your pull request descriptions will save time and help reviewers know what to expect while doing code reviews. Communicate review guidelines, or even remind authors about common tasks that should be done. When a new pull request is created, contents of the default description template are used and automatically applied.

You can find the new description template for pull requests on the Project settings page.

Update pull requests to the latest version (released 7.10)

SERVER DATA CENTER

Now, when you're in the middle of reviewing code and a pull request is modified, Bitbucket will notify you so that you can update it to see the latest changes.

New code review workflow (released 7.7)

SERVER DATA CENTER

As a pull request reviewer, you can now draft multiple comments on files and code during a review process. Then when you are ready, send them all off at once, rather than just one at a time. This new code review workflow will save you time and unnecessary back and forth exchanges with the pull request author.

React to comments (released 7.7)

Responding to comments just got easier! With comment reactions you can now add emojis to any comment. So whether you want to give a quick 👍, mark something as ✅, or add a little
🔥
, the right emoji is just a couple of clicks away.

Select the Add reaction buttonto try it out, and see Commenting on a pull request for more information.

Accessible colors for the diff view (released 7.7)

SERVER DATA CENTER

We’ve been hard at work to make some important accessibility changes. This release includes a new setting for the diff view that lets you switch to an accessible color option that uses blue and yellow for added and removed lines respectively. Once enabled, the colors will change immediately in the diff view.


View hidden comments (released 7.4)

SERVER DATA CENTER

No more disappearing act for comments that are in older diffs or that have become outdated due to a pull request update. By selecting the other comment counter when it appears on your pull request, you’ll have more context on why code has changed throughout a pull request by being able to:

  • See a file’s activity stream showing comments that are outdated or appear on another diff.

  • Distinguish which comments are actually outdated.

  • Reply to, like, delete, or react to outdated comments the same way you can from the overview tab.

Locate pull requests by searching for text and selecting a reviewer (released 7.2)

SERVER DATA CENTER

It's not productive to have to sift through a large list of pull requests in order to locate a comment you've left or to see why a change was made, so we've made it easier to find a pull request by refining your search. Quickly filter on matches to pull request titles and their descriptions by entering some text into the new search field. We've also added the option to filter by any reviewer so that you can further narrow down the list of pull requests that you've reviewed.

For information on other pull request filtering options, see Search for pull requests.


Pull requests get a makeover (released 7.0)

SERVER DATA CENTER

The pull request page has been redesigned and packed full of improvements to make your code review experience smoother, more enjoyable, and less of a tedious task.

Faster navigation in pull requests

With twice-as-fast content loading while switching between diffs, improved file navigation performance, and smooth scrolling in a side-by-side diff, you just might find yourself having fun speeding through your code reviews.

A more intuitive design

We've improved the pull request workflow, giving you a more effective and efficient experience.

Better collaboration in the diff view

  • Commenting
    • Comment anywhere in the diff, including on expanded lines of code that weren't changed as a part of the pull request.
    • Comment on files stored via Git LFS.
  • Syntax highlighting: Until now, syntax highlighting was only available on the side-by-side diff, but now it’s available in the unified diff too.

  • Word wrap: No more horizontal scrolling to read lines of code in the diff.
  • Expanding: Click Show more to expand all lines in the diff now, rather than just 10 at a time.
  • Searching: You can now use your browser’s native Ctrl+F action to search for code in the file you’re viewing.
  • Image thumbnails: Drag or attach an image into a comment and you’ll see a thumbnail-sized preview of it rather than having the full-sized image rendered.

Do more with less clicking

  • Copying: You can now copy code from just one side of the side-by-side diff view without also copying code from the other one. Also, select and copy branch names in one click.
  • Pasting: When you paste code from a pull request into a comment, we’ll automatically format it as a code block with the correct syntax highlighting.
  • Editor: When you type into a comment or description editor in a PR, you'll see Markdown hints as you type, no need to preview until you’re ready to see the final view.

File-tree improvements

  • Filtering: Easily locate changed files in a pull request using the new Filter file tree button. Use wildcards to find what you need faster on pull requests that have a great deal of files to look through. You can find it just above the file-tree, along with the Search code button. To see an example, check out Reviewing a pull request.


  • Redesigned icons: Icons in the file tree view now have a more distinctive design with contrasting colors so that you can better recognize the relationship between them, and whether your file has been edited, added, removed, or modified.

Task improvements in a pull request (released 7.0)

SERVER DATA CENTER

Create tasks in your pull requests without having to write a comment first. In fact, you can even convert comments into tasks. They also now support Markdown and rich content, like code snippets. Check the Reviewing a pull request page for more details.


We've got your code covered (released 7.0)

SERVER DATA CENTER

Code Insights for Bitbucket offers a better way for your team to improve code quality by allowing continuous integration (CI) and other analysis tools to surface insights about code quality in pull requests. This is so issues that are related to code quality can be viewed and acted upon during a normal code review process. Now, you can access your code coverage results as a part of Code Insights.

Code coverage finds aspects of the code which may not have been covered adequately by tests. The results are compiled and displayed in the diff view using color-coded blocks which represent lines of code that are covered fully, partially, or not at all by tests. You can then also dig into a coverage report, if it’s provided, to see the actual lines that may not be covered and use that to identify critical parts of your application that still need to be tested.


Last modified on Feb 2, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.