-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add optional config to webhooks in engine #5817
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
...[team_slug]/(team)/~/engine/(instance)/[engineId]/webhooks/components/add-webhook-button.tsx
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5817 +/- ##
==========================================
+ Coverage 53.34% 55.18% +1.83%
==========================================
Files 1101 1123 +22
Lines 59124 59611 +487
Branches 4825 5031 +206
==========================================
+ Hits 31541 32895 +1354
+ Misses 26864 25996 -868
- Partials 719 720 +1
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
...[team_slug]/(team)/~/engine/(instance)/[engineId]/webhooks/components/add-webhook-button.tsx
Outdated
Show resolved
Hide resolved
This PR has been inactive for 30 days. It is now marked as stale and will be closed in 5 days if no further activity occurs. |
1e47014
to
f765214
Compare
...[team_slug]/(team)/~/engine/(instance)/[engineId]/webhooks/components/add-webhook-button.tsx
Show resolved
Hide resolved
return ( | ||
<> | ||
<TWTable | ||
title="webhooks" | ||
data={activeWebhooks} | ||
columns={columns} | ||
columns={columns || []} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is columns
ever falsy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I had to move columns into a memo
@@ -118,7 +118,8 @@ type EngineFeature = | |||
| "CONTRACT_SUBSCRIPTIONS" | |||
| "IP_ALLOWLIST" | |||
| "HETEROGENEOUS_WALLET_TYPES" | |||
| "SMART_BACKEND_WALLETS"; | |||
| "SMART_BACKEND_WALLETS" | |||
| "WEBHOOK_CONFIG"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the webhook CRUD APIs backward compatible, as in if config is provided, an older Engine will just silently ignore it?
If so I'm debating if it's simpler to just show the config field for all Engines (and if anything make a small footnote that config is only used for low wallet balance alerts after Engine version v2.x.x).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah old engine will not process the config as its not processed at all.
If we show it all engine, it could act as a nudge to upgrade the engine which is good I guess.
PR-Codex overview
This PR focuses on enhancing webhook functionality by adding support for a new
WEBHOOK_CONFIG
feature, allowing users to provide configuration for webhooks in a structured format.Detailed summary
"WEBHOOK_CONFIG"
to thefeatures
list.config
field inEngineWebhook
andCreateWebhookInput
.useEngineSystemHealth
to check forWEBHOOK_CONFIG
support.AddWebhookButton
to handleconfig
input.WebhooksTable
to displayconfig
if supported.DeleteWebhookModal
andTestWebhookModal
to showconfig
if present.