Integrating GitHub with Slack allows development teams to streamline communication and receive real-time updates on code changes, pull requests, and issues. Follow these steps to set up and use GitHub with Slack effectively: 

1. Install the GitHub App in Slack 

Go to the Slack App Directory and search for the GitHub app. 

Click Add to Slack and follow the prompts to install the GitHub app in your Slack workspace. 

2. Connect GitHub to Slack 

Once installed, open Slack and type /github in any channel or direct message to connect your GitHub account. 

Slack will prompt you to authorize access to GitHub by logging in with your GitHub credentials and allowing necessary permissions. 

3. Configure Notifications 

You can choose which GitHub events you want to be notified about, such as: 

New commits 

Pull requests 

Issues opened or closed 

Code reviews and comments 

To configure notifications, use /github subscribe owner/repo in any Slack channel (replace owner/repo with the repository details). 

Example: /github subscribe yourusername/project-repo issues, pulls, commits 

4. Customize Notifications by Channel 

Set up specific GitHub notifications for different Slack channels. 

For example, you might want to receive pull request updates in a #dev channel, but only new issue alerts in #support. 

Use the /github unsubscribe command if you need to stop notifications for certain events. 

5. Receive and Act on GitHub Alerts in Slack 

Once set up, GitHub events like new pull requests, commits, or issues will appear directly in Slack. 

Interact with these notifications by commenting on pull requests or viewing details of issues right from Slack. 

6. Manage GitHub Activity from Slack 

Use the /github command to perform basic GitHub actions, such as: 

/github issues to list open issues. 

/github pr to list pull requests. 

/github reopen issue_number to reopen a closed issue. 

/github close issue_number to close an issue or pull request. 

7. Collaborate on Code Reviews 

Use Slack to quickly discuss code reviews with team members. You can share GitHub pull request links in Slack, allowing your team to review the code and comment or approve it. 

8. Set Up Webhooks for Advanced Integrations 

For advanced use cases, you can set up GitHub webhooks that trigger Slack messages for specific GitHub actions. 

This can be useful for automating build notifications, deployment alerts, or continuous integration (CI) updates.