Skip to main content

code-quality

The code-quality result subtype reports the results of static code analysis performed during the pipeline (e.g., SonarQube, ESLint). CodeNOW stores the link to the report and displays it in the build detail.

Payload Fields

FieldRequiredDescription
typeYesMust be code-quality
versionYesv1
systemYesName of the code quality system (e.g., SonarQube)
urlYesURL to the code quality report

Example

curl -L -X POST 'https://api.cloud.codenow.com/ci/webhook' \
--header 'Accept: application/vnd.codenow.v1+json' \
--header 'Content-Type: application/vnd.codenow.v1+json' \
--header 'X-Codenow-Api-Key: {YOUR_CI_KEY}' \
--data-raw '{
"type": "codenow.ci.result.event",
"version": "application/vnd.codenow.v1+json",
"pipelineId": "my-pipeline-id",
"createdAt": "2024-01-01T00:00:00.000Z",
"payload": [{
"type": "code-quality",
"version": "v1",
"system": "SonarQube",
"url": "url-to-the-sonarqube-report"
}]
}'