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

Allow non-admin users to delete review requests #29057

Merged
merged 31 commits into from
Feb 24, 2024

Conversation

Zettat123
Copy link
Contributor

@Zettat123 Zettat123 commented Feb 5, 2024

Fix #14459

The following users can add/remove review requests of a PR

  • the poster of the PR
  • the owner or collaborators of the repository
  • members with read permission on the pull requests unit

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 5, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 5, 2024
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 6, 2024
@Zettat123 Zettat123 marked this pull request as ready for review February 6, 2024 10:11
@Zettat123 Zettat123 changed the title WIP: Allow non-admin users to delete review requests Allow non-admin users to delete review requests Feb 6, 2024
@lunny lunny added the backport/v1.21 This PR should be backported to Gitea 1.21 label Feb 6, 2024
@lunny lunny added this to the 1.22.0 milestone Feb 6, 2024
@KN4CK3R
Copy link
Member

KN4CK3R commented Feb 6, 2024

Could you create tests for the api calls which test the behaviour?

@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 7, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 17, 2024
@lunny lunny requested a review from wolfogre February 19, 2024 09:47
@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 Feb 20, 2024
@wolfogre
Copy link
Member

BTW, I think it's a design change (even somewhat breaking) instead of bug fixing. I'm not sure if it's a good idea to backport it.

@lunny lunny removed the backport/v1.21 This PR should be backported to Gitea 1.21 label Feb 20, 2024
@delvh delvh added type/enhancement An improvement of existing functionality and removed type/bug labels Feb 20, 2024
@delvh
Copy link
Member

delvh commented Feb 20, 2024

members with read permission on the pull requests unit

Erm… read?
Why not write?

@Zettat123
Copy link
Contributor Author

members with read permission on the pull requests unit

Erm… read? Why not write?

In my view, a user who can read the PR is also likely to know who should/shouldn't review the PR. Also, I followed @lunny 's idea in #14459 (comment) where the read permission was mentioned. So I only check the read permission here.

@lunny
Copy link
Member

lunny commented Feb 21, 2024

members with read permission on the pull requests unit

Erm… read?

Why not write?

Read permission of issue or pr units can create issue or pr.

@silverwind
Copy link
Member

Ready for merge?

@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 24, 2024
@lunny lunny enabled auto-merge (squash) February 24, 2024 11:36
@lunny lunny merged commit c42083a into go-gitea:main Feb 24, 2024
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 24, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete review requests as non-admin
7 participants