Configuring PR decoration for SonarQube Developer Edition based on gate result

Must-share information (formatted with Markdown):

  • which versions are you using: SonarQube Server v10.8.1 (LTA upgrade pending)
  • how is SonarQube deployed: Zip
  • what are you trying to achieve: Configure PR decorations such that GitHub PRs are only decorated with Quality Gate profiles
  • what have you tried so far to achieve this: GitHub integration at project level | SonarQube Server Documentation

I suspect this is not a feature of the product, but one of our teams is currently trying to reduce the noise on their github conversation view down to only items that need to be addressed; they would therefore like to only see the quality gate shown on the PR conversation as a comment if the quality gate has failed. If it succeeds, they’d still be able to see details in the “checks” view.

Looking at the referenced help doco above, the conversation view appears to be a binary on/off… is there any way to configure it based upon quality gate success?

Hi @David_M ,

Unfortunately, the setup is generally binary: it either decorates the PR with comments or it doesn’t, and there’s no built-in feature in SonarQube or GitHub that allows for conditional decoration based on the success or failure of quality gates directly in the conversation view.

Interesting idea though. I’ll pass it on.

It should be noted that the summary comment can be turned off while the PR is still decorated with a check, and contains detailed information that check.

(SonarQube Cloud shown here just because it’s what I was using this morning, but the same applies to SonarQube Server)

Maybe that’s enough visibility when there’s a failure?

1 Like

Thank you for the suggestion @David_M!

This isn’t something I’ve seen before and its a nice idea. I have logged it in our internal system so that we can consider it in the future.