Commit graph

4 commits

Author SHA1 Message Date
coffeegoddd☕️✨
7e0d09cbf8 /{internal,cmd}: fix CommitPending 2026-05-01 11:15:02 -07:00
Julian Knutsen
73409d51d4
feat: move hook firing into storage layer via decorator (#2891)
* 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>
2026-03-31 14:32:01 -07:00
coffeegoddd☕️✨
a35edfd28e /{internal,cmd,.goreleaser,.github}: embedded mode by default 2026-03-28 13:47:20 -07:00
Matt Wilkie
62c9e8bbe6 feat: add top-level command aliases (comment, assign, tag, link, priority) (GH#2611)
Amp-Thread-ID: https://ampcode.com/threads/T-019d1b5c-9a3b-763f-9ad3-6e9fd53a47ae
Co-authored-by: Amp <amp@ampcode.com>
2026-03-23 08:52:49 -07:00