gitea
gitea copied to clipboard
Delete review requests as non-admin
- Gitea version (or commit ref): 1.14
- Can you reproduce the bug at https://try.gitea.io:
- [X] Yes
Description
When I request a review, I am not able to delete this review request if I am no administrator. I would expect at least to be able to delete a review request I created myself in case I selected the wrong person by accident. But I think even someone else should be able to delete the review request as well. Everyone that can add reviewers should also be able to delete them in my opinion?
Screenshots
I add a review request:
But I cannot delete it:
Unless when I am admin:
That's follow github style. see: https://github.com/go-gitea/gitea/pull/10756#discussion_r396892580
That's follow github style. see: #10756 (comment)
My understanding may be wrong. But to me it seems like the comment refers to review requests that have already been processed, i.e. approved or rejected by the reviewer. This issue mentions a pending review request.
I agree with jpraet that the person who requested the review should be able to delete the review request as long as it's not more than a request. What would be the reason do deny this?
I want to create a PR to allow the person who requested the review to be able to delete the review request. But it looks like I cannot easily determine the author of the review request. It's not stored in the review table.
Would a PR get accepted that allows review request deletion to anyone that has permission to add review requests?
Any news on this? Just landed here and would support such a change. @jpraet did you ever hear back from anyone?
Maybe we can accept the person himself could remove the review request? Or everyone who have write permission to pull request could do that since the removal will be recorded in the comment timeline.
everyone who have write permission to pull request could do that
That would totally suffice and was indeed what I had expected. And you could even restrict this to reviews that have not yet started. Our use case would be to assign a different reviewer if the originally requested reviewer is not available (e.g. vacation).
Looks like the code is there, but I don't know whether there are some bugs.
https://github.com/go-gitea/gitea/blob/main/routers/web/repo/issue.go#L634-L644
this would be great, i have opened a pr in gitea, accidentally assigned a reviewer, then i cannot remove the reviewer,
i have had pr's get stuck because i added a reviewer who may be away from their computer for a long time and this completly blocks the merge (merge when all checks pass but an accidentally requested reviewer will always block)
Looks like the code is there, but I don't know whether there are some bugs.
https://github.com/go-gitea/gitea/blob/main/routers/web/repo/issue.go#L634-L644
https://github.com/go-gitea/gitea/blob/e962ade99cfd0471273f3dcf956c7cd222472758/routers/web/repo/issue.go#L634-L644
Which part of that code should allow me to remove a reviewer as long as I'm able to add it back?
The actual validation check seems to be in IsValidReviewRequest()
at https://github.com/go-gitea/gitea/blob/main/services/issue/assignee.go#L157 (called from UpdatePullReviewRequest()
at https://github.com/go-gitea/gitea/blob/main/routers/web/repo/issue.go#L2475), and only allows you to remove yourself, unless you're an admin.
This seems unnecessarily restrictive to me too.
How about everyone who is a member of that repository with read-permissions can add/remove reviewer requests of every pull requests and the PR creators can also do that for their created PRs? If nobody against, I will send a PR to fix that.
I think that is a good idea, if you opened the PR and you assigned someone, you should have the ability to remove them.
On Fri, Feb 2, 2024 at 4:55 AM Lunny Xiao @.***> wrote:
How about everyone who is a member of that repository with read-permissions can add/remove reviewer requests of every pull requests and the PR creators can also do that for their created PRs? If nobody against, I will send a PR to fix that.
— Reply to this email directly, view it on GitHub https://github.com/go-gitea/gitea/issues/14459#issuecomment-1923749566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBKWM3VLX6BFUYCH3Z2JKDYRTO5NAVCNFSM4WSG5AY2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJSGM3TIOJVGY3A . You are receiving this because you commented.Message ID: @.***>