I need to trigger HipChat notification for a project as soon as quality gate fails for a project in SonarQube. Is there a REST API for checking the quality gate status of a project. I couldn't find it under api/quailty_gate
or api/projects
.
I am open to other approaches of triggering a hipChat notifications as well.
You can get the quality gate status by using this REST endpoint:
/api/resources/index?includealerts=true&metrics=alert_status
which will give you an output similar to this one:
{
"key": "alert_status",
"data": "ERROR",
"alert": "ERROR",
"alert_text": "Major issues > 10, Files > 3"
}