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

Add review requested filter on pull request overview #13701

Merged
merged 14 commits into from
Jan 17, 2021

Conversation

jpraet
Copy link
Member

@jpraet jpraet commented Nov 25, 2020

Fixes #13682

This adds a filter on the pull request overview pages that allows you to find the pull requests that are requesting your review.

  • Is the name "Review Requested" for the filter OK? On GitHub it is called "Review Requests". Most clear is probably something like "Requesting your review", which is consistent in phrasing with the existing "Mentioning you" filter. What do you think?
  • Review requests records are not deleted once the review has taken place, so in the query I had to add a subselect to only take the last review record into account. I worry a bit about performance impact? Is there a better way?
  • With [API] Add more filters to issues search #13514 the existing "created", "assigned" and "mentioned" issue filters were made available through the API as well. Would you like me to add API support for the "review_requested" filter as well?

@codecov-io
Copy link

codecov-io commented Nov 25, 2020

Codecov Report

Merging #13701 (85d2668) into master (872d308) will increase coverage by 0.00%.
The diff coverage is 67.96%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13701   +/-   ##
=======================================
  Coverage   41.84%   41.85%           
=======================================
  Files         744      744           
  Lines       79689    79714   +25     
=======================================
+ Hits        33347    33361   +14     
- Misses      40843    40849    +6     
- Partials     5499     5504    +5     
Impacted Files Coverage Δ
routers/api/v1/repo/issue.go 49.55% <0.00%> (-0.30%) ⬇️
routers/user/home.go 59.27% <0.00%> (-0.44%) ⬇️
models/issue.go 56.77% <64.17%> (-0.42%) ⬇️
routers/repo/issue.go 38.24% <93.10%> (+0.06%) ⬆️
modules/git/tree_nogogit.go 60.86% <0.00%> (-8.70%) ⬇️
modules/indexer/stats/db.go 60.00% <0.00%> (-8.00%) ⬇️
modules/avatar/avatar.go 50.00% <0.00%> (-4.77%) ⬇️
modules/git/repo_language_stats_nogogit.go 57.44% <0.00%> (-4.26%) ⬇️
models/error.go 38.49% <0.00%> (-0.49%) ⬇️
models/gpg_key.go 53.90% <0.00%> (+0.57%) ⬆️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 872d308...85d2668. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 25, 2020
@silverwind
Copy link
Member

silverwind commented Nov 25, 2020

This will need a rebase now after #13594.

Edit: actually no, that part was not consolidated.

@jpraet jpraet force-pushed the 13682-review-requested-filter branch from b909521 to 156e042 Compare November 28, 2020 10:31
@lynxplay
Copy link

Is there any update on this PR? Our team would really appreciate the change for the main workflow of our release cycle.

@jpraet jpraet force-pushed the 13682-review-requested-filter branch from 156e042 to 92c25fa Compare December 22, 2020 09:56
@jpraet jpraet marked this pull request as ready for review December 22, 2020 09:59
@jpraet
Copy link
Member Author

jpraet commented Dec 22, 2020

TODO: also return review requests for teams you belong to.

When looking at the code for team review requests, I notice that when a user submits a review with status Reject or Approve, any existing review requests for the teams the user belongs to are removed. So I do wonder why we wouldn't also remove review requests for the user there? It would remove the need for these subselects in all the queries. Is there a reason we need to keep these superseded user review request records?

@lunny lunny added the type/enhancement An improvement of existing functionality label Dec 23, 2020
@lunny lunny added this to the 1.14.0 milestone Dec 23, 2020
@jpraet
Copy link
Member Author

jpraet commented Jan 3, 2021

This is done. Added team review requests to the filter + a refactoring to remove the code duplication in the issue filtering conditions.

@lunny
Copy link
Member

lunny commented Jan 3, 2021

Fixes #13682

This adds a filter on the pull request overview pages that allows you to find the pull requests that are requesting your review.

  • Is the name "Review Requested" for the filter OK? On GitHub it is called "Review Requests". Most clear is probably something like "Requesting your review", which is consistent in phrasing with the existing "Mentioning you" filter. What do you think?

I like Review Requested which is shorter than "Requesting your review"

  • Review requests records are not deleted once the review has taken place, so in the query I had to add a subselect to only take the last review record into account. I worry a bit about performance impact? Is there a better way?

Maybe we should have another PR to delete the review requests when user reviewed or PR merged/closed ?

  • With [API] Add more filters to issues search #13514 the existing "created", "assigned" and "mentioned" issue filters were made available through the API as well. Would you like me to add API support for the "review_requested" filter as well?

Yes, please!!!

@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 Jan 3, 2021
@jpraet
Copy link
Member Author

jpraet commented Jan 6, 2021

  • Review requests records are not deleted once the review has taken place, so in the query I had to add a subselect to only take the last review record into account. I worry a bit about performance impact? Is there a better way?

Maybe we should have another PR to delete the review requests when user reviewed or PR merged/closed ?

This can indeed be done in another PR. It would also require a data migration to delete the obsoleted review requests.

  • With [API] Add more filters to issues search #13514 the existing "created", "assigned" and "mentioned" issue filters were made available through the API as well. Would you like me to add API support for the "review_requested" filter as well?

Yes, please!!!

Already done in 92c25fa. So as far as I'm concerned this PR is ready for review and merge.

@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 Jan 17, 2021
@6543
Copy link
Member

6543 commented Jan 17, 2021

@jpraet can you update the branch ;)

@6543 6543 merged commit acb1ceb into go-gitea:master Jan 17, 2021
a1012112796 added a commit to a1012112796/gitea that referenced this pull request Jan 19, 2021
* master: (27 commits)
  Use path not filepath in routers/editor (go-gitea#14390)
  Display error if twofaSecret cannot be retrieved (go-gitea#14372)
  Check if label template exist first (go-gitea#14384)
  Allow passcode invalid error to appear (go-gitea#14371)
  exclude authored PRs from Review Requested filter (go-gitea#14368)
  Upgrade blevesearch dependency to v2.0.1 (go-gitea#14346)
  Implement ghost comment mitigation (go-gitea#14349)
  Add edit, delete and reaction support to code review comments on issue page (go-gitea#14339)
  Add review requested filter on pull request overview (go-gitea#13701)
  escape branch names in compare url (go-gitea#14364)
  label and milestone webhooks on issue/pull creation (go-gitea#14363)
  Fix middlewares sequences (go-gitea#14354)
  Sort issue search results by revelance (go-gitea#14353)
  KanBan: be able to set default board (go-gitea#14147)
  ...
@go-gitea go-gitea locked and limited conversation to collaborators Mar 11, 2021
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. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add review requests filter on pull request overview
8 participants