Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions repo_manager/github/branch_protections.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,21 +285,27 @@ def check_repo_branch_protections(
diff_option(
"required_approving_review_count",
config_bp.protection.pr_options.required_approving_review_count,
this_protection.required_pull_request_reviews.required_approving_review_count,
## Had issues when the YAML defines this but the Repo has none (e.g. it's null in the cloud)
None if (this_protection.required_pull_request_reviews is None) else \
this_protection.required_pull_request_reviews.required_approving_review_count,
)
)
diffs.append(
diff_option(
"dismiss_stale_reviews",
config_bp.protection.pr_options.dismiss_stale_reviews,
this_protection.required_pull_request_reviews.dismiss_stale_reviews,
## Had issues when the YAML defines this but the Repo has none (e.g. it's null in the cloud)
None if (this_protection.required_pull_request_reviews is None) else \
this_protection.required_pull_request_reviews.dismiss_stale_reviews,
)
)
diffs.append(
diff_option(
"require_code_owner_reviews",
config_bp.protection.pr_options.require_code_owner_reviews,
this_protection.required_pull_request_reviews.require_code_owner_reviews,
## Had issues when the YAML defines this but the Repo has none (e.g. it's null in the cloud)
None if (this_protection.required_pull_request_reviews is None) else \
this_protection.required_pull_request_reviews.require_code_owner_reviews,
)
)
# for now, not checking dismissal options. Will note that in the docs
Expand Down