Complete the command to get branch protection rules for a branch in a GitHub repository.
gh api repos/:owner/:repo/branches/:branch/[1]The correct endpoint to get branch protection details is protection after the branch name.
Complete the YAML snippet to require pull request reviews before merging.
required_pull_request_reviews: required_[1]: 1
The key required_approving_review_count enforces that a certain number of approvals are needed before merging.
Fix the error in the branch protection rule to enforce status checks before merging.
required_status_checks:
strict: [1]The YAML boolean value must be lowercase true to be valid and enforce strict status checks.
Fill both blanks to create a branch protection rule that requires signed commits and disallows force pushes.
require_signed_commits: [1] allow_force_pushes: [2]
Setting require_signed_commits to true requires signed commits. allow_force_pushes set to false disallows force pushes.
Fill all three blanks to define a branch protection rule that requires linear history, status checks, and no force pushes.
allow_force_pushes: [1] required_linear_history: [2] required_status_checks: strict: [3]
Force pushes are disallowed by setting allow_force_pushes to false. Linear history and strict status checks are enabled with true.