From c9546d4cdd5f7de8f56b7d4a9806d1aca784cf3f Mon Sep 17 00:00:00 2001 From: David Svantesson Date: Sun, 25 Aug 2019 19:06:36 +0200 Subject: Include description in repository search. (#7942) * Add description in repository search. Signed-off-by: David Svantesson * Refactor SearchRepositoryByName with a general function SearchRepository Signed-off-by: David Svantesson * Allow to specify if description shall be included in API repo search. Signed-off-by: David Svantesson * Add new app.ini setting for whether to search within repo description. Signed-off-by: David Svantesson * Search keyword in description (if setting enabled) on: - Explore page - Organization profile page - User profile page - Admin repo page Do not search keyword in description on: - Any non-keyword search (not relevant) - Incremental search (uses API) Signed-off-by: David Svantesson * Put parameters related to keyword directly after it Signed-off-by: David Svantesson * Add test cases for including (and not including) repository description in search. Signed-off-by: David Svantesson * Rename test function from TestSearchRepositoryByName to TestSearchRepository. Signed-off-by: David Svantesson * Make setting SEARCH_REPO_DESCRIPTION default to true Signed-off-by: David Svantesson --- custom/conf/app.ini.sample | 2 ++ 1 file changed, 2 insertions(+) (limited to 'custom/conf/app.ini.sample') diff --git a/custom/conf/app.ini.sample b/custom/conf/app.ini.sample index a2842c56b4..82ffd2d785 100644 --- a/custom/conf/app.ini.sample +++ b/custom/conf/app.ini.sample @@ -116,6 +116,8 @@ DEFAULT_THEME = gitea THEMES = gitea,arc-green ; Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used. DEFAULT_SHOW_FULL_NAME = false +; Whether to search within description at repository search on explore page. +SEARCH_REPO_DESCRIPTION = true [ui.admin] ; Number of users that are displayed on one page -- cgit v1.2.3