Add git config defaults for auto-yes and wait options
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 6s
Build-Test-Publish / build (linux/arm64) (push) Successful in 12s

This commit is contained in:
j
2026-03-09 07:17:37 +13:00
parent 8bcc7fddc9
commit d3c867c556
2 changed files with 22 additions and 0 deletions

View File

@@ -49,6 +49,16 @@ After pushing to a Gitea remote, `gp` automatically monitors the CI workflow pro
- Automatically skipped for GitHub/GitLab remotes or when no token is available
- Use `--no-wait` to disable
## Config Defaults
Set per-repo or global defaults via git config:
```bash
git config gp.auto-yes true # Skip confirmations (like -y)
git config gp.wait false # Don't wait for CI (like --no-wait)
git config --global gp.auto-yes true # Apply globally
```
## Commit Message Generation
Uses Claude AI (`claude --print`) if available, otherwise falls back to heuristic analysis:

12
gp
View File

@@ -47,6 +47,10 @@ EXAMPLES:
gp -y # Auto-answer yes to all prompts
gp -b develop # Push to develop branch instead of current
GIT CONFIG DEFAULTS:
git config gp.auto-yes true # Always skip confirmations
git config gp.wait false # Don't wait for CI after push
EOF
}
@@ -765,6 +769,14 @@ TARGET_BRANCH=""
PUSH_ONLY=false
WAIT_FOR_CI=true
# Load defaults from git config
if git config --get gp.auto-yes &>/dev/null; then
AUTO_YES=true
fi
if [ "$(git config --get gp.wait 2>/dev/null)" = "false" ]; then
WAIT_FOR_CI=false
fi
# Handle special commands first
case "${1:-}" in
autocomplete)