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

filter out wiki repos #7608

Merged
merged 1 commit into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion seahub/api2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
from seahub.api2.base import APIView
from seahub.api2.models import TokenV2, DESKTOP_PLATFORMS
from seahub.api2.endpoints.group_owned_libraries import get_group_id_by_repo_owner
from seahub.api2.utils import get_search_repos
from seahub.api2.utils import get_search_repos, is_wiki_repo
from seahub.avatar.templatetags.avatar_tags import api_avatar_url, avatar
from seahub.avatar.templatetags.group_avatar_tags import api_grp_avatar_url, \
grp_avatar
Expand Down Expand Up @@ -858,6 +858,9 @@ def get(self, request, format=None):
if r.is_virtual:
continue

if is_wiki_repo(r):
continue

if q and q.lower() not in r.name.lower():
continue

Expand Down Expand Up @@ -914,6 +917,10 @@ def get(self, request, format=None):

shared_repos.sort(key=lambda x: x.last_modify, reverse=True)
for r in shared_repos:

if is_wiki_repo(r):
continue

if q and q.lower() not in r.name.lower():
continue

Expand Down Expand Up @@ -979,6 +986,10 @@ def get(self, request, format=None):
nickname_dict[e] = email2nickname(e)

for r in group_repos:

if is_wiki_repo(r):
continue

if q and q.lower() not in r.name.lower():
continue

Expand Down Expand Up @@ -1024,6 +1035,10 @@ def get(self, request, format=None):
nickname_dict[e] = email2nickname(e)

for r in public_repos:

if is_wiki_repo(r):
continue

if q and q.lower() not in r.name.lower():
continue

Expand Down