Repository navigation
CLI 0.16.0: automations triggers ensure-brew-event (brew-v2#2071) - #57
Merged
Merged
Conversation
GetBrew/brew-v2#2071 adds triggers Brew starts itself, the first being a contact unsubscribing. GetBrew/typescript-sdk#66 exposes them as `triggers.ensureBrewEvent`. This adds the command: - `brew-cli automations triggers ensure-brew-event --scope domain --domain-id <id>` or `--scope all` gets or creates the brand's trigger for that scope and prints the row with `created`. `--event` defaults to `contact.unsubscribed`. Scope/domain mistakes exit 2 before any request, and `--idempotency-key` replays a retry. - The bundled spec takes exactly brew-v2#2071's spec change; the consent-source sync stays with #51. Generated types and the command reference are regenerated. Needs @brew.new/sdk ^12.4.0. Until that is on npm, typecheck and parity fail in CI. Once it publishes: `bun add @brew.new/sdk@^12.4.0`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The SDK PR now releases as 12.2.0 (the next free version). - Vendored spec delta from brew-v2#2071 (Brew-event test runs lay passed fields over Brew's sample; unsubscribe.reasons is required). Types regenerated. - SKILL.md counts 145 commands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thedogwiththedataonit
marked this pull request as ready for review
October 15, 2026 08:20
Comments Outside DiffThese findings could not be posted inline.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GetBrew/brew-v2#2071 adds Brew events: triggers Brew starts itself. The first is a contact unsubscribing. GetBrew/typescript-sdk#66 exposes it as
triggers.ensureBrewEvent, and this adds the command:created. The same scope always prints the same row.--eventdefaults tocontact.unsubscribed, the only Brew event so far.--idempotency-keymakes a retry replay, since the route'sx-brew-idempotencyisreplay.--scope,--scope domainwithout--domain-id, and--domain-idwith--scope all.provider: "brew_event",brewEvent,source: "brew_event"andTRIGGER_NOT_FIREABLE. The command reference is regenerated.Why draft
This needs
@brew.new/sdk^12.2.0(typescript-sdk#66), which is not on npm yet, sotscandparity-sdkfail in CI against the published 12.1.0. Once 12.2.0 publishes:bun add @brew.new/sdk@^12.2.0and commitpackage.json+bun.lock.Release order: brew-v2#2071 deployed → docs → SDK 12.2.0 → this CLI.
Spec vendoring
openapi/public-api-v1.yamlis this repo'smaincopy plus exactly brew-v2#2071's spec diff, byte-identical to typescript-sdk#66's. The consent-sourceintegrationchange that brew-v2mainalso has stays with #51.Validation
Run locally with
node_modules/@brew.new/sdkswapped for the SDK PR's 12.2.0 build. That swap is local only;package.jsonstill says^12.1.0.tests/commands/automations-brew-event-triggers.test.tsfailed first and now passes. It covers the domain and all bodies, the idempotency key, four usage errors with no request, and422 DOMAIN_PURPOSE_NOT_ALLOWED→ exit 1.bun run tsc,bun run lint,bun run test(557 tests, includingparity-sdk,parity-specandidempotency-flags),bun run docs:commands:checkandbun run buildpass.node scripts/generate-types.mjsmakes no changes to the committed types.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.

Confidence Score: 5/5
The changes since the previous review appear safe to merge, with no new blocking issue found.Summary
Adds
automations triggers ensure-brew-eventfor unsubscribe triggers.No new actionable issues were found in the changes since the previous review. Tests were not run; dependencies are not installed locally.
Reviews (2) · Last reviewed commit: "Depend on @brew.new/sdk ^12.2.0 (trigger..." · Reviewed by Greptile