Lesstep
Forgejo · Gitea · Codeberg · comments API · Checked October 24, 2026

Forgejo and Gitea: why the comment was refused

A comment on a pull request's conversation (POST /api/v1/repos/OWNER/REPO/issues/NUMBER/comments with body), a comment on lines of the diff (sent in a review: POST …/pulls/NUMBER/reviews with comments), a reply and resolving a conversation can be refused with 403, 422 or 400. All of this is from the source of both (CreateIssueComment in routers/api/v1/repo/issue_comment.go, Forgejo's ReqIssueUnlockedOrCanWrite, CreatePullReview and the reply and resolve calls in routers/api/v1/repo/pull_review.go, and services/pull/review.go), read on October 24, 2026, with Forgejo's release branches up to v17.0 and Gitea's up to 1.27.

The answers

Forgejo's releases (up to v17.0) have no call to reply to a comment on lines or to resolve a conversation. A token without permission to write to issues is refused with 403 too, but that answer says token does not have at least one of required scope(s); see which permission to add. A pull request that does not exist, or that you cannot see, answers 404; see missing, private or renamed.

Where it stands

curl -H "Authorization: token your-token" https://codeberg.org/api/v1/repos/OWNER/REPO/issues/7

"is_locked": true means the conversation is locked. The same call works for a pull request, by its number. Use your own server's address instead of codeberg.org.

What to do

Forgejo and Gitea pull requests in IntelliJ IDEA

Pull Request Inbox for Forgejo and Gitea, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, comments on the conversation and on lines of the diff, and replies in a thread: with Gitea's reply call where the server has it, otherwise in the same conversation, the way the server's own page does. It resolves conversations with Gitea's call; on Forgejo, it says that the server has no such call and to resolve it on the pull request's page. Refusals are shown with the server's words; from version 1.0.16, a comment refused because the conversation is locked, or because your account is blocked, says so instead of pointing at your permissions. Reading is free; commenting, approving and merging are Pro (US$1.50 a month, with a 30-day trial).

Forgejo, Gitea and Codeberg are names of their respective owners; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by the Forgejo project, Codeberg e.V., the Gitea project or JetBrains.

More: Forgejo and Gitea merge refused (405, 409) · Forgejo and Gitea review refused (422) · Forgejo and Gitea branch update refused (403, 409, 422) · Forgejo and Gitea pull request not created (409, 422, 403) · "token does not have at least one of required scope(s)" · 401 "token is required" and unknown tokens · 404 "The target couldn't be found." and "not found" · Forgejo and Gitea search refused (400, 422) · Forgejo and Gitea pull request files (pages of 50, changed_files) · Forgejo and Gitea pull request plugins for IntelliJ IDEA, compared · 日本語