-
Notifications
You must be signed in to change notification settings - Fork 8
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
Slack parser #6
Comments
Hi Alex, a Gitea parser function shouldn't be a big deal. I wanted to rework this bridge anyway soon... The biggest change will be that the recipients can be overridden by GET/POST parameters. Regarding the Slack parser: I'm not sure if i understand you correctly, but this bridge is designed to receive alerts/messages via HTTP and send them to XMPP recipients only. The link you posted points to the Incoming Webhooks documentation of Slack which would be the 'wrong' direction. Outgoing Webhooks seem to be deprecated: https://api.slack.com/custom-integrations/outgoing-webhooks. I don't use Slack (neither private nor with companies i work with/in), so it's hard for me to evaluate this request right now. Are you willing to invest some time and build a prototype with me (After i understood what we are trying to achieve 😄)? As for your request in the other issue: Sure, a Docker image would be useful (Atleast as dev environment). I'll think about that. |
Maybe I formulated this in a misleading way: Gitea (and many other projects) often doesn't have native XMPP webhook support. But they have very often Slack support. So people that favour XMPP over Slack won't be able to use them. Usually those Slack webhooks are for posting a message into a channel when an event occurred. So if *I don't think that it would be possible to enable every formatting syntax that Slack supports but I'm sure that 99% of the services have simple output anyway |
Okay, now i got it 😄. Thanks for the explanation. I thought you want to be able to receive/forward messages from a slack channel.... Now it makes sense. |
What exactly do you mean by The receiver list is customisable via the environment variable |
Yes, currently this is the only way the receivers are specified. But one of the changes i want to implement (i wanted to spend some time with it tomorrow actually) is, that the receivers can be set in the webhook request's to override the default config from the environment. Since we can't specify the URL/paramters for the slack integration freely (as far as i understood it correctly, i haven't checked the documentaion yet) this won't be possible in the same way as for Grafana/Prometheus... |
@alexanderadam Are you available tomorrow for some input regarding Slack? I got some spare time and will try to make a prototpye for the Slack parser... |
I can respond tomorrow afternoon but I'm not a Slack guy either (that's why I want to have this feature). ;) |
@svensp has kindly built a parser function for Slack notifications. I just refactored the the feature and would be happy for some feedback! -> https://github.com/opthomas-prime/xmpp-webhook/tree/slack-handler @svensp could you verify that the enpoint still works as intended? |
I tested the handler using the example request from @svensp (https://github.com/opthomas-prime/xmpp-webhook/blob/master/dev/slack-compatible-notification-example.json) and merged it. |
Initially I was looking for a webhook from gitea to XMPP but now I am thinking that it would probably be much smarter if
xmpp-webhook
would get a 🎉 Slack parser 🎉 instead.There are so many services with Slack webhook integrations (even my beloved gitea) and I guess it would help the XMPP ecosystem a lot if it would be as easy to integrate stuff as it is in Slack. IMHO it could be even a game changer for some (i.e. here).
My guess is, that at least the basic API is probably not too bad to implement (the "fancy" example is probably complicated though).
What do you think?
PS: Again, thank you so much for your work! 👍
PPS: the only 'alternative' seems to be an alpha state Prosody module for the that isn't working anymore
The text was updated successfully, but these errors were encountered: