-
Notifications
You must be signed in to change notification settings - Fork 69
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.
Note: This page only discusses the aspects of zulipbot's custom configuration system. For information on how to modify comment templates, add new commands, etc., see Modification.
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.jsonand storing the credentials in the following format:{ "username": "examplebot", "password": "verysecurepassword0w0", "webhookSecret": "12345tgbj876tgvcdert" }
See Commands for descriptions about what each command does.
-
exports.issues.commands.assign.claim:- Type: Array<string>
-
Description: Aliases for which the
claimcommand can be activated.
-
exports.issues.commands.assign.abandon:- Type: Array<string>
-
Description: Aliases for which the
abandoncommand can be activated.
-
exports.issues.commands.assign.newContributors.permission:-
Type: String (
pull,push, oradmin) -
Description: Represents the repository permissions to give to new contributors claiming issues.
- Required if claiming issues is enabled.
-
Type: String (
-
exports.issues.commands.assign.newContributors.restricted:- Type: Number
- Description: Represents the maximum amount of issues new contributors (those that have not committed to a particular repository) can claim.
-
exports.issues.commands.label.add:- Type: Array<string>
-
Description: Aliases for which the
addcommand can be activated.
-
exports.issues.commands.label.remove:- Type: Array<string>
-
Description: Aliases for which the
removecommand 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.usersrepresents a group of users allowed to label others' issues, identified by their usernames.
-
-
Types:
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: Represents a dictionary matching labels (specified as keys) to team slugs (specified as values).
-
exports.issues.area.references- Type: Boolean
- Description: Whether or not to post comments on pull requests referencing area-labeled issues by matching keywords in commit descriptions.
-
exports.pullRequests.status.mergeConflicts:- Type: Boolean
-
Description: Whether or not to post a comment warning pull request authors when their pull request to
masterbranch develops merge conflicts.- Subject to
exports.eventsDelay.
- Subject to
-
exports.pullRequests.status.wip:- Type: String
- Description: Represents a string included in the title of a pull request to consider it as a work-in-progress (WIP); the pull requests' commits will not need to include proper issue references.
-
exports.pullRequests.status.size.labels:- Type: Map<string>
- Description: Represents a dictionary matching labels (specified as keys) to the minimum amount of changes required for the corresponding size label (specified as values). Map values should be sorted in ascending order.
-
exports.pullRequests.status.size.exclude:- Type: Array<string>
-
Description: Represents an array of file paths to exclude from size counts. Examples:
-
.jsexcludes all files with the.jsextension -
tests/excludes all files in the./frontend-tests/and./zerver-tests/folder -
index.jsexcludes any files namedindex.js
-
-
exports.pullRequests.references.required:- Type: String
- 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.
-
exports.pullRequests.references.required:- Type: Boolean
-
Description: Represents the label name that marks pull requests requiring notifications about the results of every Travis build the pull request undergoes.
-
Requires Travis webhooks to be configured to point to the
/travisendpoint of the server zulipbot is hosted on.
-
Requires Travis webhooks to be configured to point to the
Marks issues and pull requests with their current statuses. After a specified interval, assignees will be reminded to work on inactive issues, and pull request authors will be reminded to update reviewed pull requests.
-
exports.activity.inactive:- Type: String
- Description: Represents the label name that marks inactive pull requests and issues, preventing them from being checked for activity.
-
exports.activity.check.repositories:- Type: Array<string>
-
Description: Specifies which repositories (
owner/name) are active and require activity checks.
-
exports.activity.check.interval:- Type: Number
-
Description: Represents the delay (in hours) between each activity check across all specified repositories.
- To avoid rate limits, the specified number should be no less than 1.
-
exports.activity.check.reminder:- Type: Number
- Description: Represents the number of days since an issue or pull request was last updated before it is considered inactive, resulting in activity reminders.
-
exports.activity.check.limit:- Type: Number
- Description: Represents the number of days since an issue assignee was reminded to work on their inactive issue before a lack of activity results in the assignee's removal from the issue.
-
exports.activity.issues.inProgress:- Type: String
-
Description: Represents the label name that marks issues assigned to a collaborator for resolution.
- Note: This option needs to be specified for instances utilizing issue assigning and activity functions.
-
exports.activity.issues.clearClosed:- Type: Boolean
-
Description: Whether or not to remove
inProgresslabels and assignees from closed issues.- Subject to
exports.eventsDelay.
- Subject to
-
exports.activity.pullRequests.autoUpdate:- Type: Boolean
- Description: Whether or not to automatically update the labels on pull requests to match their estimated review state (reviewed or needing a review).
-
exports.activity.pullRequests.reviewed.label:- Type: String
-
Description: Represents the label name that marks pull requests as recently reviewed by a fellow collaborator. Added whenever a collaborator submits a review on the pull request if
exports.activity.pullRequests.autoUpdateis true.
-
exports.activity.pullRequests.reviewed.assignee:- Type: Boolean
- Description: Whether or not to automatically add all reviewers of a pull requests as assignees.
-
exports.activity.pullRequests.needsReview.label:- Type: String
-
Description: Represents the label name that marks pull requests as recently updated and requiring review. Added whenever the pull request author updates the base branch of the pull request if
exports.activity.pullRequests.autoUpdateis true..
-
exports.eventsDelay:- Type: Number
- Description: Represents the amount of seconds to delay certain responses.
Need more help? Join us on the zulipbot stream on the Zulip development community server.