SonarCloud PR decoration for Github Enterprise

  • ALM used: Github Enterprise
  • CI system used: Bitrise

Hey, we are trying to add PR decoration to Github Enterprise with Bitrise, and we would like to know if that’s possible. We are currently using the latest GHE version and Sonarcloud integration, but we are unable to make the PR decoration to work. Is that possible? Is there any guide we could follow?

If that is not possible, is there an API we can query after running the sonar command where we can get the results and format ourselves a message?

Hi,

Welcome to the community!

You’ll need to set the necessary analysis parameters for each PR. Hopefully you’ll be able to pull from envvars.

 
HTH,
Ann

Thanks, with that I’m able to push our PR and see the results on SonarCloud. Is there any way we can enable the PR decoration for our project given our setup?

Hi,

I guess you didn’t use the onboarding wizard to import your projects into SonarCloud?

You’ll need to do that setup manually (or delete them and do the import). Assuming your organization is already bound, at the project level go to: [cog menu] → General Settings → Pull Requests.

 
HTH,
Ann

Hey, yes, we didn’t use the onboarding wizard because it was not available for GitHub Enterprise, but we managed to get it working by passing the the necessary analysis parameters for each PR like you mention previously. And we are getting some of the analysis results from the SonarCloud web api based on the PR identifier and showing them on the PR.

Thanks, I think we can close the thread :slight_smile:

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