which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube 7.1
what are you trying to achieve
I want to integrate discord webhook in sonarqube. So that i can get notified on my discord chennel
when code analysis completed.
what have you tried so far to achieve this
I am using discord application in my organisation and i am using multiple discord webhook to get notified for different applications.
I have tried to configure webhook for discord but it’s getting 400 code when code analyse completed and not sending notification to my discord chennel.
yes URL is correct because i am using multiple webhooks for my apps. i am receiving notification by same webhook from different app, but not working with sonarqube.
i have created webhook from my discord app and added it in sonarqube > administrator > webhook.
Our webhooks invoke the URL you configure after background task processing is complete. Does that mean we support / don’t support Discord? I have no idea. I don’t know what Discord’s requirements are. Is it expecting a GET? Then probably not. I think we use POST. Beyond that, all I can really say is that your Discord server returned an error code, which implies it didn’t get what it was looking for.
The answer is:
It turns out, request body format which SonarQube sends to Discord is not acceptable. It leads to bad request error. Below is logged response from Discord,
{ “message”: “Cannot send an empty message”, “code”: 50006 }