Skip to content

Commands

Cynthia Lin edited this page Jan 13, 2018 · 24 revisions
Commands

This is a list of the commands that zulipbot currently supports.

  • Commands edited to be included in a comment/description will not work.
    • The lack of support for edited comments/descriptions is a result of an inconsistency in the GitHub API.
  • Commands within code blocks (inline and multiline alike) will be ignored.
  • zulipbot supports customizable case-sensitive, alphanumeric command aliases, which can be created by modifying the configuration file (./config/config.js). All commands are disabled by default.

Format

@username command "multiple" "arguments"

  • username — The username that zulipbot is authenticated as.
  • command — The specified command that will trigger a response or action from zulipbot.
    • Note: Since the default configuration disables all commands, commands are referred to their object keys in the configuration files ("claim", "abandon", "add", "remove").
  • "multiple" "arguments" — The arguments for commands are surrounded with double quotes ("); only certain commands require arguments.

Commands

@username claim

Assigns the commenter to an issue (or issue creator if included in an issue description). Works in issue comments and issue descriptions.

  • Gives new contributors repository permissions based on the exports.issues.commands.assign.newContributors.permission string configured in ./config/config.js; either pull, push, or admin must be specified.
  • If exports.issues.commands.assign.newContributors.restricted is defined as an integer in ./config/config.js, new contributors (those that have not previously committed to the issue's repository) are limited to claiming that amount of issues at a time.
  • If exports.inactivity.issues.inProgress is defined as a string in ./config/config.js, a label with the value of inProgress will be added to the claimed issue.
  • Command aliases are created by modifying the strings in the exports.issues.commands.assign.claim array in ./config/config.js.

@username abandon

Unassigns the commenter from an issue. Works in issue/pull request comments.

  • If exports.inactivity.issues.inProgress is defined as a string in ./config/config.js, a label with the value of inProgress will be removed from the issue/pull request.
  • Command aliases are created by modifying the strings in the exports.issues.commands.assign.abandon array in ./config/config.js.

@username add "label name"

Adds existing repository labels to issues and pull requests. Works in issue descriptions and issue/pull request comments.

  • Attempts to add nonexistent repository labels to an issue/pull request will result in an error message.
  • Configure the exports.issues.commands.label.self boolean in ./config/config.js to only allow issue/pull request creators to label their own issues/pull requests.
  • Command aliases are created by modifying the strings in the exports.issues.commands.label.add array in ./config/config.js.

@username remove "label name"

Removes labels from issues and pull requests. Works in issue descriptions and issue/pull request comments.

  • Attempts to remove invalid labels from an issue/pull request will result in an error message.
  • Configure the exports.issues.commands.label.self boolean in ./config/config.js to only allow issue/pull request creators to remove labels from their own issues/pull requests.
  • Command aliases are created by modifying the strings in the exports.issues.commands.label.remove array in ./config/config.js.