Weird Behaviour of project_tags/set API

SonarQube Version
8.1.0.31237 Developer Edition

Issue Encountered
When setting a tag on a project master branch, tags set on branches are cleared, but when I set the tag on the branch, the API only update the master branch.

The issue is that we have a webhook that set tags depending on the analysis result. The behaviour we expect is that tags are set for every branches which is not the case.

I found by debugging that in the header we have a Referer key set but it doesn’t seem to do anything.
What I find weird too is that there is no parameter in the API to define the branch we want to update.

Is there someone who encountered the same issue or has found a solution?

Thank you.

Lorenzo
MICELI
.NET Developer

Hi Lorenzo,

In fact, it’s not the intention to be able to set tags on branches. You’ll find this ticket relevant:

SONAR-12912 - Tags should not misleadingly be associated to branches

 
HTH,
Ann

Hi,

Thank you for your answer. I’ll keep track of the ticket.

Regards,
Lorenzo
MICELI
.NET Developer

Hi Lorenzo,

Just to be clear, it’s fixed in 8.2, the latest version.

 
Ann

Thanks, didn’t notice that the ticket was closed.