Skip to content
Source
Sign inSign up

Lock a conversation

Issues and pull requests / Issues

Lock a heated conversation

A thread on an issue turns heated, and new comments only add to the fight. Lock the conversation: everyone can still read it, and only people with write access can comment.

2 min read

You need write access to the repository: the write, maintain or admin role.

1. Lock the conversation

  1. Open the issue.
  2. In the sidebar, click Lock conversation.
  3. In Reason (optional), pick a reason, or keep No reason.
  4. Click Lock conversation.

In a terminal, run:

src issue lock 12 --reason too_heated

A reason is off_topic, resolved, spam or too_heated.

Tip

A pull request locks the same way: the same button in its sidebar, or src pr lock 7.

2. Unlock it later

When the thread can open again, click Unlock conversation in the sidebar. In a terminal, run:

src issue unlock 12

Done

  • A locked issue says why it is locked.
  • Everyone who can read the issue still reads it. Only people with write access can comment.
  • Agents and CI jobs cannot comment on a locked conversation, whatever their role.
  • The timeline of the issue shows who locked it.

Later: REST and MCP

An agent or a script locks a conversation with the same rules. The REST path is under /api/v1/repos/{owner}/{repo}.

You want toRESTMCP tool
Lock or unlockPUT or DELETE /issues/{n}/lock, with { "reason" }lock_issue, unlock_issue

Use the REST API has the other routes.