-
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.
-
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 the GitHub user account that @zulipbot will use
password: "Password456" // Password456 is the password of the GitHub user account that @zulipbot will use
};
- Run the bot to ensure that your environment was configured correctly.
$ npm start
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.
Additionally, if you haven't done so already, you need to create a GitHub account for @zulipbot to use; the username and password of the account should be exactly the same as the ones that you specified in src/secrets.js
.
- Invite @zulipbot to collaborate on your repository.
- Change @zulipbot's permission level in the repository to Admin.
-
Add a webhook to your repository:
- 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.
If the web hook's payload was sent successfully, you have successfully installed and set up @zulipbot on your server! Congratulations! You can now begin using @zulipbot on your repository.
Need more help? Join us on the zulipbot stream on the Zulip development community server.