PUT
/repos/{owner}/{repo}/issues/{issue_number}/lockLock an issue conversation
Locks the conversation on an issue or pull request in a repository. Optionally provide lock_reason to explain why the conversation is locked; if you omit the request body, send a zero Content-Length header. Users with push access can perform this operation.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
issue_numberintegerrequired
The integer that identifies the issue or pull request to lock.
Optional lock configuration for the issue or pull request conversation.
lock_reasonstringoptional
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`
204Confirms that the issue or pull request conversation was locked successfully.
403Returned when the authenticated user does not have permission to lock the conversation.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when the repository or issue cannot be found.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
410Returned when the requested resource is no longer available.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Returned when validation fails or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 403 is returned when the authenticated user does not have permission to lock the conversation. A 404 is returned when the repository or issue cannot be found, and a 410 is returned when the resource is no longer available. A 422 is returned when validation fails or the endpoint has been spammed; lock_reason must be one of off-topic, too heated, resolved, or spam when provided.