* feat: move hook firing into storage layer via decorator
Add HookFiringStore decorator that wraps DoltStorage and automatically
fires on_create/on_update/on_close hooks after successful mutations.
This replaces manual hookRunner.Run() calls scattered across 8+ CLI
command files, ensuring ALL mutations fire hooks — including future
commands that haven't been written yet.
Key features:
- Decorator pattern: storage layer stays clean (no hooks dependency)
- Transaction support: hookTrackingTransaction accumulates pending
hooks during RunInTransaction, fires them only after successful
commit. Rollback = no hooks.
- Covers all mutation methods: CreateIssue(s), UpdateIssue, CloseIssue,
ReopenIssue, UpdateIssueType, Add/RemoveDependency, Add/RemoveLabel,
AddIssueComment
- DeleteIssue intentionally skipped (destructive, no issue to pass)
- Nil runner safe (passthrough only, no panics)
Removed hookRunner.Run() from: create.go, update.go, close.go,
note.go, assign.go, tag.go, priority.go.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add BD_NO_HOOKS env var to disable all hook firing
Allows opting out of the HookFiringStore decorator entirely via
BD_NO_HOOKS=1. Useful for bulk imports, migrations, or environments
where eventing should not run.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>