Skip to content
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

Load reviewer for comments when dismissing a review (#24281) #24288

Merged

Conversation

GiteaBot
Copy link
Contributor

Backport #24281 by @wolfogre

If a comment dismisses a review, we need to load the reviewer to show whose review has been dismissed.

Related to:

{{if eq .Review.OriginalAuthor ""}}
{{$reviewerName = .Review.Reviewer.Name}}
{{else}}
{{$reviewerName = .Review.OriginalAuthor}}
{{end}}
{{$.locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr | Safe}}

Steps to reproduce the bug:
  1. Open a PR.
  2. Submit a review to the PR.
  3. Dismiss the review.
image 4. Then image

We doesn't need .Review.Reviewer for all comments, because "dismissing" doesn't happen often, or we would have already received error reports.

If a comment dismisses a review, we need to load the reviewer to show
whose review has been dismissed.

Related to:

https://github.com/go-gitea/gitea/blob/20b6ae0e5399cfc22c6a0989d8e520194e920bdd/templates/repo/issue/view_content/comments.tmpl#L765-L770

We don't need `.Review.Reviewer` for all comments, because
"dismissing" doesn't happen often, or we would have already received
error reports.
@GiteaBot GiteaBot added this to the 1.19.2 milestone Apr 23, 2023
@GiteaBot GiteaBot requested review from delvh and lunny April 23, 2023 15:04
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 23, 2023
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 23, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 23, 2023
@delvh delvh added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 23, 2023
@techknowlogick techknowlogick merged commit 7e86dff into go-gitea:release/v1.19 Apr 23, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 23, 2023
@techknowlogick techknowlogick deleted the backport-24281-v1.19 branch April 23, 2023 16:45
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants