Skip to content

Commit

Permalink
feat: Enable description search in Dashboard (#13837)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErlingHauan authored Oct 22, 2024
1 parent 4333644 commit 1f22a8a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,13 @@ private string BuildSearchQuery(SearchOptions searchOption)
giteaSearchUriString += $"&q={searchOption.Keyword}";
}

// Search in description. To prevent DataModelsRepoList from displaying repos with '-datamodels' only in the description,
// we exclude description searches containing this keyword.
if (searchOption.Keyword != null && !searchOption.Keyword.Contains("-datamodels"))
{
giteaSearchUriString += "&includeDesc=true";
}

if (searchOption.UId != 0)
{
giteaSearchUriString += $"&uid={searchOption.UId}&exclusive=true";
Expand Down

0 comments on commit 1f22a8a

Please sign in to comment.