Import GitHub repo to SonarCloud using API

Hello everyone,
I know that we can create new Sonar cloud projects from API, but doing so sonar cloud creates a separate project with same name but not linked to the github project.

I basically want to automate the Import function (see the picture) thats available on UI.

Welcome to the community!

Our API currently does not support the automation of this functionality.

Can you please tell us more about your use case? Why is the feature on the UI not suitable or practical for you?

Thanks
Janos

Thanks @janos , so basically two things.
We imported all of our old projects from Github this way, and now we have a bot to create new GitHub repos, we would like to integrate Sonarcloud to that process. But we found that creating Sonarcloud project through API will create a different kind of project that is different from importing from GitHub. Please see the image attached. Any input would be appreciated.

Any news on this?
We are using terraform to create Sonar projects but they don’t seem to have any link to the GitHub repo.
If we are creating projects through the API, is there a way to provide the repo link somehow to Sonar e.g. as part of the analysis done in the CI system?

I can imagine that when creating GitHub repos with a bot it may make sense to integrate SonarCloud with a bot too. Can you explain more about the use case to create repos with a bot?

Welcome to the conversation. Can you please explain why you need to create SonarCloud projects using terraform, and why it is not an option to use the UI?

For the record, I’m not pushing back on your requests, I’m just trying to understand your needs better.

This is not possible at the moment. The link is only created when importing using the UI.