Add webhook migration support#185
Conversation
Greptile SummaryThis PR adds
Confidence Score: 5/5Safe to merge; the webhook resource is correctly wired end-to-end from export through import. The group routing, dispatch switch, and DB write all connect correctly. The one comment-placement nit in Resource.php has no runtime effect. Previously flagged concerns have been addressed or are pre-existing patterns shared with other resource types. No files require special attention. Important Files Changed
Reviews (8): Last reviewed commit: "Register TYPE_PROJECT_VARIABLE and TYPE_..." | 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.