Machines are cheap, but your time isn’t. Throughout your day, every tedious task adds up. Individually reverting each commit in the command line after a mistake, searching forever for an important part of your code during a review, or waiting on a build to finish can be culprits that contribute to an unproductive day.
We want to make your job easier, which means helping you manage your time and productivity. In the past month we’ve been busy releasing 4 new features that are going to get you out of the office that much sooner.
Revert merged pull requests:
At some point, we’ve all merged code we wish we could take back. Luckily, git revert has always allowed you to revert mistakes in the command line. But if this mistake you’re reverting involves a pull request, reverting this in the UI is much easier, and necessary for quick access.
Today we’re adding the ability to revert a pull request that was merged on a Git repository in Bitbucket’s user interface. Instead of automatically reverting all commits (which can lose any changes that’ve been made since that merge), a new pull request will be created that has to go through an approval process. That revert pull request will suggest all recent approvers (plus anyone else you would like to add), and help ensure that all proper merge checks are met prior to reverting. This will keep all team members in the loop and keep all the changes made by any team member. Check out revert merged pull request documentation here.
Commit API
Our most popular add-ons like AWS CodeDeploy make it easier for developers to complete their workflow within Bitbucket, save time and increase productivity. However, our add-ons were missing the ability to look deeper into your commits. Without this, certain processes like creating files were manual, and therefore more time consuming. We want to empower our users with the integrations they need so we created a commit API to help with this. This API allows developers to integrate Bitbucket in to external services and retrieve information normally accessed in the command line or commit:
- The commit API allows read and write access to files and directories at any point in the repository history (by specifying commit, tag, or branch name) using only authenticated HTTP requests.
- Add-ons can preform actions that previously weren’t available, like creating files, creating a commit, reading files or commits (and preforming actions based on this information), and pushing.
- Repository agnostic (i.e. does not matter if the repo is GIT or Mercurial) so add-ons can be created for all of our users.
By enabling add-on developers with the commit API, we’ve opened up more data to add-ons that give you more possibilities with them. As a result, we have several 3rd parties working on new integrations. Keep a look out for a new Jenkins integration and more that are using the commit API and check out the API if you are interested in making an add-on.
Syntax highlighting in code search
Bitbucket Cloud launched a Beta of our #1 highest voted feature in May: code search. Our code aware search saves you time combing through usage results with a semantic search that ranks definitions first over usages or variables names. It first launched with viewing search results in plain text, and combing through a sea of unformatted text results can be tedious and can take longer to find what you’re looking for.
In this next iteration of code search, we wanted to simplify search results so they are easily scannable with syntax highlighting in our code aware search. This helps when reading and reviewing code because you can track the most important parts, without having to go through it with a fine-tooth comb. Check out code aware search documentation here.
Before
After
Dependency Caching in Bitbucket Pipelines
Bitbucket Pipelines is our built-in continuous delivery service that runs builds in Docker containers. This gives you the benefit of your build scripts executing much sooner than running them on Virtual Machines, and ultimately means builds aren’t waiting in a queue. With this model, we noticed faster build times than a CI tool that requires a server, but still not as fast as we’d like. Between builds, dependencies needed to be downloaded each time, which tacked on time per build. Not awesome.
By adding support for caching between builds in Pipelines, we saw build times reduced by up to 50%. This addition should have you waiting less on build times. To get you started, we have pre-defined caches for popular build tools or you can create a custom cache here. Check out the caching dependencies documentation here.
Try Bitbucket’s newest features
If you’re ready to start using any of these features, sign up for a Bitbucket Cloud account and take them for a spin. Already a Bitbucket customer? refer to the feature documentation to get going.
Have more specific questions about this post? Reach out to us on Twitter to get the information you need.