Connecting a Slack webhook to GitHub
Asked Answered
W

1

14

First of all, I'm not sure if this is the place to post this, but this is my last stop to get this fixed.

I've been trying to connect a Slack WebHook with a GitHub repository and I fail every time.

The steps I followed:

  1. Create a webhook (both individually and using a new slack app) Copy
  2. Copy the hook URL and paste in the new hook option in the GitHub repo.
  3. Then when I create it, it gives me an error.

BTW, what should I add to the "Secret" field?

Please check the screenshot for more info.

Creating the hook

Then I get the below error.

Error

Let me know if I'm doing something wrong.

Whirlwind answered 25/4, 2018 at 10:23 Comment(5)
Looks to me that github uses its own format for the payload, which can not be configured and does not match Slack's format. Which I guess is why you get the error. But why do you not use the free Github Slack app instead?Swept
Yes, I have tried the GitHub app and it didn't work. That's why I tried this option. Then after your response, I realized that I use GitHub Enterprise version and it doesn't support the GitHub app. There is a different version named GitHub Notifications (Legacy), and only that works for the enterprise version. The term "legacy" had misled me not to use it. Anyway, I got my requirement done using that app. Thanks for the tip. :)Whirlwind
Also, there is no secret required to use the Slack webhookAmmoniac
This "GitHub Notifications (Legacy)" is the only thing that worked for us.Bonspiel
Looks like Github, left this for other tools to generate some income. Why is it so complex ? for Gitlab it's a walk overFir
G
0

Not sure if this is still valid, but as I am also trying to create this connection, I found a possible solution in the GH Marketplace: https://github.com/marketplace/actions/slack-webhook-for-github-actions

Gird answered 1/2, 2022 at 12:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.