Get the quality gate status of a project or a Compute Engine task. Either 'analysisId', 'projectId' or 'projectKey' must be provided The different statuses returned are: OK, WARN, ERROR, NONE. The NONE status is returned when there is no quality gate associated with the analysis. Returns an HTTP code 404 if the analysis associated with the task is not found or does not exist. Requires one of the following permissions: - 'Administer' rights on the specified project- 'Browse' on the specified proj
Parameters (5)
analysisId(string, query, optional)
Analysis id
branch(string, query, optional)
Branch key
projectId(string, query, optional)
Project id. Doesn't work with branches or pull requests
projectKey(string, query, optional)
Project key
pullRequest(string, query, optional)
Pull request id
Examples (1)
Get the quality gate status of a project or a Compute Engine taskopenapi-spec
import zingu_apis
api = zingu_apis.api("sonarqube")
result = api.fetch("api/qualitygates/project_status", analysisId="AU-TpxcA-iU5OvuD2FL1", branch="feature/my_branch", projectId="AU-Tpxb--iU5OvuD2FLy", projectKey="my_project", pullRequest=5461)
for item in result:
print(item)
const resp = await fetch("https://sonarcloud.io/api/qualitygates/project_status?analysisId=AU-TpxcA-iU5OvuD2FL1&branch=feature%2Fmy_branch&projectId=AU-Tpxb--iU5OvuD2FLy&projectKey=my_project&pullRequest=5461");
const data = await resp.json();