This commit is contained in:
Steve Yegge
2025-11-23 16:30:02 -08:00
7 changed files with 809 additions and 675 deletions

View File

@@ -48,14 +48,57 @@ if [ -n "$FILES" ]; then
echo "❌ Error: Beads JSONL has uncommitted changes" >&2 echo "❌ Error: Beads JSONL has uncommitted changes" >&2
echo "" >&2 echo "" >&2
echo "You made changes to bd issues between your last commit and this push." >&2 echo "You made changes to bd issues between your last commit and this push." >&2
echo "Please commit the updated JSONL before pushing:" >&2
echo "" >&2 echo "" >&2
# shellcheck disable=SC2086
echo " git add $FILES" >&2 # Check if bd is available and offer auto-sync
echo ' git commit -m "Update bd JSONL"' >&2 if command -v bd >/dev/null 2>&1; then
echo " git push" >&2 # Check if we're in an interactive terminal
echo "" >&2 if [ -t 0 ]; then
exit 1 echo "Would you like to run 'bd sync' now to commit and push these changes? [y/N]" >&2
read -r response
case "$response" in
[yY][eE][sS]|[yY])
echo "" >&2
echo "Running: bd sync" >&2
if bd sync; then
echo "" >&2
echo "✓ Sync complete. Continuing with push..." >&2
exit 0
else
echo "" >&2
echo "❌ Sync failed. Push aborted." >&2
exit 1
fi
;;
*)
echo "" >&2
echo "Push aborted. Run 'bd sync' manually when ready:" >&2
echo "" >&2
echo " bd sync" >&2
echo " git push" >&2
echo "" >&2
exit 1
;;
esac
else
# Non-interactive: just show the message
echo "Run 'bd sync' to commit these changes:" >&2
echo "" >&2
echo " bd sync" >&2
echo "" >&2
exit 1
fi
else
# bd not available, fall back to manual git commands
echo "Please commit the updated JSONL before pushing:" >&2
echo "" >&2
# shellcheck disable=SC2086
echo " git add $FILES" >&2
echo ' git commit -m "Update bd JSONL"' >&2
echo " git push" >&2
echo "" >&2
exit 1
fi
fi fi
fi fi

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,5 @@
# Tests to skip due to known issues # Tests to skip due to known issues
# Format: one test name per line (regex patterns supported) # Format: one test name per line (regex patterns supported)
# Issue #355: Deadlocks with database mutex during cleanup
TestFallbackToDirectModeEnablesFlush
# Issue #356: Expects wrong JSONL filename (issues.jsonl vs beads.jsonl) # Issue #356: Expects wrong JSONL filename (issues.jsonl vs beads.jsonl)
TestFindJSONLPathDefault TestFindJSONLPathDefault

View File

@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Improved
- **Git Pre-Push Hook**: Better error messaging and auto-sync option
- Error message now suggests `bd sync` instead of manual git commands
- Interactive prompt offers to run `bd sync` automatically
- Falls back to manual instructions in non-interactive terminals or when bd is unavailable
- Improves user experience when beads JSONL has uncommitted changes
## [0.24.2] - 2025-11-22 ## [0.24.2] - 2025-11-22
### Fixed ### Fixed

View File

