validate_push_safety
Validates that a push is not a force push to prevent overwriting history. Use before pushing to ensure force-push protection rules are satisfied.
Instructions
Validate that a push is not a force push. Read-only validation. Returns a structured result with overall status and per-check results (check name, status, value, error, suggest). By default, force push is rejected; configure via 'push.allow_force_push' in config.
Use this before performing a git push to ensure force-push protection rules are satisfied. Only validates the no_force_push rule. Use validate_commit_context for combined checks.
Parameters:
push_refs (optional): The push ref specification to validate. If omitted, checks upstream fallback state.
config (optional): Inline JSON config overrides.
repo_path (optional): Path to the git repository.
config_path (optional): Path to a custom commit-check TOML config file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | ||
| push_refs | No | ||
| repo_path | No | ||
| config_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||