Skip to content

Configuration

Cynthia Lin edited this page Dec 14, 2017 · 32 revisions
Configuration

zulipbot supports custom configuration so project maintainers can enable or disable available features to support their various needs.

The configuration files are located in the ./config folder. ./config/default.js is the default configuration file and should be modified under no circumstances; instead, to modify the zulipbot configuration, simply modify the values of the configuration objects in ./config/config.js.

Take a look at the Zulip project configuration file to see an example of a configuration file.

Authentication

Currently, the zulipbot client can only use basic authentication (username and password) to gain access to a user account. These credentials, along with the webhook secret, can be specified in two ways:

  • By setting them as Node environment variables (USERNAME, PASSWORD, WEBHOOK_SECRET)
  • By creating a file named ./config/secrets.json and storing the credentials in the following format:
    {
      "username": "examplebot",
      "password": "verysecurepassword0w0",
      "webhookSecret": "12345tgbj876tgvcdert"
    }
    

Issues

Commands

See Commands for descriptions about what each command does.

  • exports.issues.commands.assign.claim.aliases:
    • Type: Array<string>
    • Description: Aliases for which the claim command can be activated.
  • exports.issues.commands.assign.claim.permission:
    • Type: String (pull, push, or admin)
    • Description: Repository permission to give to new contributors claiming issues.
      • Required if claiming issues is enabled.
  • exports.issues.commands.label.add.aliases:
    • Type: Array<string>
    • Description: Aliases for which the add command can be activated.
  • exports.issues.commands.label.remove.aliases:
    • Type: Array<string>
    • Description: Aliases for which the remove command can be activated.
  • exports.issues.commands.label.self:
    • Types:
      • Boolean
      • Object:
        • users: Array<string>
    • Description: Whether or not users should be allowed to change the labels of issues that they did not create.
      • exports.issues.commands.label.self.users represents a group of users allowed to label others' issues, identified by their usernames.

Area label system

Creates a network of "area" labels and GitHub teams to notify contributors about new issues within their fields of expertise.

  • exports.issues.area.labels:
    • Type: Map<string>
    • Description: Dictionary matching labels (specified as keys) to team slugs (specified as values).
  • exports.issues.area.commitReferences
    • Type: Boolean
    • Description: Whether or not to warn users that open pull requests referencing issues with keywords in their pull request descriptions but not their commits, preventing issues from staying open when a pull request's commits are committed but not merged.

Pull requests

  • exports.pullRequests.mergeConflicts:
    • Type: Boolean
    • Description: Whether or not to post a comment warning pull request authors when their pull request to master branch develops merge conflicts.
      • Subject to exports.eventsDelay.
  • exports.pullRequests.wip:
    • Type: String
    • Description: If the specified string is included in the title of a pull request, the pull request will be considered as a work-in-progress (WIP) and commits will not need to include proper issue references.
  • exports.pullRequests.travis:
    • Type: String
    • Description: If the specified string is labeled on a pull request, the pull request author will be notified about the results of every Travis build the pull request undergoes.
      • Requires Travis webhooks to be configured to point to the /travis endpoint of the server zulipbot is hosted on.

Clone this wiki locally