Skip to content

Locked out of the ability to comment on the code of a PR sometimes #12239

Closed
@parnic-sks

Description

@parnic-sks

Description

We are using Gitea on a small team (5 programmers) and fairly regularly run into a case where the "Files Changed" tab on a pull request is no longer accessible with some variation on this error message:

1.12.2:

template: repo/diff/box:152:65: executing "repo/diff/box" at <0>: nil pointer evaluating *models.Review.Type

1.12.1:

template: repo/diff/section_unified:28:53: executing "repo/diff/section_unified" at <0>: nil pointer evaluating *models.Review.Type

We have sometimes been able to find the offending comment in the database and update its Review ID to the appropriate ID. This gets difficult when a lot of comments have been made on other PRs between noticing the problem and trying to fix it.

We don't have a specific reproduction case that triggers this, but in general it seems it is sometimes possible to fail to assign the appropriate review ID in a comment which then breaks the ability to review changes line-by-line on a given PR.

Screenshots

Nothing to show, really, since it's just an error. Loading the Files Changed tab attempts to GET /org/repo/pulls/:pull_id/files, which returns 500 and the above error as plain text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/criticalThis issue should be fixed ASAP. If it is a PR, the PR should be merged ASAPtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions