Update sonar.scm.url without project analysis

We’re trying to update the SCM url, which is both seen in the UIs as the sonar.scm.url property, but also a project_link with type=‘scm’ and no name through the API. There doesn’t appear to be a way to update the url in the UIs. The API does not allow updating a project_link, and we cannot remove/re-create this particular project_link, as we get this error (400 status code):

“Provided link cannot be deleted.”

We have to do this over a lot of projects, so re-analyzing all related projects is not feasible.

Any suggestions?

Hey there.

These are a special kind of link (provided only by analysis parameter) that cannot be updated except with a new analysis.

Sorry :confused:

Hi,

in this case, you could - which is normally not recommended - access the database table project_links directly.
i.e. something like
update project_links set text_value='...' where link_type='scm' and href LIKE '%...%'

Gilbert

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.