Return empty when searching issues with no repos (#26545)

This commit is contained in:
Jason Song authored and GitHub committed 2023-08-17 12:42:17 -05:00
1 parent 47fddaadc8
commit b658f2c61b
3 files changed
+23 -5

No files matched your search

+4
View File
@@ -193,6 +193,10 @@ func SearchIssues(ctx *context.APIContext) {
ctx.Error(http.StatusInternalServerError, "SearchRepositoryIDs", err)
return
}
if len(repoIDs) == 0 {
// no repos found, don't let the indexer return all repos
repoIDs = []int64{0}
}
}
keyword := ctx.FormTrim("q")