Rolled out to all users on Feb 15th, 2021.
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.
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.
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.
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.
The new experience offers a lot of useful features to streamline the code review process, making it more collaborative, efficient, and robust. It's designed to empower you and your team to build high-quality software for your customers.