In our project, we are using a plugin that calls the api and checks for quality gates on feature branches before merging to master. Right now, all short lived branches have a default quality gate that will fail if new issues > 0 && new bugs > 0. What i’m trying to introduce is a code coverage metric measurement, and basically fail a feature branch (short lived branch) if it decreases code coverage relative to the master branch. What would be the best way to achieve this, without writing a custom script that parses metrics from the API?
I think this post is about the ‘Estimated after merge’ metric having it’s own quality gate option. I would personally like this. I just had a scenario occur where a feature branch was at 100% code coverage but brought the overall code coverage down from 80% to 60%. I could not find an option in quality gate configuration to catch something like this.