Skip to content

Issues & PRs Extensions

Forgejo 14.x does not provide native REST API endpoints for locking or unlocking issues and pull requests. The proxy adds these endpoints and maintains lock state in-process.

MethodEndpointDescription
PUT/api/v1/repos/{owner}/{repo}/issues/{index}/lockLock an issue
DELETE/api/v1/repos/{owner}/{repo}/issues/{index}/lockUnlock an issue
MethodEndpointDescription
PUT/api/v1/repos/{owner}/{repo}/pulls/{index}/lockLock a pull request
DELETE/api/v1/repos/{owner}/{repo}/pulls/{index}/lockUnlock a pull request
ParameterDescription
ownerRepository owner (user or organisation name)
repoRepository name
indexIssue or PR number (the #123 shown in the Forgejo UI)
Terminal window
# Lock issue #42
curl -X PUT -H 'Authorization: token YOUR_TOKEN' \
'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/issues/42/lock'
# Unlock issue #42
curl -X DELETE -H 'Authorization: token YOUR_TOKEN' \
'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/issues/42/lock'
# Lock pull request #7
curl -X PUT -H 'Authorization: token YOUR_TOKEN' \
'https://forgejo-proxy.hochguertel.work/api/v1/repos/myorg/myrepo/pulls/7/lock'

Both PUT and DELETE return 204 No Content on success, matching Forgejo’s conventional response for state-change operations.