v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
issues

Lock an issue

Users with push access can lock an issue or pull request's conversation.

Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP method."

put/repos/{owner}/{repo}/issues/{issue_number}/lock

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

issue_numberinteger required

The number that identifies the issue.

Request body

lock_reason'off-topic' | 'too heated' | 'resolved' | 'spam'

The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:

  • off-topic
  • too heated
  • resolved
  • spam

Response

Response