Bitbucket Cloud’s new code review experience is now available

Bitbucket Cliud's new code review experience

This blog is part of our series on how to use Atlassian features, automations, and integrations to take time back to ship better code, faster. Click here for the full list of 12+ new features or follow us on Twitter to stay up-to-date!

The purpose of code reviews is to catch and fix errors in your team's code before it hits the master branch and causes a whole lot of headaches. But while simple code changes can be reviewed by manually scanning through code, what happens when you have multiple changes across several files and thousands of lines of code in one pull request? And then, when you find issues across these files, how do you manage next steps and collaborate with your team to fix those issues?

That's why we're excited to announce that we've launched a newly revamped pull request experience. The new experience makes it easier to review complex diffs, review third-party code reports alongside your code, and collaborate across teams to improve code quality before you approve and merge.

Speeding up code review with in-context information

When reviewing complex diffs, it's important that you're able to quickly access in-context information about the pull request. To help consolidate all this info, we've made a number of changes to the UI.

We've added a right sidebar that is made up of widgets, each of which shows you different types of information about the PR. You can see merge conditions, build status, Jira tickets, code reports, action items, and more all in one screen without having to context switch from tab to tab.

The new activity feed, also shown in the right sidebar, shows you all the activity on a PR. Quickly catch up on comments, tasks or ticket status updates to know what's changed since you last viewed the PR.

Improved file tree navigation shows you a visual representation of the file structure, with the status of each file and the number of diffs in each. At a glance, you can tell which files have the most changes, without having to open each file to check.

Another frequently requested feature was to be able to leave inline comments in the side-by-side view. We've revamped this view to let you collaborate while comparing diffs. No more going back and forth views or keeping multiple windows open to review and comment.

Find and fix bugs faster with integrated code reports

With DevOps processes shifting responsibilities like testing and security to the developer (also known as "shift-left"), developers have less time to do the thorough review required to find bugs. This process is better done automated with tools that scan for security flaws and automate testing processes.

We recently launched code insights to bring code scan results right into the Bitbucket pull request experience. We now give you easy access to code quality reporters from partners like Snyk, Mabl, and Sentry in the sidebar of the pull request. You can click into each one to view specific issues and suggested fixes, assign tasks, open Jira tickets, and collaborate effortlessly from within the Bitbucket Cloud UI. The more bugs you find before a release, the more confidence you can have in the code before you merge, which means fewer security incidents to deal with after release.

Turn feedback into actionable work

Once you identify bugs or need something tweaked, instead of commenting on each issue and managing fixes via comment threads, you can either create a task for the developer or open a Jira ticket from within Bitbucket.

  • Tasks are your to-do list tracked in the PR sidebar that has to be resolved before a PR can be approved. This is typically used to address quick fixes like adding a new test for an edge case or updating a screenshot or changing messaging. Each task is tracked in the sidebar so you can track all tasks at a glance. You can create two types of tasks: tasks that tied to a specific line of code or a top-level task. Examples of top-level tasks could be to add more comments in the code to make it more readable, or to reduce package size.
  • Collaborate across teams with native Jira integration: While tasks are good for things that can be addressed quickly, sometimes you need to address bigger issues and collaborate across teams over a longer period of time. For those, you can now create Jira tickets directly from within a pull request comment. You can assign the ticket to a specific Jira project and even click into the ticket and collaborate right from within Bitbucket.

Get started with Bitbucket's new code review experience

If you’re not on the new experience already, take the new code review for a spin by clicking your avatar on the sidebar > Bitbucket Labs > New pull request experience.  Note: If you are signing up to Bitbucket with a new account, you're automatically seeing the latest version.

All of these changes are designed to make your code review process faster, more thorough and ultimately lead to better quality software for your customers. As always, we are continuing to build new features so stay tuned and keep giving us feedback on what’s working for you and what isn't.