{"meta":{"title":"Using GitHub in Slack","intro":"Learn how to use GitHub in Slack to improve collaboration and streamline your workflow.","product":"Integrations","breadcrumbs":[{"href":"/en/integrations","title":"Integrations"},{"href":"/en/integrations/how-tos","title":"How-tos"},{"href":"/en/integrations/how-tos/slack","title":"Slack"},{"href":"/en/integrations/how-tos/slack/use-github-in-slack","title":"Use GitHub in Slack"}],"documentType":"article"},"body":"# Using GitHub in Slack\n\nLearn how to use GitHub in Slack to improve collaboration and streamline your workflow.\n\nThe GitHub integration for Slack allows you to connect your GitHub account to the GitHub app in Slack. Once connected, you can use slash commands to interact with GitHub, receive notifications about repository activity, and collaborate with your team directly within Slack.\n\n> \\[!NOTE]\n>\n> * GitHub Copilot in Slack is currently in public preview and subject to change.\n\nYou can also use the GitHub integration to initiate and steer Copilot cloud agent sessions in a conversation, including asking Copilot to perform deep research, planning and triage tasks within a thread. Teammates can collaborate with each other and the agent, add context, correct assumptions, continue an agent task, and review the resulting artifacts.\n\n## Connecting your GitHub account to the GitHub app in Slack\n\n> \\[!NOTE] Before you can connect your accounts, an admin for your Slack workspace must have installed the GitHub app. See [Integrating GitHub with Slack](/en/integrations/how-tos/slack/integrate-github-with-slack).\n\n1. In Slack, start a direct message with the GitHub app.\n2. The direct message will be pre-populated with a welcome message and a link to connect your GitHub account. Follow the prompts on screen in Slack, and in GitHub in your browser, to authenticate and authorize the connection.\n\nOnce your GitHub account is connected, Slack will show you a list of available commands and features you can use.\n\n## Using Slash commands to interact with GitHub in Slack\n\nTo use a slash command, type `/github` followed by the command you want to execute in the message input field of any Slack channel or direct message where the GitHub app is present. To invite the app to a channel, type `/invite @github` in the channel.\n\n| Command                                           | Description                                                                                                        |\n| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |\n| `/github help`                                    | Displays a list of essential commands and their descriptions.                                                      |\n| `/github subscribe OWNER/REPO`                    | Subscribes the channel to notifications for the specified repository.                                              |\n| `/github unsubscribe OWNER/REPO`                  | Unsubscribes the channel from notifications for the specified repository.                                          |\n| `/github subscribe list`                          | Lists all repositories the channel is subscribed to.                                                               |\n| `/github open OWNER/REPO`                         | Opens an issue in the specified repository. You will be prompted to provide a title and description for the issue. |\n| `/github close [ISSUE-LINK]`                      | Closes the specified issue as completed.                                                                           |\n| `/github close [ISSUE-LINK] reason:\"NOT-PLANNED\"` | Closes the specified issue with a reason. Replace `\"NOT-PLANNED\"` with your reason.                                |\n| `/github reopen [ISSUE-LINK]`                     | Reopens the specified issue.                                                                                       |\n| `/github signin`                                  | Restarts the \"Connect your GitHub account\" workflow.                                                               |\n| `/github signout`                                 | Disconnects your GitHub account from your Slack user.                                                              |\n\n> \\[!NOTE] When you subscribe a channel to a repository, the channel will receive notifications for all `open`, `close`, and `reopen` events on pull requests and issues in that repository. The channel will also receive notifications of any `push` events directly to the repository's default branch.\n\nTo change the settings for Copilot cloud agent in Slack, use the `@GitHub settings` command.\n\n## Initiating Copilot cloud agent sessions within Slack\n\nThe GitHub integration includes Copilot cloud agent in Slack. You can summon GitHub Copilot in threads where discussions are taking place and ask it to make changes based on the context of those discussions.\n\nUse Copilot in direct messages, threads, and channels. Besides creating issues, pull requests and other artifacts, working with Copilot in Slack allows you to:\n\n* Move directly from discussion to investigation and implementation.\n* Ask questions and investigate failures.\n* Plan work before implementation.\n* Collaboratively steer an agent with teammates.\n* Delegate work from any device.\n* Let tasks run asynchronously.\n* Review the resulting work in the open.\n* Resume work on the agent-generated artifacts outside of Slack, in GitHub, the terminal, or your preferred code editor.\n\nFor more information, see [Integrating Copilot cloud agent with Slack](/en/copilot/how-tos/use-copilot-agents/cloud-agent/integrate-cloud-agent-with-slack).\n\n## Working with issues and pull requests\n\nYou can create, comment on, and manage issues and pull requests directly from Slack with or without using Copilot.\n\nTo have Copilot perform an action, @mention the app in any chat by typing `@GitHub` followed by your task.\n\n> \\[!NOTE]\n> Pull requests created in a shared context by Copilot use the app's identity. If you use repository rulesets, because these pull requests aren't attributed to a person, one more approval is required before merging, as long as the repository already requires at least one approval. This is enabled by default. See [Available rules for rulesets](/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#additional-approval-for-unattributed-copilot-pull-requests).\n\nFor step-by-step instructions to work with issues and pull requests independent of Copilot, see [Creating issues with the GitHub integration in Slack](/en/integrations/tutorials/slack/create-issues) and [Managing issues with the GitHub integration in Slack](/en/integrations/tutorials/slack/manage-issues).\n\n## Notification mentions in Slack\n\nWhen you subscribe to a repository in Slack, you will see yourself mentioned in notifications for repository events in which you have been referenced. For example, if you are assigned to an issue, or mentioned in a comment, you will see yourself mentioned in the notification in Slack.\n\nMentions require you to be logged in to your GitHub account through the GitHub app in Slack. This enables GitHub to map your Slack identity to your GitHub identity. See [Connecting your GitHub account to the GitHub app in Slack](#connecting-your-github-account-to-the-github-app-in-slack).\n\n> \\[!NOTE]\n> If you have multiple Slack workspaces where you use the GitHub app, mentions will only work in the workspace where you logged in to your GitHub app most recently. If you log in to your GitHub app in a different workspace, mentions will stop working in the previous workspace.\n\nThe following are scenarios in which you will be mentioned:\n\n* You are assigned to an issue.\n* Your review is requested on a pull request.\n* You are mentioned in a pull request, issue description, comment, or discussion.\n* Your review is requested on a deployment.\n* You receive a scheduled reminder for a pull review request.\n\nYou can see a summary of your GitHub mentions in the \"Mentions\" view in Slack. For more information, see [Triage notifications in the Activity tab](https://slack.com/help/articles/19693583638803-Triage-notifications-in-the-Activity-tab) in the Slack documentation.\n\nTo learn how to customize your GitHub notifications in Slack, see [Customizing notifications for GitHub in Slack](/en/integrations/how-tos/slack/customize-notifications).\n\n## Threading conversations\n\nNotifications for each issue or pull request are grouped into a thread in Slack. The parent message always shows the latest status of the issue or pull request, along with other meta-data like title, description, assignees, reviewers, labels and checks. Threading helps keep conversations organized, making it easier to follow updates and discussions related to a specific issue or pull request. When the state of an issue or pull request changes, the associated reply is posted both in the thread and in the channel, so that everyone in the channel is aware of the update.\n\nYou can disable threading for issue and pull request notifications in individual channels.\n\n1. In the Slack channel where you want to disable threading, type `/github settings`.\n2. In the settings menu, to the right of \"Disable threading for Pull Request and Issue notifications\", click **Disable**.\n\nYou, or any other member of the channel, can re-enable threading at any time by following the same steps and clicking **Enable** in the settings menu.\n\n## Broadcasting comments and reviews to the Slack channel\n\nBy default, comments and reviews will only show up in their related thread. If you want the channel members to see them instead of just those who are participants of the issue, you can opt-in to broadcasting with the following commands:\n\n* For comment broadcasting, use `/github subscribe OWNER/REPO comments:\"CHANNEL\"`\n\n* For review broadcasting, use `/github subscribe OWNER/REPO reviews:\"CHANNEL\"`\n\n## Unfurling links to GitHub activities in Slack\n\nLink previews provide additional context when sharing links to GitHub activities in Slack. Link previews are shown in Slack for the following GitHub activities:\n\n* Pull requests\n* Issues\n* Directly linked comments\n* Code blobs with line numbers\n* Organizations, repositories, and users\n\nPreviews of links will not be shown if any of the following apply:\n\n* Link previews are disabled in your Slack workspace. See [Share links and set preview preferences](https://slack.com/help/articles/204399343-Share-links-and-set-preview-preferences#turn-off-link-previews-for-specific-sites) in the Slack documentation.\n* The same link has already been shared in the channel in the past 30 minutes.\n* 3 or more links are shared in the same message.\n* The repository is private, and the user who shared the link:\n  * Has not connected their GitHub account to the GitHub app in Slack.\n  * Asked not to show link previews when prompted.\n  * The GitHub app is not in the channel where the link is shared. See [Using slash commands to interact with GitHub in Slack](#using-slash-commands-to-interact-with-github-in-slack).\n\n## Scheduling reminders for pull request reviews\n\nYou can schedule reminders for pull request reviews in Slack. Reminders can be sent to you directly in a direct message with the GitHub app, or to a channel where the GitHub app is present. For example, you can schedule a reminder to be sent to you in a direct message every weekday at 10 AM including all open issues that are assigned to you.\n\nYou can configure scheduled reminders for yourself, your team, or your entire organization. For more information, see:\n\n* [Managing your scheduled reminders](/en/subscriptions-and-notifications/how-tos/managing-your-scheduled-reminders)\n* [Managing scheduled reminders for your team](/en/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team)\n* [Managing scheduled reminders for your organization](/en/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization)"}