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.
2 parents cdb6b2c + 6b9bcf5 commit ee9f8faCopy full SHA for ee9f8fa
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