Is it possible to customize the messages that github will send to the slack webhook? I was able to set it up to where I get notifications whenever an issue is created/deleted/edited, however I would like to only get notifications for specific issues with a certain label and also be able to change the format of the notification.
CodePudding user response:
With this level of customization, you will likely need to write a bit of custom code that:
- Receives and authenticates the Github webhook. This means you need to host the code someplace as a web service, for example in Heroku.
- Filters down to only the events that matter to you with the custom criteria you listed above.
- Formats a custom Slack message in markdown based on the payload of the Github event.
- Posts that message to Slack - probably the simplest solution is to use the Slack incoming webhooks.
(Disclosure: I am the co-founder of Fusebit). Fusebit automates such integration scenarios and allows you to focus on the parts that matter to you, which in this case is the custom filtering and custom message formatting code.