> For the complete documentation index, see [llms.txt](https://docs.hivel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hivel.ai/configurations/branch-configurations/branch-filters.md).

# Branch Filters

### Overview

The Branch Filter allows you to scope metric data to specific branches or groups of branches. Administrators can configure named branch patterns (categories) that appear as filter options across the platform. When no patterns are configured, the filter defaults to showing all available branches.

### Branch Filter Display Configuration

Administrators can now customize how the Branch Filter displays branches across the platform. In the Configuration screen under Branch -> Branch Pattern Categorization, you can set the filter to display:

* Source Branches only
* Destination Branches only
* Both Source and Destination Branches

<figure><img src="/files/j9PTX7tTOlkC7d57EOS7" alt=""><figcaption></figcaption></figure>

This setting applies consistently across all supported pages: Cockpit, Pull Requests, and Process Flow.

### Branch Pattern Configuration

Branch patterns are configured by users with Admin (config) permissions in the Configuration screen -> Branch -> Branch Pattern Categorization. There is no limit on the number of patterns that can be created.

Each category entry includes:

* A category name (e.g., Release, Feature, Hotfix)
* One or more branch patterns (e.g., release/*, feature/*)
* A branch type designation: Source Branch or Destination Branch
* Multiple patterns within a single category are combined using an OR condition - a branch matching any of the patterns is included

<div data-with-frame="true"><figure><img src="/files/eW8aeYaL3UOPV17JVPLO" alt=""><figcaption></figcaption></figure></div>

**Pattern Matching Syntax:**

| **Pattern Format** | **Behavior** | **Example**                                          |
| ------------------ | ------------ | ---------------------------------------------------- |
| branch-name        | Exact match  | main matches only the main branch                    |
| \*branch           | Suffix match | \*-hotfix matches any branch ending with -hotfix     |
| branch\*           | Prefix match | release/\* matches any branch starting with release/ |

**Default Behavior (No Patterns Configured)**

When no branch patterns have been configured:

* Pull Request and Process screens: All branches are shown in the branch filter. Users can select branches directly and view data.
* Cockpit page: The branch filter is not displayed. Data is calculated across all branches, as before.

{% hint style="info" %}
**Note:** The absence of a branch filter on the Cockpit does not affect data completeness. All branches are included in Cockpit calculations by default.
{% endhint %}

**Behavior After Patterns Are Configured**

Once branch patterns are saved, the behavior changes across all pages:

* The branch filter displays the configured pattern categories (not individual branches).
* Patterns are applied to either Source or Destination branches based on their configuration.
* No pattern is auto-selected by default - unless a default is set in user preferences.
* The filter in each metric has an option to "apply to all applicable metrics" - which applies the current filter to all the applicable metrics in the dashboard.
* When the "apply to all applicable metrics" toggle is unchecked, the filter only applies to the selected metric and not the others in the dashboard.

<div data-with-frame="true"><figure><img src="/files/tpAplHpxOtKbZ1HSxUmO" alt=""><figcaption></figcaption></figure></div>

* When the "apply to all applicable metrics" toggle is unchecked, the filter only applies to the selected metric and not the others in the dashboard.

<div data-with-frame="true"><figure><img src="/files/bwHDGuo7ydAsGTtqMQlL" alt=""><figcaption></figcaption></figure></div>

**Where is the branch filter?**

* Pull Request and Process screens: The Branch filter is **located under Advanced Filters**, along with the Label and Workspace filters.

<div data-with-frame="true"><figure><img src="/files/xPZGO8Tlkq7JaaYgpk1p" alt=""><figcaption></figcaption></figure></div>

* Cockpit: The Branch filter is part of each of the applicable metrics on a particular dashboard.

<div data-with-frame="true"><figure><img src="/files/vsYAULFbPlynU3J8gJod" alt=""><figcaption></figcaption></figure></div>

**Setting a Default Branch Pattern:**

Users can set a default branch pattern via User Profile preferences, similar to how default Team and Board selections work.

When a default branch pattern is set:

* The selected pattern is automatically applied as the branch filter when metric pages load.
* The default can be changed or cleared at any time from User Profile settings.

**Metrics Where the Branch Filter Applies:**

| **Metric**          | **Metric**     |
| ------------------- | -------------- |
| Average Pickup Time | Merge Time     |
| Average PR Size     | PRs > 400 LOC  |
| Coding Time         | PRs Merged     |
| Cycle Time          | PRs Opened     |
| Flashy Reviews      | PRs Reviewed   |
| Review Time         | Unreviewed PRs |

**Metrics Not Affected by the Branch Filter:**

The branch filter does not apply to the following metric categories. Data for these metrics is always calculated across all branches.

* Commit Metrics (Commits opened, LOC metrics, Commit Frequency, etc.)
* Release Metrics (Release Merge Frequency, Hotfix Rate, Hotfix Rework Time)
* DORA Metrics
* Jira Metrics
* Meeting and Active Days Metrics