@@ -780,7 +780,7 @@ For advanced usage, see:
### Third-Party Tools ### Third-Party Tools
- **[Beadster](https://apps.apple.com/us/app/beadster-issue-tracking/id6754286462)** - Native macOS app for viewing and managing bd issues across multiple projects. Features a compact, always-on-top window for quick reference during development. Built by [@podviaznikov](https://github.com/podviaznikov). - **[beads-ui](https://github.com/mantoni/beads-ui)** - Local web interface with live updates, kanban board, and keyboard navigation. Zero-setup launch with `npx beads-ui start`. Built by [@mantoni](https://github.com/mantoni).
Have you built something cool with bd? [Open an issue](https://github.com/steveyegge/beads/issues) to get it featured here! Have you built something cool with bd? [Open an issue](https://github.com/steveyegge/beads/issues) to get it featured here!

View File

@@ -48,14 +48,57 @@ if [ -n "$FILES" ]; then
echo "❌ Error: Beads JSONL has uncommitted changes" >&2 echo "❌ Error: Beads JSONL has uncommitted changes" >&2
echo "" >&2 echo "" >&2
echo "You made changes to bd issues between your last commit and this push." >&2 echo "You made changes to bd issues between your last commit and this push." >&2
echo "Please commit the updated JSONL before pushing:" >&2
echo "" >&2 echo "" >&2
# shellcheck disable=SC2086
echo " git add $FILES" >&2 # Check if bd is available and offer auto-sync
echo ' git commit -m "Update bd JSONL"' >&2 if command -v bd >/dev/null 2>&1; then
echo " git push" >&2 # Check if we're in an interactive terminal
echo "" >&2 if [ -t 0 ]; then
exit 1 echo "Would you like to run 'bd sync' now to commit and push these changes? [y/N]" >&2
read -r response
case "$response" in
[yY][eE][sS]|[yY])
echo "" >&2
echo "Running: bd sync" >&2
if bd sync; then
echo "" >&2
echo "✓ Sync complete. Continuing with push..." >&2
exit 0
else
echo "" >&2
echo "❌ Sync failed. Push aborted." >&2
exit 1
fi
;;
*)
echo "" >&2
echo "Push aborted. Run 'bd sync' manually when ready:" >&2
echo "" >&2
echo " bd sync" >&2
echo " git push" >&2
echo "" >&2
exit 1
;;
esac
else
# Non-interactive: just show the message
echo "Run 'bd sync' to commit these changes:" >&2
echo "" >&2
echo " bd sync" >&2
echo "" >&2
exit 1
fi
else
# bd not available, fall back to manual git commands
echo "Please commit the updated JSONL before pushing:" >&2
echo "" >&2
# shellcheck disable=SC2086
echo " git add $FILES" >&2
echo ' git commit -m "Update bd JSONL"' >&2
echo " git push" >&2
echo "" >&2
exit 1
fi
fi fi
fi fi

View File

@@ -48,14 +48,57 @@ if [ -n "$FILES" ]; then
echo "❌ Error: Beads JSONL has uncommitted changes" >&2 echo "❌ Error: Beads JSONL has uncommitted changes" >&2
echo "" >&2 echo "" >&2
echo "You made changes to bd issues between your last commit and this push." >&2 echo "You made changes to bd issues between your last commit and this push." >&2
echo "Please commit the updated JSONL before pushing:" >&2
echo "" >&2 echo "" >&2
# shellcheck disable=SC2086
echo " git add $FILES" >&2 # Check if bd is available and offer auto-sync
echo ' git commit -m "Update bd JSONL"' >&2 if command -v bd >/dev/null 2>&1; then
echo " git push" >&2 # Check if we're in an interactive terminal
echo "" >&2 if [ -t 0 ]; then
exit 1 echo "Would you like to run 'bd sync' now to commit and push these changes? [y/N]" >&2
read -r response
case "$response" in
[yY][eE][sS]|[yY])
echo "" >&2
echo "Running: bd sync" >&2
if bd sync; then
echo "" >&2
echo "✓ Sync complete. Continuing with push..." >&2
exit 0
else
echo "" >&2
echo "❌ Sync failed. Push aborted." >&2
exit 1
fi
;;
*)
echo "" >&2
echo "Push aborted. Run 'bd sync' manually when ready:" >&2
echo "" >&2
echo " bd sync" >&2
echo " git push" >&2
echo "" >&2
exit 1
;;
esac
else
# Non-interactive: just show the message
echo "Run 'bd sync' to commit these changes:" >&2
echo "" >&2
echo " bd sync" >&2
echo "" >&2
exit 1
fi
else
# bd not available, fall back to manual git commands
echo "Please commit the updated JSONL before pushing:" >&2
echo "" >&2
# shellcheck disable=SC2086
echo " git add $FILES" >&2
echo ' git commit -m "Update bd JSONL"' >&2
echo " git push" >&2
echo "" >&2
exit 1
fi
fi fi
fi fi