-
Notifications
You must be signed in to change notification settings - Fork 83
Add custom webhook json #4671
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 custom webhook json #4671
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughA new webhook entry named "custom_webhook" is added to the webhook.json configuration file. The entry contains an empty JSON body and specifies the Content-Type header as application/json. It is positioned after the existing "create_certificate" entry within the webhook array, extending the list of available webhook handlers. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
priv/data/flows/webhook.json (1)
80-86: Add response format example for consistency and clarify the webhook's purpose.The new "custom_webhook" entry is missing a
response_format_examplefield that all other webhook entries include. This field serves as important documentation for users to understand the expected response structure.Additionally:
- The empty body
"{}"appears intentional for a customizable template, but this should be verified.- The purpose and use case for this webhook are not documented in the PR description. Consider adding:
- Documentation explaining when and how to use this webhook
- Example use cases or scenarios
- Whether this is meant as a user-customizable template
🔎 Suggested addition
{ "name": "custom_webhook", "body": "{}", "headers": { "Content-Type": "application/json" - } + }, + "response_format_example": "{\"success\": true, \"message\": \"Custom webhook response\"}" }Verification questions:
- Is the empty body
"{}"intentional for user customization?- What is the intended use case for this webhook?
- Should there be accompanying documentation explaining how users should customize this webhook?
📜 Review details
Configuration used: Path: https://storage.googleapis.com/cc-tides/glific_v2/.coderabbit.yaml (via .coderabbit.yaml)
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
priv/data/flows/webhook.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: test (1.18.3, 27.3.3)
| "response_format_example": "{\"certificate_url\": \"https://storage.googleapis.com/glific-media-bucket/certificate_id_5_contact_12345.png\", \"success\": true}" | ||
| }, | ||
| { | ||
| "name": "custom_webhook", |
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.
What the need for custom webhook?
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.
Done: All attachments have been added to the issue and the Flow Editor PR
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.
|
Please create a ticket for this and also add a proper description for the PR @priyanshu6238 |
|
closeing this will immediately make the custom method available in the dropdown while the user is label is not present in the dropdown |
Summary:
Add custom webhook json
for more details - glific/floweditor#194
flow editor pr: glific/floweditor#193
Added a custom webhook JSON. In the frontend, when a user selects it from the dropdown, the option becomes editable, allowing both the label name and the body to be edited in this option