Setting long-lived branch pattern
This section explains how to define a long-lived branches name pattern in SonarQube Cloud at your organization level.
Last updated
Was this helpful?
This section explains how to define a long-lived branches name pattern in SonarQube Cloud at your organization level.
This feature is only available in the Enterprise plan.
As an organization admin, you can set the long-lived branch name pattern at the organization level provided you have an Enterprise plan organization. The organization-level pattern applies by default to all projects. If the project admin sets a custom pattern for their project, this pattern overrides the organization’s pattern. See Long-lived branch pattern for more information.
SonarQube Cloud considers a branch to be long-lived if:
It is the main branch, or
Its name matches the long-lived branch name pattern.
All other branches are considered short-lived.
The type of a branch (long-lived or short-lived) is set during its first analysis and cannot be changed afterward.
The name pattern is based on a regular expression. For example, the regular expression (branch|release)-.* matches any branch name that begins with the string branch- or release-.
If you don’t set any pattern at the organization level, the default pattern (branch|release)-.* applies.* *You can reset the organization pattern to this value.
To set the long-lived branches pattern of your organization:
Retrieve your organization. See Retrieving your organizations for more details.
Go to Administration > Organization settings.
In Branch > Long-lived branches detection, enter your regular expression.
Select Save.
Retrieve your organization. See Retrieving your organizations for more details.
Go to Administration > Organization settings.
In Branch > Long-lived branches detection, select reset. The pattern is reset to (branch|release)-.*.
Last updated
Was this helpful?
Was this helpful?

