GitHub Integration for Rocket.Chat
The GitHub Rocket.Chat App provides a seamless integration between GitHub and Rocket.Chat and improves collaboration between developers. The application allows users to search and share Issues and Pull Request, Subscribe to Repository Events, create New Issues, Review and Merge Pull Requests and do much more right from Rocket.Chat.
🚀 Features 🚀
- Quick and Easy Setup
- Login to GitHub with one click using built-in OAth2 mechanism
- Subscribe to Repository Events and get notified about new issues, pull requests, code pushes etc
- Review and Merge Pull Requests right from Rocket.Chat Channels
- Create new Issues from Rocket.Chat
- Search Issues and Pull Request using extensive filters and share them on Rocket.Chat
💡 Usage 💡
Open Main Modal for Quick Access to Different Features
To open the main modal and access various features, use the command: /github
.
Main Modal Features:
- Quick access to GitHub search
- Create new issues
- Manage repository subscriptions
- Assign issues to users
The app can be accessed with any of the following slash commands: /gh
or /github
.
Command List
- See Helper Message / Command List →
/github help
- Login to GitHub →
/github login
- Logout from GitHub →
/github logout
- View your GitHub Profile and Issues →
/github me
- View/Add/Delete/Update Repository Subscriptions →
/github subscribe
- Subscribe to all repository events →
/github Username/RepositoryName subscribe
- Unsubscribe to all repository events →
/github Username/RepositoryName unsubscribe
- Add New Issues to GitHub Repository →
/github issue
- Search Issues and Pull Request →
/github search
- Assign and Share GitHub issues →
/github issues
- Review a Pull Request →
/github Username/RepositoryName pulls pullNumber
- See Interactive Button interface to fetch repository data →
/github Username/RepositoryName
- Get details of a Repository →
/github Username/RepositoryName repo
- Get Issues of a Repository →
/github Username/RepositoryName issues
- Get Contributors of a Repository →
/github Username/RepositoryName contributors
- Get Recent Pull Request of a Repository →
/github Username/RepositoryName pulls
- Add a new repository for pull request review reminders -> /github reminder create
- Get a list of repositories for which you've set up pull request review reminders -> /github reminder list
🚀 Contributing 🚀
:desktop_computer: Quick Setup :desktop_computer:
Gitpod 🍊
Start developing and make changes to your code via a single click Anytime-Anywhere!
Using Thrust for quickly setup your Rocket.Chat workspace & hot-reload for develping and deploying Github App, no need to worry about setting up any Rocket.Chat server before hand.
Manual Setup 🐳
- Rocket.Chat Apps Run on a Rocket.Chat server. If you dont have a server setup, please go through this setup and setup a development environment and setup you server
- To start with development on Rocket.Chat Apps, you need to install the Rocket.Chat Apps Engline CLI. Enter the following commands :
```
npm install -g @rocket.chat/apps-cli
```
Check if the CLI has been installed
```
rc-apps -v
# @rocket.chat/apps-cli/1.4.0 darwin-x64 node-v10.15.3
```
- Clone the GitHub Repository
```
git clone https://github.com/RocketChat/Apps.Github22
```
- Enter the App.Github22 directory and install dependecies
```
cd Apps.Github22
cd github
npm install
```
- In order to install Rocket.Chat Apps on your development server, the server must be in development mode. Enable Apps development mode by navigating to Administration > General > Apps and click on the True radio button over the Enable development mode..
- Build and Upload your application by running the following inside the apps directory (/App.Github22/github)
```
rc-apps deploy --url http://localhost:3000 --username --password
```
Where:
http://localhost:3000 is your local server URL (if you are running in another port, change the 3000 to the appropriate port).
`username` is the username of your admin user.
`password` is the password of your admin user.
If you want to update the app deployed in your Rocket.Chat instance after making changes to it, you can run:
```
rc-apps deploy --url http://localhost:3000 --username user_username --password user_password --update
```
The Application is now installed on the server. You can verify this by checking the installed applications from the administration panel.
Enter /github
or /github help
in the message input box of any channel on the server to know about different features and how to trigger them using different slash commands.
:desktop_computer: Application Setup :desktop_computer:
The GitHub App uses the GitHub OAth2 and you must setup a GitHub OAuth App to unlock the full potential of the GitHub App.
- The First Step is to setup a GitHub Oauth2 App. To setup the GitHub Oauth App Follow These Steps
-
The callback URL must be set to the url of your server as shown below. (Note : There is an issue of trailing slashes with RocketChat OathClient, so incase the authentication does not work, go to Administration Panel and try removing the trailing '/' at the end of the hosted url. This issue might not occur as it will be fixed in the future.)
-
Once the GitHub OAuth app is setup, open the GitHub Application Settings and enter the GitHub App OAuth Client Id and Client Secret over here.
The users can login to GitHub by entering the slash command /github login
and then clicking on the Login
button.
Users are logged out after a week but the users can also logout at any time by entering /github logout
.