Unforuntately, I think that today GET api/alm_integration/list_repositories is the only option here today.
The API also returns installationKey
, which should match CI_PROJECT_ID
on the Gitlab side.
{
"repositories": [
{
"label": "newtest",
"installationKey": "65612230",
"linkedProjects": [
{
"key": "colin-mueller_esfadsfsf",
"name": "esfadsfsf"
}
],
"private": false
},
It is an interesting point that a lot of automation woes would be solved if there was a single endpoint to query whether a repo has a SonarCloud project already (without having to list all repos). I’ll make sure to pass along that feedback.