fix(triggers): env var resolution in provider configs#4160
fix(triggers): env var resolution in provider configs#4160icecrasher321 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Adds a small env-resolver API ( Reviewed by Cursor Bugbot for commit 72e805a. Configure here. |
Greptile SummaryThis PR fixes missing environment variable resolution for webhook provider configs (e.g. Confidence Score: 5/5Safe to merge; all findings are P2 style/quality suggestions that do not block correct operation. The fix is targeted and well-tested. Both open comments are P2 — one is a log-message clarity improvement, the other is a subtle null-vs-empty-object normalisation that may affect no current providers. No P0/P1 issues found. apps/sim/background/webhook-execution.ts (silent fallback log clarity), apps/sim/lib/webhooks/env-resolver.ts (null normalisation) Important Files Changed
Sequence DiagramsequenceDiagram
participant WE as webhook-execution.ts
participant ER as env-resolver.ts
participant EU as getEffectiveDecryptedEnv
participant RV as resolveEnvVarReferences
participant H as provider handler
WE->>ER: resolveWebhookRecordProviderConfig(webhookRecord, userId, workspaceId)
ER->>ER: normalizeWebhookProviderConfig(providerConfig)
ER->>EU: getEffectiveDecryptedEnv(userId, workspaceId)
EU-->>ER: envVars map
ER->>RV: resolveEnvVarReferences(config, envVars, { deep: true })
RV-->>ER: resolved config
ER-->>WE: { ...webhookRecord, providerConfig: resolved }
Note over WE: On error: falls back to original webhookRecord
WE->>H: formatInput({ webhook: resolvedWebhookRecord, ... })
Reviews (1): Last reviewed commit: "fix(triggers): env var resolution in pro..." | Re-trigger Greptile |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 72e805a. Configure here.
Summary
Env var resolution in provider configs
Type of Change
Testing
Test in staging environment
Checklist