Added GET automations/:id route with placeholder static payload#27692
Added GET automations/:id route with placeholder static payload#27692
GET automations/:id route with placeholder static payload#27692Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
WalkthroughThis pull request adds a new 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
GET automations/:id route with placeholder static payload
The automation read endpoint is still static in this PR, but it should match the upcoming editable automation graph contract so clients can build against the intended actions and edges payload. The secret scan query-string rule now ignores template interpolation placeholders, keeping the existing token URL tests readable without weakening literal credential detection.
The automation read response still uses temporary static data, so call out NY-1265 at the payload until the endpoint is backed by persisted automation data.
| }); | ||
|
|
||
| await agent | ||
| .put(`automations/poll/?token=${invalidSchedulerToken}`) |
There was a problem hiding this comment.
This was causing secretlint to fail, hence the change in .secretlintrc.json, which carves an exception for string interpolation with ${}
| return { | ||
| id: frame.data.id, | ||
| slug: 'member-welcome-email-free', | ||
| name: 'Welcome email', | ||
| status: 'active', | ||
| created_at: '2026-05-05T00:00:00.000Z', | ||
| updated_at: '2026-05-05T00:00:00.000Z', | ||
| actions: [{ | ||
| id: '67f3f3f3f3f3f3f3f3f3f3f4', | ||
| type: 'wait', | ||
| data: { | ||
| wait_hours: 24 | ||
| } | ||
| }, { | ||
| id: '67f3f3f3f3f3f3f3f3f3f3f5', | ||
| type: 'send email', | ||
| data: { | ||
| email_subject: 'Welcome!', | ||
| email_lexical: '{"root":{"children":[]}}', | ||
| email_sender_name: null, | ||
| email_sender_email: null, | ||
| email_sender_reply_to: null, | ||
| email_design_setting_id: '680000000000000000000001' | ||
| } | ||
| }], | ||
| edges: [{ | ||
| source_action_id: '67f3f3f3f3f3f3f3f3f3f3f4', | ||
| target_action_id: '67f3f3f3f3f3f3f3f3f3f3f5' | ||
| }] | ||
| }; |
There was a problem hiding this comment.
@troyciesco this is sort of a guess of what you'd need on the frontend, feel free to adjust it as needed
refs https://linear.app/ghost/issue/NY-1265/create-endpoint-for-reading-a-single-automation
This adds the scaffolding for the GET
automations/:idendpoint in the Admin API, with a hardcoded payload. The intent here is simply to unblock development of the frontend, while we iron out the rest of the schema. This will eventually be updated to return automations from the database, once the schema is in place.