diff options
author | Michael Muré <batolettre@gmail.com> | 2019-01-20 15:41:27 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-03-01 22:40:22 +0100 |
commit | 14b240af8fef269d2c1d5dde2fff192b656c50f3 (patch) | |
tree | 4f6ea032789d811cd019bbb6c190c99a650084b2 /cache/filter.go | |
parent | d10c76469d40f13e27739fd363145e89bf74c3e0 (diff) | |
download | git-bug-14b240af8fef269d2c1d5dde2fff192b656c50f3.tar.gz |
identity: more cleaning and fixes after a code review
Diffstat (limited to 'cache/filter.go')
-rw-r--r-- | cache/filter.go | 7 |
1 files changed, 6 insertions, 1 deletions
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) } } |