Branch Protection Guidance
Source:.github/BRANCH_PROTECTION.md
This repository should enforce branch protection on main (and master if still used) so pull requests cannot merge unless CI passes.
Recommended Rules
Apply these settings in GitHub:
- Settings -> Branches -> Add branch protection rule.
- Branch name pattern:
main. - Enable Require a pull request before merging.
- Enable Require approvals (recommended: 1 minimum).
- Enable Dismiss stale pull request approvals when new commits are pushed.
- Enable Require status checks to pass before merging.
- Enable Require branches to be up to date before merging.
- Enable Require conversation resolution before merging.
- Optional: Enable Include administrators for strict enforcement.
Required Status Checks
Mark the following checks as required for PRs into main:
linttest-coverage-
build-and-deploy(pkgdown workflow PR validation) -
check-badge-sync(README version badge consistency) - All
R-CMD-checkmatrix checks (each appears as a separate check run)
If check names vary by matrix label, require each visible R-CMD-check (...) entry.