Customize Git Branch Detection
To leverage LinearB, you need to be able to relate work in your git code host (GitHub, GitLab, Bitbucket) to work in your project management tool (Jira, Azure Boards, Shortcut). There are two ways to handle this—using LinearB's default detection, or by defining a regex to connect the two.
Default behavior
By default, for Jira issues, LinearB looks for your issue name in your git branch titles, PR/MR titles, and commit messages. So, for example, a Jira issue named LINBEE-3907 would be connected to the associated code work in the following situations:
- Work is done on a branch named
feature-LINBEE-3907
- A PR is opened named "Feature work for LINBEE-3907"
- A commit message reads
adding support for linbee-3907
If your team references your tickets in these ways, then you likely can use this default behavior. However, if your team does not reference tickets that way, then you can configure a custom regex to define the rules for relating the two.
Custom regex
With a custom regex, you can both:
- Enable matching between git work and your PM tool for non-Jira PM tools
- Use a custom regex for Jira or other providers, if the default behavior does not meet your needs
To enable custom detection, go to your company settings > advanced > Correlate Issues with Git Repositories:
![](https://files.helpdocs.io/g5c9ycw6ao/articles/1r4btzllix/1714753808593/image.png)
The pattern that you enter needs to be present in both your PM tool and your git work (branch title, PR title, or commit message). For example, if your issues follow the naming convention Team X: Issue 123
, and you reference issues in the same way in your PR titles, you could use a regex of Team \w*: Issue \d*
Do be aware that you need to match exactly—so if the only consistent thing you use between the two systems is the issue number, use that as the regex rather than the full Issue title.