Enable PR decoration on Github for java projects

I am testing SonarCloud on a Java project. The codebase is stored on GitHub and given the size of the project, I am manually running the analysis using mvn sonar:sonar on CircleCI and my local machine.
The analysis work fine, PRs are correctly detected in SonarCloud but I don’t see the PR being enriched.

I also tested on a Javascript project with the same organization. The Github integration is correctly working, with PR decoration.

I checked my project configuration: in “Administration > General Settings”, the github integration is enabled, and has been by default on the project creation.
I read this other question. It seems that enabling this feature post-creation is not working, but I don’t know if I am in the same case. Would there be a way to check this?
If I had to delete and recreate my project, I prefer doing it as early as possible.

Edit:
Commands executed to analyse a pull request

mvn sonar:sonar \
  -Dsonar.host.url=https://sonarcloud.io
  -Dsonar.pullrequest.provider=GitHub
  -Dsonar.pullrequest.gihtub.repository=activeviam/activepivot
  -Dsonar.pullrequest.base=main \
  -Dsonar.pullrequest.branch=pr/tested-branch \
  -Dsonar.pullrequest.key=5204
# And other information about the sonar organization, project name, project key, etc

Cheers

I can confirm that recreating the project from scratch showed better Github integration.
I cannot say what went wrong the first time :person_shrugging:
And I don’t know if we want to pursue this thread.

1 Like

Thanks for letting us know that everything went fine :slight_smile:
I don’t know if the snippet you provided comes from a copy/paste or if you just wrote it by hand, but I noticed a typo in “gihtub” instead of “github”.

Anyway if it works, it works :slight_smile:

Christophe

Nice catch. I think it will improve the current situation as the typo is also in my config. :clap:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.