From 14b240af8fef269d2c1d5dde2fff192b656c50f3 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sun, 20 Jan 2019 15:41:27 +0100 Subject: identity: more cleaning and fixes after a code review --- cache/filter.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'cache/filter.go') diff --git a/cache/filter.go b/cache/filter.go index 033df131..3cf4a991 100644 --- a/cache/filter.go +++ b/cache/filter.go @@ -1,6 +1,8 @@ package cache import ( + "strings" + "github.com/MichaelMure/git-bug/bug" ) @@ -22,7 +24,10 @@ func StatusFilter(query string) (Filter, error) { // AuthorFilter return a Filter that match a bug author func AuthorFilter(query string) Filter { return func(excerpt *BugExcerpt) bool { - return excerpt.Author.Match(query) + query = strings.ToLower(query) + + return strings.Contains(strings.ToLower(excerpt.Author.Name), query) || + strings.Contains(strings.ToLower(excerpt.Author.Login), query) } } -- cgit