Invalid branch type 'SHORT'. Branch 'develop' already exists with type 'LONG'

We have a similar issue to this also, we use a global regex pattern for the whole of our organisation:

^(main|master|develop|(releases/.+))$

This works fine on every SonarCloud project apart from 1, where the pipeline builds are failing with an error. The weird thing is some of the release branches are set as long life branches and some of them are trying to be created as short life branches

The error message we are getting from the pipelines is:

##[error][ERROR] SonarQube Cloud: Error while executing task Publish: Task failed with status FAILED, Error message: Invalid branch type 'SHORT'. Branch 'releases/system-text-json-vulnerability-fix' already exists with type 'LONG'. 
##[error]Task failed with status FAILED, Error message: Invalid branch type 'SHORT'. Branch 'releases/system-text-json-vulnerability-fix' already exists with type 'LONG'. 

So firstly it shouldn’t be considered as short life branch and secondly there doesn’t seem to be a long life branch already existing for it!

1 Like