feat: include task owner email in tasks response (#418)#422
feat: include task owner email in tasks response (#418)#422arpitgupta1214 merged 1 commit intomainfrom
Conversation
Co-authored-by: Sweets Sweetman <sweetmantech@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe pull request refactors the task enrichment pipeline from a per-task async operation to a bulk operation. The Changes
Sequence Diagram(s)sequenceDiagram
participant Handler as getTasksHandler
participant Enricher as enrichTasks
participant TriggerAPI as fetchTriggerRuns
participant DetailAPI as retrieveTaskRun
participant Database as selectAccountEmails
participant Output as Result
Handler->>Enricher: enrichTasks(tasks[])
par Parallel Processing
Enricher->>TriggerAPI: fetchTriggerRuns (per task)
Enricher->>Database: selectAccountEmails (all unique IDs)
and TriggerAPI-->>Enricher: recent runs[]
and Database-->>Enricher: account→email map
end
par Per Task Payload Extraction
Enricher->>DetailAPI: retrieveTaskRun (latest run)
DetailAPI-->>Enricher: full run data
Enricher->>Enricher: extract payload.upcoming
end
Enricher->>Output: EnrichedTask[] (with owner_email)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
✨ 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 |
Summary by cubic
Tasks API now returns an
owner_emailfor each task. Enrichment is now batched viaenrichTasksto reduce Trigger.dev calls and simplify the handler.New Features
owner_emailfromaccount_emailsfor each task.recent_runsandupcomingfrom Trigger.dev.Refactors
enrichTaskWithTriggerInfowith batchedenrichTasks.getTasksHandlerto useenrichTasks.enrichTasksandgetTasksHandler; removed the old single-task enrichment test.Written for commit fe78298. Summary will update on new commits.
Summary by CodeRabbit