pub fn check_safety(
pr: &PrData,
current_branch: &str,
force: bool,
) -> Result<()>Expand description
Perform safety checks before cleaning up a PR.
Checks:
- PR status (must be merged or closed, unless
forceis true) - Branch protection (hard reject — cannot be overridden)
- Current branch (cannot delete currently checked-out branch)
§Errors
Returns an error if any safety check fails.