Skip to content

fix(triggers): a trigger file saved from trigger --json keeps its action - #81

Merged
Domantas merged 1 commit into
mainfrom
fix/trigger-file-then-action
Oct 15, 2026
Merged

Domantas merged 1 commit into
mainfrom
fix/trigger-file-then-action

Conversation

@Domantas

Copy link
Copy Markdown
Contributor
  • payments trigger save and db trigger create take a trigger <id> --json answer as their --file: the item wrapper is unwrapped and thenAction is saved as action. Before this, a read → edit → save round trip saved a trigger with no action.
  • New src/lib/triggers.ts (triggerFromFile); one round-trip test each in tests/payments-routes.test.ts and tests/db-routes.test.ts.

Tests: vitest run 37 files / 1028 passed; tsc --noEmit clean.

Found by the payments docs work (gateway campaign audit/payments, item 12). Expected release: patch.

🤖 Generated with Claude Code

…its action

The read answer wraps the trigger in `item` and names the action `thenAction`;
the save request wants `action`. `payments trigger save` and `db trigger create`
now unwrap `item` and rename `thenAction`, so read → edit → save no longer
saves a trigger without an action (found by the payments docs work, campaign
audit/payments).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Domantas
Domantas merged commit 7dc7298 into main Oct 15, 2026
17 of 18 checks passed
@Domantas
Domantas deleted the fix/trigger-file-then-action branch October 15, 2026 12:56
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.34.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant