Sonar Badges in GitLab

Is there a way to configure Sonar badges on Group level in GitLab for it appear in all sub-projects?

I can easily be done with the normal badges (e.g. pipeline). See: Badges · Project · User · Help · GitLab

And by setting Link and Badge image URL as follows:

  • Link , enter the following URL: https://gitlab.com/%{project_path}/-/commits/%{default_branch}
  • Badge image URL , enter the following URL: https://gitlab.com/%{project_path}/badges/%{default_branch}/pipeline.svg

However, SonarQube badges use the format with project key and project token:

https://sonarqube.somehost/api/project_badges/measure?project=<project key >&metric=code_smells&token=<project token>

Hence, it can’t be set at Group Level and using Placeholders on project level (available placerholders are %{project_path}, %{project_id}, %{default_branch} and %{commit_sha}). If one could set manual placeholder (as with environment variables) then it would work.

Another option is of course to use the Markdown version instead.

Any suggestion that scale over multiple (40+) projects would be highly appreciated.

BR,
Jimisola