I am working on a Terraform Provider for SonarCloud which can be found here:
Specifically I am working on implementing Quality Gates as specified in this issue:
One issue that I came across when implementing quality gates is that all the quality gate conditions that I create using the web_api only apply to overall code, and there isn’t any mechanism that I can find for these conditions to affect new code. I was wondering if there was another api that was already present that I could use for this purpose, or if anyone could implement another field in the web api to expose such an option. Looking forward to the response, I’m excited to see if I can get this terraform resource working !
@ArnavB I’ve looked at the calls as @Colin suggested, and the different is that for only on new code, the metric name gets prefixed with new. For example, metric: "branch_coverage" becomes metric: "new_branch_coverage".