-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 filter option for subscribed issues #17053
Conversation
I fixed it now. You can review this PR :) |
Codecov Report
@@ Coverage Diff @@
## main #17053 +/- ##
==========================================
- Coverage 45.31% 45.30% -0.01%
==========================================
Files 773 773
Lines 86873 86907 +34
==========================================
+ Hits 39366 39376 +10
- Misses 41151 41170 +19
- Partials 6356 6361 +5
Continue to review full report at Codecov.
|
Closing this as it's better solved by #17156 |
Adds GitHub-like pages to view watched repos and subscribed issues/PRs This is my second try to fix this, but it is better than the first since it doesn't uses a filter option which could be slow when accessing `/issues` or `/pulls` and it shows both pulls and issues (the first try is #17053). Closes #16111 Replaces and closes #17053 ![Screenshot](https://user-images.githubusercontent.com/80460567/134782937-3112f7da-425a-45b6-9511-5c9695aee896.png) Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This pull request adds a filter option "subscribed" to the
/issues
overview and to the lists in in the repos (and to the API). Addresses #16111 (and closes the first part of it).I know that the SQL command here is a very long and complex SQL command, but I didn't find another working way (I don't know enough about these xorm.Session conditions) and it works. The command just filters the issues if they are in the
issue_watch
table andis_watching
is 1 or if they are in thecomment
table but not in the list of issues inissue_watch
whereis_watching
is 0 or if they are in theissues
table but not in the list of issues inissue_watch
whereis_watching
is 0. If you know another way how to make this more readable, it would be nice if you could comment.