Slack

How to set up Github Commit Messages on your Slack Workspace?

Anjali Arya
May 18, 2023
TABLE OF CONTENTS

Introduction:

Integrating GitHub commit messages with Slack can greatly enhance collaboration and streamline communication within development teams. By setting up this integration, you can receive real-time notifications of commit activity directly in your Slack workspace, ensuring that everyone stays up-to-date and informed. 

This article provides a step-by-step guide on how to configure GitHub commit message notifications on your Slack workspace, enabling seamless communication between your GitHub repository and Slack channels.

Prerequisites
:
Before getting started, ensure you have the following:

  1. A GitHub Repository: You'll need a GitHub repository for which you want to receive commit message notifications.
  2. Slack Workspace with App Integration Permission: Ensure you have access to a Slack workspace where you can install and configure apps.

Let's dive into the setup process and get your GitHub commit messages flowing into your Slack channels.

1. Slack Configurations:

To effectively set up GitHub commit message notifications on your Slack workspace, follow the step-by-step instructions below:

A. Accessing Apps in Slack:

To begin, open your Slack Workspace and locate the "Apps" option in the sidebar. If you don't see it immediately, click "Browse Slack" to access the Apps section. This step ensures that an seamlessly integrate external applications with your Slack workspace, enhancing your team's productivity.

B. Adding the GitHub App to Slack:

Within the Apps section, search for "GitHub" and proceed to add the GitHub app to your Slack workspace. Integrating GitHub with Slack allows you to consolidate your development workflow and foster effective collaboration among team members.

C. Configuring GitHub Notifications:

Once the GitHub app is added, it's time to configure the notifications. Select the Slack channel where you want to receive GitHub event notifications. Choosing a specific channel, such as "#random" or one dedicated to development updates, ensures that relevant notifications reach the right audience. After selecting the channel, click on "Add GitHub Integration" to establish the connection.

D. Copying the Webhook URL:

As part of the integration process, Slack will provide you with a unique Webhook URL as part of the integration process. This URL serves as a communication bridge between GitHub and your Slack workspace. Copy this Webhook URL, as you will need it in the subsequent steps when configuring your GitHub repository.

E. Optional Configuration:

To further tailor the integration, you can consider some optional configuration settings. This customization allows you to optimize the notifications to your preferences. 

You can choose specific branches for which you want to receive notifications, ensuring you stay updated on crucial changes. 

Additionally, you can specify a custom username for the message sender, diverging from the default "github" option. Furthermore, you can set a distinctive image for the sender, adding a personal touch to the notifications.

2. GitHub Repository Configurations:

To configure your GitHub repository and establish the necessary webhook for Slack integration, follow these technical steps:

A. Accessing GitHub Repository Settings:

  1. Open the desired GitHub repository in your web browser.
  2. Locate and click on the "Settings" tab within the repository interface.
  3. From the settings menu, navigate to the "Webhooks" section, which allows you to manage webhook configurations for the repository.

B. Adding a Webhook:

  1. Within the "Webhooks" section, click on the "Add Webhook" button. This action initiates the setup process for the webhook.

C. Configuring the Webhook:

  1. In the webhook configuration screen, paste the previously copied Webhook URL from Slack into the "Payload URL" field. This URL establishes the connection between GitHub and Slack, enabling the transmission of commit message notifications.
  1. Change the content type to "application/json" to ensure that the data transmitted is in the appropriate format for integration with Slack.
  1. Enable SSL verification to maintain the security and integrity of the communication between GitHub and Slack.
  1. Choose the specific events for which you want to receive GitHub notifications on Slack. You can select "Commit Comments" to receive notifications specifically for commit messages, ensuring you stay informed about important code changes.
  1. Finally, click on the "Add Webhook" button to save and activate the configuration.

3. Verification and Usage:

After configuring the integration between GitHub and Slack, it's essential to verify that the setup is working correctly is essential. Follow these steps to check the Slack integration and test its functionality:

A. Checking Slack Integration:

  1. Return to the Slack channel that you designated for GitHub notifications (e.g., #random).
  2. Look for an integration message confirming the successful setup. This message typically indicates that the GitHub app integration has been successfully connected to your Slack workspace.

B. Testing the Integration:

  1. To ensure that the integration is functioning as expected, make a commit or push changes to your GitHub repository. This action triggers the generation of a commit message.
  2. Monitor the designated Slack channel (#random, in this example) for a Slack message related to the commit. This message should be automatically generated and displayed in the channel, notifying team members about the recent commit and providing relevant information.

Key takeaways from setting up GitHub commit messages on Slack:

  • Seamless Collaboration: Integrating GitHub commit messages with Slack allows for real-time notifications, fostering better collaboration among team members.
  • Stay Up-to-Date: By receiving notifications directly in Slack, team members can stay informed about commit activity without constantly checking GitHub.
  • Streamlined Workflow: The integration streamlines the development workflow by centralizing communication and updates in one platform.
  • Customization Options: Explore additional customization options, such as choosing specific branches for notifications and personalizing the sender's username and image.
  • Enhance Productivity: Real-time notifications enable quick feedback and better coordination, increasing productivity.

Incorporating GitHub commit message notifications into your Slack workspace is a valuable for improving communication and collaboration within your development team. 

Take advantage of the seamless integration and enjoy the benefits of staying informed and connected with the latest commit activity.

Written by:
Anjali Arya
Product & Analytics, SuprSend
ABOUT THE AUTHOR

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.

Implement a powerful stack for your notifications

By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.