Mattermost GitHub Plugin
A GitHub plugin for Mattermost. The plugin is currently in beta.
Features
- Daily reminders - the first time you log in to Mattermost each day, get a post letting you know what issues and pull requests need your attention
- Notifications - get a direct message in Mattermost when omeone mentions you, requests your review, comments on or modifies one of your pull requests/issues, or assigns you on GitHub
- Sidebar buttons - stay up-to-date with how many reviews, unread messaages and open pull requests you have with buttons in the Mattermost sidebar
- Slash commands - interact with the GitHub plugin using the
/github
slash command- Subscribe to a respository - Use
/github subscribe
to subscribe a Mattermost channel to receive posts for new pull requests and/or issues in a GitHub repository - Get to do items - Use
/github todo
to get an ephemeral message with items to do in GitHub - Update settings - Use
/github settings
to update your settings for the plugin - And more! - Run
/github help
to see what else the slash command can do
- Subscribe to a respository - Use
- Supports GitHub Enterprise - Works with SaaS and Enteprise versions of GitHub
Installation
Requires Mattermost 5.2 or higher
If you're using GitHub enterprise, replace all GitHub links below with your GitHub Enterprise URL
- Install the plugin
- Download the latest version of the plugin from the GitHub releases page
- In Mattermost, go the System Console -> Plugins -> Management
- Upload the plugin
- Register a GitHub OAuth app
- Go to https://github.com/settings/applications/new
- Use "Mattermost GitHub Plugin - " as the name
- Use "https://github.com/mattermost/mattermost-plugin-github" as the homepage
- Use "https://your-mattermost-url.com/plugins/github/oauth/complete" as the authorization callback URL, replacing
https://your-mattermost-url.com
with your Mattermost URL - Submit and copy the Client ID and Secret
- In Mattermost, go to System Console -> Plugins -> GitHub
- Fill in the Client ID and Secret and save the settings
- Go to https://github.com/settings/applications/new
- Create a GitHub webhook
- In Mattermost, go to the System Console -> Plugins -> GitHub and copy the "Webhook Secret"
- Go to the settings page of your GitHub organization and click on "Webhooks" in the sidebar
- Click "Add webhook"
- Use "https://your-mattermost-url.com/plugins/github/webhook" as the payload URL, replacing
https://your-mattermost-url.com
with your Mattermost URL - Change content type to "application/json"
- Paste the webhook secret you copied before into the secret field
- Select the events: Issues, Issue comments, Pull requests, Pull request reviews, and Pull request review comments
- Save the webhook
- (Optional) Lock the plugin to a GitHub organization
- Go to System Console -> Plugins -> GitHub and set the GitHub Organization field to the name of your GitHub organization
- Enable the plugin
- Go to System Console -> Plugins -> Management and click "Enable" underneat the GitHub plugin
- Test it out
- In Mattermost, run the slash command
/github connect
- In Mattermost, run the slash command
Developing
This plugin contains both a server and web app portion.
Use make dist
to build distributions of the plugin that you can upload to a Mattermost server.
Use make check-style
to check the style.
Use make localdeploy
to deploy the plugin to your local server. You will need to restart the server to get the changes.