-
Notifications
You must be signed in to change notification settings - Fork 65
Installation
In the instructions below, your copy of zulipbot 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 (version >= v7.4.0) and npm (version >= 4.3.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.
If
joinEnabled
is enabled insrc/config.js
, you will also need to invite @zulipbot's user account to your organization and change its permission level to Owner.
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
. - 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.js
.
$ touch src/config.js
$ touch src/secrets.js
-
Open
src/config.js
in your preferred text editor. -
Edit the contents of
src/config.js
, usingsrc/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.js
in your preferred text editor. -
Edit the contents of
src/secrets.js
as follows:
module.exports = {
username: "Username123", // Username123 is the username of @zulipbot's GitHub user account
password: "Password456" // Password456 is the password of @zulipbot's GitHub user account
};
- 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.