Skip to content
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

Webhook Channel #149

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Webhook Channel #149

merged 2 commits into from
Apr 18, 2024

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Jan 12, 2024

This PR contains two changes:

  • plugin: Document ConfigOption's Help field
  • Introduce Webhook Channel
    In its initial form, the webhook channel can be used to send notifications against a HTTP/HTTPS web server with a dynamic configurable URL and request body message.

This addresses #144 where @julianbrost suggested to implement a web hook channel.

I have tested this channel locally against https://github.com/mendhak/docker-http-https-echo for debugging. Next, I am going to rework #144 to use this channel instead of the file-like channel.

@oxzi oxzi requested a review from julianbrost January 12, 2024 09:42
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Jan 12, 2024
@oxzi oxzi mentioned this pull request Jan 12, 2024
5 tasks
@oxzi
Copy link
Member Author

oxzi commented Jan 18, 2024

FTR: I have added a custom json template function for JSON encoding. By using {{json .}} as the request_body_template, the whole plugin.NotificationRequest will be sent JSON-encoded.

cmd/channel/webhook/main.go Outdated Show resolved Hide resolved
cmd/channel/webhook/main.go Outdated Show resolved Hide resolved
cmd/channel/webhook/main.go Outdated Show resolved Hide resolved
@oxzi oxzi force-pushed the webhook-channel branch from 1fa6636 to 1b71469 Compare April 17, 2024 08:19
@oxzi oxzi requested a review from julianbrost April 17, 2024 08:20
cmd/channel/webhook/main.go Outdated Show resolved Hide resolved
cmd/channel/webhook/main.go Outdated Show resolved Hide resolved
oxzi added 2 commits April 18, 2024 11:37
In its initial form, the webhook channel can be used to send
notifications against a HTTP/HTTPS web server with a dynamic
configurable URL and request body message.
@oxzi oxzi force-pushed the webhook-channel branch from 1b71469 to cc71f34 Compare April 18, 2024 10:56
@oxzi oxzi requested a review from julianbrost April 18, 2024 11:25
@julianbrost julianbrost merged commit 805f114 into main Apr 18, 2024
4 checks passed
@julianbrost julianbrost deleted the webhook-channel branch April 18, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla/signed CLA is signed by all contributors of a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants