Skip to content

Instantly share code, notes, and snippets.

@merlinstardust
Last active May 23, 2024 18:52
Show Gist options
  • Save merlinstardust/48dd054d5f4a2654bdd088b0c0c2af7c to your computer and use it in GitHub Desktop.
Save merlinstardust/48dd054d5f4a2654bdd088b0c0c2af7c to your computer and use it in GitHub Desktop.
GitHub Bot Integration for Public and Enterprise

Public GitHub (github.com)

  1. Invite the GitHub bot to the channel you want the updates in

    • /invite @Github
  2. Subscribe to the repo you want updates from

    • /github subscribe owner/repo
  3. If asked to connect your GitHub account, in Slack, click Connect GitHub Account

    1. In the new tab, click the green button that says Connect GitHub Account

    2. Go through a Sign On Process

    3. Copy the Verification Code

    4. Go back to Slack

    5. Click Enter code

    6. Paste the Verification Code into the field

    7. Click Submit

  4. (Optional) Change the notifications you want

    1. Subscribe to various notifications

      • Single Notification: /github subscribe owner/repo feature

      • Multiple Notifications: /github subscribe owner/repo feature1, feature2

    2. Unsubscribe from various notifications

      • Single Notification: /github unsubscribe owner/repo feature

      • Multiple Notifications: /github unsubscribe owner/repo feature1, feature2

    3. To find the list of notifications you can change

Enterprise Server

  1. Go to the GitHub Enterprise Server app page

  2. Click Add to Slack

  3. Choose an existing channel or create a new one

  4. Click Add GitHub Integration

  5. On the enterprise site, go the repo you want to monitor

    1. Click Settings

    2. Click Webhooks

    3. Click Add webhook

    4. Copy the URL the Slackbot page gives you into the Payload URL field

    5. Set Content type to application/json

    6. Enable SSL Verification

    7. (Optional) Change the events you want to receive

    8. Click Add webhook

  6. On the Slackbot page

    1. (Optional) Set the branch

    2. (Recommended) Change the Slackbot's username to the repo's name

    3. (Optional) Change the Slackbot's icon

  7. Click Save Integration

  8. (Recommended) Bookmark the link to the Slackbot for future edits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment