Conserve main branch at all cost, even on bulk deletion

We are using Sonarqube 8.9 Develop Edition.
We have not many LOCs available, for which we have to constantly keep deleting analysis in a bulk. In the near future, we will move to a new license, but for the time being we want to keep doing this, but also conserve the main branch analyses. Is there a possiblity of doing this?
Kindest regards.

Hey there.

For a given project, only a single branch will ever count towards your license at time (the largest branch by Lines of Code). In most (but not all) cases, this will wind up being the main branch.

So any effort you’re doing to delete analyses on projects will have a very minimal effect on your license utilization. Trying to exclude the main branch will only ever save you the typically minor difference between the main branch and the larger branch you’ve deleted.

Hi Colin. We know that. We have this just workaround as a temporary measure. Yet, my question remains. Is there a possiblity of conserving the main branch upon bulk deletion? (e.g. Plugin, Api)?
Kind regards.

There is not. Bulk deletion applies to an entire project.

You may find the Web APIs (documentation linked in the footer of your instance) GET api/project_branches/list and GET api/project_branches/delete if you need to automate the removal of non-Main branches.

1 Like