Add webhook migration support#185
Conversation
Greptile SummaryThis PR introduces webhook migration support, adding
Confidence Score: 5/5The change is self-contained, follows established patterns for Platform and ApiKey migration, and the group/routing wiring is correct. Safe to merge. The routing, pagination, dedup, and cache-purge logic all mirror existing sibling resources with no divergence. The only finding is a cosmetic comment-placement nit in Resource.php. No files require special attention beyond the minor comment-section placement in Resource.php. Important Files Changed
Reviews (7): Last reviewed commit: "Webhook resource reports integrations gr..." | Re-trigger Greptile |
c040472 to
3376bed
Compare
- Resource::TYPE_WEBHOOK joins project-variable under the Settings group. - Source uses Appwrite SDK Webhooks::list() (separate service from Project) with cursor pagination. - Destination writes to dbForPlatform.webhooks matching upstream createWebhook payload. Signing secret regenerates on the destination because the SDK strips it from list responses (same caveat as api keys).
6bd9699 to
7fca422
Compare
…into add-webhook-migration # Conflicts: # src/Migration/Destinations/Appwrite.php # src/Migration/Sources/Appwrite.php
…into add-webhook-migration
…into add-webhook-migration
|
|
||
| // Settings | ||
| Resource::TYPE_PROJECT_VARIABLE, | ||
| Resource::TYPE_WEBHOOK, |
There was a problem hiding this comment.
Let's group this with integrations
Summary
Stacks on #184. Adds webhook as a migrable resource.
Webhooks::list()(separate service fromProject) with cursor pagination. Reports viareportIntegrations.dbForPlatform->createDocument('webhooks', ...)matching the upstreamWebhooks::Createpayload exactly.Notes
Resource::TYPE_WEBHOOK = 'webhook', placed inGROUP_INTEGRATIONS_RESOURCES.name,url,events,security(TLS),httpUser/httpPass(basic auth), andenabled.signatureKeyon list responses (Webhooks/XList.phpexplicitlyremoveAttribute('signatureKey')). Destination generates a freshbin2hex(random_bytes(64))to match upstream'screateWebhookdefault. Webhook receivers verifying signatures must be updated with the destination's new key.