Hide outdated comments in pull requests comparisons #2364

Closed
opened 2025-11-02 04:33:52 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @dkline on GitHub (Sep 28, 2018).

  • 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

Originally created by @dkline on GitHub (Sep 28, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - 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 <!-- **If this issue involves the Web Interface, please include a screenshot** --> Comment tab showing outdated comment on correct line of code: ![image](https://user-images.githubusercontent.com/806412/46227575-19857280-c30c-11e8-8dae-9a55d79add18.png) File changes tab showing outdated comment on incorrect line of code (and where the correct code would be in this case): ![image](https://user-images.githubusercontent.com/806412/46227729-90227000-c30c-11e8-8e8c-f1277ca3260b.png)
GiteaMirror added the type/bug label 2025-11-02 04:33:52 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2364