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

Forgejo and Gitea: why the review was refused

When you review a pull request through the API (POST /api/v1/repos/OWNER/REPO/pulls/NUMBER/reviews with event set to APPROVED, REQUEST_CHANGES or COMMENT), Forgejo and Gitea refuse with 422, and the JSON's message says why. All of this is from the source of both (CreatePullReview in routers/api/v1/repo/pull_review.go and SubmitReview in services/pull/review.go), read on October 24, 2026, including the Gitea releases where the wording changed.

422: the answers

Anyone who can read the repository's code may post a review: on a public repository, any signed-in account. A token that may only read is refused with 403, and the answer says token does not have at least one of required scope(s); see which permission to add. A pull request number that does not exist answers 404; see missing, private or renamed.

Accepted, but it does not count

An approval that went through counts towards the branch's Required approvals only when all of these hold:

Each person's latest approval or request for changes is the one that counts.

Where it stands

curl -H "Authorization: token your-token" https://codeberg.org/api/v1/repos/OWNER/REPO/pulls/42/reviews

Each review has state (APPROVED, REQUEST_CHANGES, COMMENT, PENDING for a draft), commit_id, official, stale and dismissed. The target branch (GET /api/v1/repos/OWNER/REPO/branches/main) has protected and required_approvals. 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, approves or requests changes on the head commit you had on screen; when the branch has moved since, it sends nothing and says to refresh. Requesting changes asks first what should change, because both servers need it. When the server refuses a review, it shows the server's words, such as "approve your own pull is not allowed"; for a token that may only read, it names the scopes to create the token with. Its merge checks count the official approvals against the number the branch requires, and its list of reviewers marks a review made on an earlier commit. Reading is free; approving, commenting 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) · "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 branch update refused (403, 409, 422) · Forgejo and Gitea pull request not created (409, 422, 403) · Forgejo and Gitea comment refused (403, 422, 400) · 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 · 日本語