We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pr-required = false
required-approvals = 0
1 parent cdb6b2c commit 6b9bcf5Copy full SHA for 6b9bcf5
src/validate.rs
@@ -949,12 +949,14 @@ but that team is not mentioned in [access.teams]"#,
949
protection.pattern,
950
);
951
}
952
- if protection.required_approvals.is_some() {
953
- bail!(
954
- r#"repo '{}' uses a branch protection for {} that does not require a PR, but sets the `required-approvals` attribute"#,
955
- repo.name,
956
- protection.pattern,
957
- );
+ if let Some(required_approvals) = protection.required_approvals {
+ if required_approvals > 0 {
+ bail!(
+ r#"repo '{}' uses a branch protection for {} that does not require a PR, but `required-approvals` is greater than 0"#,
+ repo.name,
+ protection.pattern,
958
+ );
959
+ }
960
961
962
0 commit comments