When sonar.branch.name is used, we need to detect whether it's a long or short living branch.
The type should then be written in the scanner report.
To figure it out, we should:
- Query project repository with the branch name and check if the branch type is returned (this will be the case if a branch with that name already exists);
- Otherwise, get the property "sonar.branch.longLivedBranches.regex" and apply the regex to the branch name to know if it's a short or long living branch;