Skip to content

Improve code review comments #35077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented Jul 14, 2025

Fix #30844
Fix #29715
Fix #21113
Fix #31551

  • Code review comments now support cross-commit referencing as long as the line still exists in the updated diff. Line numbers are dynamically calculated.
  • Fixed a bug where force-pushing or rebasing the target branch could result in the merged commit IDs of the pull request being garbage collected and lost.
  • Fixed an issue where deleting the last comment in a review would still leave the review listed in the pull request’s activity timeline.
  • Fixed a bug where attachments linked to a code review comment were not deleted when the comment itself was removed.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 14, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/migrations labels Jul 14, 2025
@lunny lunny force-pushed the lunny/code_review_line_number branch from ff37d02 to fd82a60 Compare July 15, 2025 19:49
@lunny lunny force-pushed the lunny/code_review_line_number branch from fd82a60 to 791339a Compare July 15, 2025 23:36
@@ -730,28 +730,23 @@ func prepareIssueViewCommentsAndSidebarParticipants(ctx *context.Context, issue
}
comment.Review.Reviewer = user_model.NewGhostUser()
}
if err = comment.Review.LoadCodeComments(ctx); err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicated with LoadAttributes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/frontend modifies/go Pull requests that update Go code modifies/migrations modifies/templates This PR modifies the template files
Projects
None yet
2 participants