Unfortunately, there’s no good way to do this. An Event is added to the analysis when the Quality Gate status, changes. And one is added when the Quality Profile in use changes. But one is not added when the Quality Gate in use changes.
I’m going to move this topic to the Product Manager for a Day category since the functionality doesn’t exist.
I think I know what the answer will be, but would you mind explaining why you want this?
We are developing a centralized tool to measure the quality of a set of products. Among other tools, we are planning to fetch information from sonarqube.
An important information is to know how products are in terms of their Quality Gate. For that is necessary to know what QG had the sonarqube project runed against to.
If a project is passed, then we want to know what was the quality gate used during the scan. (Not necessarily the actual one)
There is no log table with info about what QG was configured for each execution?
Thanks for taking the time to explain.
Can you please tell me more about it? Is this something you plan to monitor or rather a piece of information that you would like to save with, for example, every release? Would you need to identify the name of the Quality Gate that was used, or would you also need to identify what was the definition of the Quality Gate at that time?
Idea is to built a monitorization tool, and keep traking of the scans. Issue is that QG can be updated at any time and that way it’s not assured that a scan few days earlier is the one configured today.
However maybe it’s important to keep is the measures (not the QG). Does API offers a endpoint where query about measures in the past for a given project ?
Maybe endpoint /api/measures/search_history?component offers the list of measurements for each project?
Is it possible to get the update of the QualityGate of a project from the api endpoint: /api/project_analyses/search?project=<…> ?
The update of a QG for a project will create an Event that is fetched from endpoint?
That way we’ll know if the QG was updated.
Trying to call the endpoint, the response gets following info within: “events”: [
The key isn’t the QG key.
Is this key possible to be used somewhere to get more details about the events?
I realize that your question remains unanswered. Since you are now looking for assistance, I think you would get a better chance to get some help from the community if you split your question from your initial suggestion and post it outside of the “Product Manager for a Day” category.