bd init: initialize beads issue tracking
This commit is contained in:
parent
5f6e5b610a
commit
c5d255f816
13 changed files with 146 additions and 31 deletions
|
|
@ -1,9 +1,24 @@
|
|||
#!/usr/bin/env sh
|
||||
# --- BEGIN BEADS INTEGRATION v0.57.0 ---
|
||||
# --- BEGIN BEADS INTEGRATION v0.61.0 ---
|
||||
# This section is managed by beads. Do not remove these markers.
|
||||
if command -v bd >/dev/null 2>&1; then
|
||||
export BD_GIT_HOOK=1
|
||||
bd hooks run prepare-commit-msg "$@"
|
||||
_bd_exit=$?; if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
||||
_bd_timeout=${BEADS_HOOK_TIMEOUT:-30}
|
||||
if command -v timeout >/dev/null 2>&1; then
|
||||
timeout "$_bd_timeout" bd hooks run prepare-commit-msg "$@"
|
||||
_bd_exit=$?
|
||||
if [ $_bd_exit -eq 124 ]; then
|
||||
echo >&2 "beads: hook 'prepare-commit-msg' timed out after ${_bd_timeout}s — continuing without beads"
|
||||
_bd_exit=0
|
||||
fi
|
||||
else
|
||||
bd hooks run prepare-commit-msg "$@"
|
||||
_bd_exit=$?
|
||||
fi
|
||||
if [ $_bd_exit -eq 3 ]; then
|
||||
echo >&2 "beads: database not initialized — skipping hook 'prepare-commit-msg'"
|
||||
_bd_exit=0
|
||||
fi
|
||||
if [ $_bd_exit -ne 0 ]; then exit $_bd_exit; fi
|
||||
fi
|
||||
# --- END BEADS INTEGRATION ---
|
||||
# --- END BEADS INTEGRATION v0.61.0 ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue