Webhooks support

When investigating the Tuist Slack integration, I realised that while having a first-party integration is great, what would be amazing long-term is to have support for creating custom webhooks – that would allow anybody to build a Slack-like integration for any other service or they could build a service on top of that API internally.

It could work similar to Expo’s webhooks – using the Tuist CLI, you would create a webhook for a Tuist organization by running tuist organization webhooks create https://my-server.com/webhooks/tuist. We would then send events to this webhooks endpoint. This would include new preview events, but we can increase the scope as needs come up.

I did think about having just webhooks but doing your own Slack integration on top of webhooks is not that easy as this blogpost demonstrates: https://medium.com/@bataevvlad/automating-expo-build-notifications-integrating-slack-with-cloudflare-and-eas-webhooks-aa93fa5e6218. So, there’s definitely a lot of value by us still providing the first-party Slack integration.

What do you think? Would your team find a support for webhooks useful?

It can also be a pretty poor user experience. You’re essentially shifting configuration from Tuist (CLI/Dashboard) to Slack, which is definitely a smaller implementation effort, but it also means that

  1. a user needs to go to multiple places to change configuration. Event configuration on Tuist side, and channel and actions on Slack side.
  2. the user changing a settings needs to have admin access to their internal Tuist Slack app. That can, depending on the customer, be a deal breaker. Especially in big enterprises, permissions to the workspace are not happily granted. If it’s a proper integration, the workspace admin needs to approve the app once and permissions can live inside Tuist depending on the user persona and be changed as often as needed.

There’s definitely some annoyances about doing a proper integration (for one, getting the app listed on Slack’s marketplace and having it reviewed does not take the advertised ~4 weeks, but more like 3-4 months) but the user experience is infinitely better in my opinion.

Definitely onboard with you on this one!

FWIW, we ended up not creating a Slack app as the need to send Slack messages from CI jobs is usually already handled by CI providers. For further reasoning, see this PR.

That being said, I very much expect to have a need for the Slack app down the road.