diff --git a/models/repo.go b/models/repo.go index 873546411..4c70269e8 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1646,7 +1646,7 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (repos []*Repository, _ int } } if len(opts.Keyword) > 0 { - sess.And("repo.lower_name LIKE ?", "%"+strings.ToLower(opts.Keyword)+"%") + sess.And("repo.lower_name LIKE ? OR repo.description LIKE ?", "%"+strings.ToLower(opts.Keyword)+"%", "%"+strings.ToLower(opts.Keyword)+"%") } if opts.OwnerID > 0 { sess.And("repo.owner_id = ?", opts.OwnerID)