Lock Pull Request

Automatically lock pull requests when they are closed.

Quick Start

The Lock Pull Request bot automatically locks the conversation when a pull request is closed. Optionally the bot can also post a comment to the pull request first, giving you an opportunity to explain why the conversation is locked.

Placing the following configuration in .devbots/lock-pull-request.yml in your repository will instruct the bot to post a comment to the pull request and then lock the conversation.

enabled: true
comment: >
  This pull request's conversation is
  now locked. If you want to continue
  this discussion or file a bug, please
  open a new issue.

Configuration

The Lock Pull Request bot automatically locks the conversation when a pull request is closed. When a conversation is locked, only collaborators can add comments to it. Optionally the bot can also post a comment to the pull request first, giving you an opportunity to explain to contributors why the conversation is locked.

enabled boolean whether the bot is active or not
comment string the comment to add before the conversation is locked

The comment option may contain GitHub MarkDown and emojis.

Examples

Immediately locking the conversation

Placing the following configuration in .devbots/lock-issue.yml will make the bot immediately lock the conversation as soon as the pull request is closed.

enabled: true

Posting a comment before locking the conversation

Placing the following configuration in .devbots/lock-issue.yml will make the bot first post a comment and then lock the conversation when the pull request is closed.

enabled: true
comment: >
  This pull request's conversation has been locked. Please
  file a [new issue](/user/project/issues/new) if you would
  like to continue the discussion.