Webhook JSON Code coverage

Hi folks,

i was searching for a Slack Integration for Sonarcloud but it doesn’t seem to be finished yet.
So I created a webhook for sonarcloud that sends a json to our backend and our backend posts a message to our slack.

Soo, the actual question is: we want to see the code coverage everytime the sonarcloud webhook sends us information. Is it possible to send the code coverage percentage within the json payload or is it restricted to these properties:

  • when the analysis was performed: see “analysedAt”
  • the identification of the project analyzed: see “project”
  • each Quality Gate criterion checked and its status: see “qualityGate”
  • the Quality Gate status of the project: see “qualityGate.status”
  • the status and the identifier of the Background Task : see “status” and “taskId”
  • user-specified properties: see “properties”

thanks in advance!
Leon

Hi @leonidaas , welcome to the community forum

The webhook payload can’t be customized.
If you have a quality gate condition base on coverage (global, or on new code), then you’ll find the current value on the field describing that condition, under qualityGate.conditions[].value. Otherwise, this value is not in the payload.

About the Slack integration, the feature is identified on our side, but we have not started working on it yet. I can’t give a date nor promise it will contain everything you want, but we will for sure listen for your improvement suggestions after the release!

HTH,
Claire

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