diff --git a/src/common/dao/repository.go b/src/common/dao/repository.go index 1fca52979..5eb7a9036 100644 --- a/src/common/dao/repository.go +++ b/src/common/dao/repository.go @@ -156,8 +156,8 @@ func repositoryQueryConditions(query ...*models.RepositoryQuery) (string, []inte sql += `where 1=1 ` if len(q.Name) > 0 { - sql += `and r.name = ? ` - params = append(params, q.Name) + sql += `and r.name like ? ` + params = append(params, "%"+Escape(q.Name)+"%") } if len(q.ProjectIDs) > 0 {