Product Guide: Webhooks in Rock with Github

Product Guide: Webhooks in Rock with Github

Integrating with Github on Rock allows everyone to stay up to date on the latest developments on Github. Webhooks through Github are part of the PRO and Teams plans, and can be added to any space that has been upgraded to PRO.

Note that before being able to add a GitHub bot to your workspace you first have to change it to PRO.

Adding a Github bot in Rock 🤖

In order to integrate Github to Rock you first have to add a bot to your space. You can add new bots by going to your space settings and pressing Add next to integrations. After selecting Github a panel should open that lets you configure your bot.

📝Note: The integrations panel is only visible for users in a space with Admin status. Ask an admin to be upgraded or have them create a bot if you don't have access.

There are three major configurations for your Github bot:

  • Upload avatar: Change the image displayed when receiving a message from a bot. This can be useful when you receive updates from different projects/Github bots in the same space.
  • Name: Customize the name of your bot, so you know directly what project/update flow a message it is connected to.
  • Message configuration: Decide for what activities in Github you want to receive messages. You can select Pull request changes, commit actions, failed CI runs and successful CI runs.

Note that message configurations cannot be changed later on, so make sure to select the actions you plan to use. You can always create a new bot if you want to change the activities.

Select "Create Bot" after configuring your bot. A new panel will open up with a webhook link that you have to use in Github. Make sure to save the link somewhere in case you wish to make changes later on as the link can not be retrieved.

Connecting your bot to your Github workspace

Once your bot has been created you need to add a webhook to the repository where you would like to update messages from. After logging into your account, you can access the panel to add the webhook in two different ways:

A new panel will open up once you press Add webhook. There are a few fields you have to adjust and customize depending on the information you want to receive through the integration.

Paste the webhook URL given from Rock under the section that says Payload URL and set the content type to application/json. You can leave the field that says "Secret" empty.

There are a few options for the events that the bot sends to your chat. This is important configure to know in case you want to shorten your message or share the most important information/specific information only. You have access to the following options:

  • Send just the push event: The bot will only send messages for push events.
  • Send everything: All the triggers in your repository will be sent to your Rock space.
  • Select individual events: Select the different events you want Github to share in your PRO space, these include events such as check runs, forks, pushes, releases and more. Check out Github webhook events help docs or event help docs for more information on the different activities you can select.

We recommend selecting send everything so messages are filtered through your own configuration on Rock. If you wish to further customize the integration besides the integration configurations on Rock you can select relevant information through select individual events instead.

You can also add the webhook without activating it in case you are not done configuring it yet or when a specific project hasn't started yet but you have already begun configuring your bot and Rock space. You can always activate it later on. If you want to look into more information about webhooks and their configuration you can always check out Github's help guide on creating webhooks.

Once you have configured all the different fields you can press Add webhook to create the webhook.

Your bot will appear alongside your other integrations on Github when created successfully. Edit the settings of your webhooks whenever you want by pressing Edit in the same panel. There is also an option to Delete your webhook in case you are ending your project or want to remove the bot from your space/repository.

Questions? You are always welcome to reach out to us in the Rock Team space in case you have any questions about adding a Github bot to a PRO space.