Skip to content

Hide outdated comments in pull requests comparisons #4991

Closed
@dkline

Description

@dkline
  • Gitea version (or commit ref): 36e7cb9
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Steps to reproduce:

  • Make a PR
  • Add an inline comment to the PR
  • Update the code in the PR (update the same file and code area, throw some new lines at the top of the file as well to show the full issue.
  • Push the changes to the branch (my workflow uses rebases to squash the new commit and force push to branch)
  • View the PR in gitea
  • Note, the comment tab correctly hides the comments (they are there but collapsed and marked as outdated)
  • Looking at the files changed tab, the comments are still there, and are associated to the wrong line of code.

My suggested fix: Don't show any outdated comments on the PR diff.

Screenshots

Comment tab showing outdated comment on correct line of code:
image

File changes tab showing outdated comment on incorrect line of code (and where the correct code would be in this case):
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions