Delete review requests as non-admin #6751

Closed
opened 2025-11-02 07:05:31 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @jpraet on GitHub (Jan 25, 2021).

Originally assigned to: @lunny on GitHub.

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:

image

But I cannot delete it:

image

Unless when I am admin:

image

Originally created by @jpraet on GitHub (Jan 25, 2021). Originally assigned to: @lunny on GitHub. - 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: ![image](https://user-images.githubusercontent.com/2212615/105752677-e38e4280-5f47-11eb-99c9-918c1bb1532c.png) But I cannot delete it: ![image](https://user-images.githubusercontent.com/2212615/105752748-facd3000-5f47-11eb-9bfa-352d3b0a9ab9.png) Unless when I am admin: ![image](https://user-images.githubusercontent.com/2212615/105752823-0e789680-5f48-11eb-9d51-3858e342d377.png)
GiteaMirror added the type/proposaltype/bug labels 2025-11-02 07:05:31 -06:00
Author
Owner

@a1012112796 commented on GitHub (Jan 26, 2021):

That's follow github style.
see:
https://github.com/go-gitea/gitea/pull/10756#discussion_r396892580

@a1012112796 commented on GitHub (Jan 26, 2021): That's follow github style. see: https://github.com/go-gitea/gitea/pull/10756#discussion_r396892580
Author
Owner

@PaulBol commented on GitHub (Dec 9, 2022):

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?

@PaulBol commented on GitHub (Dec 9, 2022): > That's follow github style. see: [#10756 (comment)](https://github.com/go-gitea/gitea/pull/10756#discussion_r396892580) 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?
Author
Owner

@jpraet commented on GitHub (Jan 14, 2023):

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?

@jpraet commented on GitHub (Jan 14, 2023): 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?
Author
Owner

@jbartlau commented on GitHub (May 8, 2023):

Any news on this? Just landed here and would support such a change. @jpraet did you ever hear back from anyone?

@jbartlau commented on GitHub (May 8, 2023): Any news on this? Just landed here and would support such a change. @jpraet did you ever hear back from anyone?
Author
Owner

@lunny commented on GitHub (May 8, 2023):

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.

@lunny commented on GitHub (May 8, 2023): 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.
Author
Owner

@jbartlau commented on GitHub (May 8, 2023):

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).

@jbartlau commented on GitHub (May 8, 2023): >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).
Author
Owner

@lunny commented on GitHub (May 9, 2023):

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

@lunny commented on GitHub (May 9, 2023): 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
Author
Owner

@KevinBaileyCrum commented on GitHub (Jul 6, 2023):

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)

@KevinBaileyCrum commented on GitHub (Jul 6, 2023): 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)
Author
Owner

@aleb commented on GitHub (Sep 22, 2023):

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

e962ade99c/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?

@aleb commented on GitHub (Sep 22, 2023): > 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?
Author
Owner

@hawicz commented on GitHub (Jan 31, 2024):

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.

@hawicz commented on GitHub (Jan 31, 2024): 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.
Author
Owner

@lunny commented on GitHub (Feb 2, 2024):

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.

@lunny commented on GitHub (Feb 2, 2024): 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.
Author
Owner

@KevinBaileyCrum commented on GitHub (Feb 2, 2024):

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:
@.***>

@KevinBaileyCrum commented on GitHub (Feb 2, 2024): 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: > ***@***.***> >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6751