Hi Ann,
Yes, one can look in Maven or Gradle files, package.json, pyproject.toml, Dockerfile etc.
We don’t want such a solution but one that works with a git repository irrespective of it’s content.
We are trying to get ride of the sonar-project.properties all in all. We want a configuration less solution.
The token information seems to be available via the API.
Yes, our use case started with challenge of creating of using SonarQube’s badges for GitLab Badges. We don’t want to add them manually and you can’t create them on a Group level (see Sonar Badges in GitLab - #4 by lfvjimisola and Add new placeholders for group/project badges (#22278) · Issues · GitLab.org / GitLab · GitLab) due to lack of linking options between SonarQube and GitLab.
I then came up with a solution to add badges on a group level with project id as a place holder. The url will go to our in redirect service that would download sonar-project.properties to fetch sonarqube key and token. The redirect service would then redirect to the requested SonarQube badges type url.
Then we thought we might get ride of sonar-project.properties all together and minimize the configuration needed to setup new projects. Once the initial linking is done there would be a need for sonar-project.properties with my solution. But that requires that we can connect a GitLab project with a SonarQube project - just like SonarLint does. Hence, my question if the git repo url is stored or any other information that could be used for figuring out what SonarQube project a particular GitLab projects it connected to.
BR,
Jimisola