Browse Snap-Ins
bitbucket
Bitbucket
by DevRev
don:core:dvrv-global:devo/0:artifact/657097

Bitbucket for DevRev

Connect Bitbucket with DevRev to sync your work and get real-time issue and status updates based on code activity.

The Bitbucket snap-in removes the need for manual issue management by connecting DevRev issues with Git actions. By automating issue handling, developers can focus on meaningful work rather than administrative tasks. This approach resonates with those who've encountered issues like delivering patches without proper tracking, spending time updating issue statuses, or finding issue management distracting.

You can link your Bitbucket commits, branches, and pull requests with existing DevRev issues without creating issues automatically in DevRev. The issues' statuses are guided by Bitbucket activity, transitioning from In Development to In Review and Closed stages. This ensures comprehensive work tracking and enhances team visibility, minimizing disruptions.

However, if you choose to work in Bitbucket and never create or link an issue, you shouldn’t have to sweat it. This snap-in can automatically create issues that track all associated commits, branches, and pull requests. The auto-created issue is auto-populated with the PR description and related Bitbucket events. The status of these issues is driven by Bitbucket activity, and the issues will auto-transition stages, from In Development to In Review, and Closed. Your work is always accounted for and more importantly, your team members have visibility and know what you’ve been up to, resulting in fewer interruptions.

Features

Automatic status updates

Associate your Bitbucket commits, branches, and pull requests with the corresponding DevRev issues and tickets to integrate with the relevant DevRev issue or ticket. This integration enables you to take action on Bitbucket events within the DevRev issue/ticket, automating manual tasks. Mention DevRev issues or tickets in Bitbucket using either display IDs (for example, ISS-34) or object IDs (for example, ticket:34), with case insensitivity. You can include a DevRev issue/ticket reference in branch names, commit messages, or PR titles. You can define which stage an issue is updated to in the configuration screen for each Bitbucket event like new commit, new pull request open, new branch creation, and PR close.

Autocreate issues from Bitbucket branch

If you do not explicitly associate your DevRev issue to Bitbucket branches, commits, or PRs, then we can auto-create your issues so you have an account of all your Bitbucket activity. This feature automatically creates an issue when a new branch is created, and tracks all associated commits and pull requests on this issue. The auto-created issues will move status based on Bitbucket activity, to In Development based on branch and commit activity, and In Review when PRs are created. When PRs are merged, the issue will be automatically closed, though this behavior is configurable.

Autocreate issues from Bitbucket PRs

You can choose to automatically create issues when a new PR is created, and it is not linked to an existing DevRev Issue. The behavior is similar to how issues are auto-created with new branches. The auto-created issues will move status based on Bitbucket activity, and events are posted on the DevRev issue timeline.

Issues auto-created from Bitbucket branches or PRs are called autonomous issues, and have the tag autonomous.

Attribute part to autonomous work

Autonomous issues originating from Bitbucket will be attributed to a default part. You can configure the default part while setting up your snap-in. Every issue in DevRev must have a part attribution.

Auto-populate autonomous work descriptions

When a new Bitbucket PR is opened or edited, then the related autonomous issue description is updated with the latest PR description. If the user has removed the auto-generated text, then the automation will no longer update the description from PRs. Similarly, autonomous work titles are updated with the PR title, if the user hasn’t already updated it.

Link autonomous work with related issue

Create a related link between the work items mentioned in the PR body and the autonomous issues tagged with the branch/PR. When a new Bitbucket PR is opened/edited, for all the autonomous tagged work items(by branch/PR), automatically mark the issues mentioned in the PR as related.

Automatically close autonomous work

Autonomous work gets closed when its related PR is merged. However, if there is no PR activity on this work, then the autonomous work is closed after a configurable period.

Bitbucket Commands

Enable quick actions to close or attribute a PR to a DevRev issue with the slash command.

  • /towards: Use the /towards command in the PR description to associate the related Bitbucket activity to the issue. This will ensure that the PR and issue are linked such that related events are posted and issue status is driven by Bitbucket events.
  • /close {work-id}: Use /close ISS-3 ISS-4 in a PR body to automatically close a specific issue when the PR is merged. You can also use /close #work to close all associated issues with a PR when that PR is merged without knowing the specific IDs.

Automatic PR tasks

When a pull request is requested or reopened, a DevRev task is created for you. For this automation to be triggered, you'll need to link your pull requests to DevRev issues. If your PR is removed, merged, or closed, then the Task gets deleted. However, if you submit your PR review, then the task is closed.

Automatic PR reminders

When a pull request is inactive for more than a specified number of days, then this automation will post a message in all related DevRev issues. You'll need to link your Bitbucket pull request to the DevRev issue to enable these reminders. There are several ways to link your Bitbucket pull requests to DevRev Issues. You can do so by mentioning the DevRev issue ID in the pull requests title or body, or mentioning it in the branch name or commit message. Reminders are also posted for issues created autonomously.

You can choose to set up the inactive period in the number of days through the setting to specify the number of days before sending PR reminders.

Installation

For detailed installation and configuration instructions, refer to the Bitbucket snap-in documentation.