How do I include the project key into the comments


We’re using github-actions with a gradlew build to a monorepo. Sonar cloud does not indicate what project has the comment added refers to.

For context we have a few dozen projects (with unique project keys) in our mono repo. When sonar comments it appropriately only comments for the changed projects (maybe 2 per PR) and links to the correct project key but does not visibly display in the comment the project key.

Hey there.

The project name should get displayed (if it’s not, something isn’t quite right with your monorepo setup). You can pass a new project name, perhaps a more clear one (or one identical to the project key) by adjusting the sonar.projectName analysis parameter during an analysis of the main branch.

Is there a specific way I can flag the project as being a mono repo?

Here’s the documentation on monorepo support, including how to make sure a project is identified as one.