feat(credential-groups): add event trigger - #7379
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryAdds Credential Group workflow events for newly connected credentials, reconnections, and completed enrollment forms.
Confidence Score: 5/5The pull request appears safe to merge with no concrete blocking or independently actionable non-blocking defects identified. Event emission remains behind the existing credential-group availability and authorization boundaries, targets only matching active deployments, and preserves queued webhook execution without exposing the internal provider to public event forgery.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/credential-groups/trigger.ts | Builds event payloads, enforces resource-policy authorization, filters subscriptions by group and event, and hands delivery to the webhook processor. |
| apps/sim/lib/credential-groups/trigger-subscriptions.ts | Selects active deployed subscriptions in the event workspace and limits them to policy-authorized workflows. |
| apps/sim/lib/credential-groups/application/public-enrollment.ts | Emits form-submission and credential connection events after successful enrollment mutations. |
| apps/sim/lib/credential-groups/oauth.ts | Returns normalized OAuth persistence details needed to distinguish credential creation from reconnection. |
| apps/sim/lib/credential-groups/enrollments.ts | Preserves the original completion API while exposing transition state for idempotent form-submission events. |
| apps/sim/triggers/credential-group/event.ts | Defines the trigger’s setup fields and workflow-visible event output contract. |
| apps/sim/blocks/blocks/credential-group.ts | Adds the Credential Group event trigger fields and advertises trigger support on the block. |
Sequence Diagram
sequenceDiagram
participant U as Enrollment user
participant A as Enrollment application
participant D as Credential Group persistence
participant P as Resource policy
participant S as Trigger subscriptions
participant Q as Webhook job queue
participant W as Deployed workflow
U->>A: Complete form or OAuth
A->>D: Commit enrollment or credential mutation
D-->>A: Completion details
A->>P: Load workflows allowed to read group
P-->>A: Authorized workflow IDs
A->>S: Find matching deployed subscriptions
S-->>A: Matching group and event subscriptions
loop Each subscription
A->>Q: Queue trigger payload
Q-->>W: Execute active deployment
end
Reviews (1): Last reviewed commit: "feat(credential-groups): add event trigg..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Fix all with cubic | Re-trigger cubic
Summary
Type of Change
Testing
Checklist