How to block the pull requests which will decrease the total test coverage.
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
As title said, currently we need to increase the project test coverage, but how to block it in CI that we need to do.
## How to do
1. We can make it failed in github commit status with codecov service feature.
- Ref 1: https://docs.codecov.com/docs/codecovyml-reference#coveragestatus
- Ref 2: https://docs.codecov.com/docs/commit-status
2. Then we block it with prow tide context policy:
- set `required-if-present-contexts` key and add `codecov/project` into it's value.
## Ref
prow's tide configuration example:
```yaml
tide:
# .....
context_options:
orgs:
pingcap:
repos:
tidb:
skip-unknown-contexts: true
from-branch-protection: true
branches:
master:
required-if-present-contexts:
- "codecov/project"
```
The configuration is in [configs](https://github.com/ti-community-infra/configs/blob/main/prow/config/config.yaml#L2778-L2780) repo.
Contributor guide
Assessment
This issue has not been assessed yet.