-
Notifications
You must be signed in to change notification settings - Fork 65
Installation
In the instructions below, your copy of the zulipbot software will be referred to as @zulipbot.
Before you get started, make sure you have:
- installed and configured Git on your local machine
- installed Node.js (v7.6.0 <= version < 9.0.0) and npm (version >= 4.2.0)
- created a GitHub user account for @zulipbot to use
- invited @zulipbot's user account to collaborate on your repository, changing its permission level in the repository to Admin.
In order to receive events from GitHub, @zulipbot must be running on a server. We recommend using Heroku or Amazon Web Services (AWS) for hosting your copy of @zulipbot, since both services offer free plans to their consumers. You can choose to host your copy of @zulipbot locally, but it is highly discouraged.
Once you have secured a server for @zulipbot to operate on, add a repository webhook to @zulipbot's server:
- Enter your server's URL in the Payload URL field.
- Set the Content type field to
application/json
. - Set the Secret field to a secure token that will be used to validate webhook payloads from GitHub. Read the GitHub webhook documentation for more information.
- Select the "Send me everything." option in the Which events would you like to trigger this webhook? field.
-
Open your command line interface (CLI).
-
Download the latest release or clone this repository to your local machine.
$ git clone https://github.com/zulip/zulipbot.git
- Switch to the local copy of this repository.
$ cd ~/path-to-repo/zulipbot
- Install the necessary node packages and dependencies. Any
npm WARN
warnings can be safely ignored.
$ npm install
- Create two files in the
src
folder: one file namedconfig.js
, the other namedsecrets.json
.
$ touch src/config.js
$ touch src/secrets.json`
-
Open
/src/config.js
in your preferred text editor. -
Edit the contents of
/src/config.js
, using/src/zulip_project.config.js
as a guide; visit the Configuration page for more details. -
Once you are finished modifying
/src/config.js
, runtools/configLint
to check if your configuration file was set up properly.
$ tools/configLint
-
Open
/src/secrets.json
in your preferred text editor. -
Edit the contents of
/src/secrets.json
as follows:
{
"username": "Username123",
"password": "Password456",
"webhookSecret": "abc123def456"
}
where username
is the username of @zulipbot's GitHub user account, password
is the password of @zulipbot's GitHub user account, and webhookSecret
is the value of the secret token that you previously used to configure your GitHub webhook.
- Run the bot to ensure that your environment was configured correctly.
$ npm start
Congratulations, you have finished the installation of @zulipbot! You can now begin using @zulipbot to manage your repository.
Need more help? Join us on the zulipbot stream on the Zulip development community server.