Skip to content

Code review comment line number problem. #30844

@lunny

Description

@lunny
Member

When comment on a previous commit of a pull request, the comment is in line number 39

image

But after two new commits pushed, the comment haven't been marked as outdated or hidden. The line number is still line 39 but now it should be line 58.

image

Activity

added
issue/criticalThis issue should be fixed ASAP. If it is a PR, the PR should be merged ASAP
on May 3, 2024
yp05327

yp05327 commented on May 7, 2024

@yp05327
Contributor

Can you provide the URL of these screenshots.

lunny

lunny commented on May 7, 2024

@lunny
MemberAuthor
metiftikci

metiftikci commented on May 23, 2024

@metiftikci
Member

related to #21113 ?

lunny

lunny commented on May 24, 2024

@lunny
MemberAuthor

Maybe different because there is no force push on https://gitea.com/gitea/blog/pulls/367/files

skarndev

skarndev commented on Jun 7, 2024

@skarndev

I am also experiencing this issue

yp05327

yp05327 commented on Jun 10, 2024

@yp05327
Contributor

This is because line is hard coded in DB, and this should be calculated dynamically.

So I think we need to consider a new flag (or generate from existing fields) to record the line.

lunny

lunny commented on Jun 24, 2025

@lunny
MemberAuthor

Looks like they are two parts. In the conversations of pull request, Github will always display the line number in that commit. Gitea has the same implementation as Github.

But in the files tab, Github will recalculate the line numbers once new commit pushed. And in the current Gitea's implementation, it seems old commit comments will not be displayed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

    No milestone

    Relationships

    None yet

      Development

      Participants

      @lunny@skarndev@yp05327@metiftikci

      Issue actions

        Code review comment line number problem. · Issue #30844 · go-gitea/gitea