I know that the main branch is set asa a long-lived branch by default. However, I have a team that doesn’t use the main branch. Can I add another one to be monitored by SonarCloud. If not, can I change to a specific branch name? Let’s say the production branch
You can set as many long-lived branches as you want. Just edit the long-lived branches pattern in your project to cover the branch names you want to set.
Default is: (branch|release)-.*
Change the regular expression to match “production” or any other branch name.
@acalero Would it be something like (branch|production|release)-* ?
That will match any branch starting with “branch-”, “production-” and “release-”, for instance:
I suggest you to use:
Or even remove the branch and release option if you are not using those name conventions for any branch…
Notice that if the branch already exists as a short-lived-branch you will have to remove it.
Does this work at the project level? For example, I only want special branch configuration for my project A and B. And project C has different one.
Yes, in fact this setting on SonarCloud is only available at project level.
You must set the pattern for each project to change default behavior.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.