Using the new code on the quality gate to push teams to improve code, however finding it can be difficult to make this a strict requirement.
Every so often a PR comes along where it is difficult or would be worse to try and achieve the desired coverage or reduce duplication, but it’s only an issue for the specific PR. In most of these cases the overall project coverage and duplication are well inside the desired limits.
Are there any grace limits such as:
- New code coverage
- PR is 70%, <80% required
- project overall is 85% and this would reduce it by less than .25 percentage points
- => outcome should be pass
- New code duplication
- PR is 15%, >3% required
- project overall is 2% and this would increase it by < .25 percentage points
- => outcome should be pass
Essentially if the specific measure in overall project health is good allow new code gates individual PRs to tolerate some small reductions.
Would like to avoid teams feeling like they need tp apply exclusions to work around individual temporary exceptions as these by merging changes to the config which would apply to all PRs subsequently and defeat the purpose of trying to ratchet up quality.
Is there anyway to achieve the above in Github without adding a custom check that is run post analysis and using that as the required status check to pass?