diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-10-20 15:47:44 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-20 15:47:44 +0300 |
commit | 29557e8a5fe25ecf4f66323ea6521d83ce77cf14 (patch) | |
tree | 99ff9c93ec12a07c2a801624be4dd9e8c123bde4 /lib | |
parent | d1f6dfc863f1560f7e6e1a30e846304979679a61 (diff) | |
parent | 8e218edbddd9a6fda34543e1f1ee39e44772c369 (diff) |
Merge remote-tracking branch 'upstream/master' into preserve-note_type-and-position
* upstream/master:
Restrict ProjectCacheWorker jobs to one per 15 min
Removed code from project members controller
Make label API spec independent of order
Refactoring find_commits functionality
Differentiate the expire from leave event
Remove pagination description from individual doc
Fix a broken table in Project API doc
Create project feature when project is created
Simpler arguments passed to named_route on toggle_award_url helper method
Fixed height of issue board blank state
Diffstat (limited to 'lib')
-rw-r--r-- | lib/event_filter.rb | 11 | ||||
-rw-r--r-- | lib/gitlab/project_search_results.rb | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/event_filter.rb b/lib/event_filter.rb index 96e70e37e8f..21f6a9a762b 100644 --- a/lib/event_filter.rb +++ b/lib/event_filter.rb @@ -45,9 +45,16 @@ class EventFilter when EventFilter.comments actions = [Event::COMMENTED] when EventFilter.team - actions = [Event::JOINED, Event::LEFT] + actions = [Event::JOINED, Event::LEFT, Event::EXPIRED] when EventFilter.all - actions = [Event::PUSHED, Event::MERGED, Event::COMMENTED, Event::JOINED, Event::LEFT] + actions = [ + Event::PUSHED, + Event::MERGED, + Event::COMMENTED, + Event::JOINED, + Event::LEFT, + Event::EXPIRED + ] end events.where(action: actions) diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb index 5b9cfaeb2f8..24733435a5a 100644 --- a/lib/gitlab/project_search_results.rb +++ b/lib/gitlab/project_search_results.rb @@ -73,11 +73,7 @@ module Gitlab end def commits - if project.empty_repo? || query.blank? - [] - else - project.repository.find_commits_by_message(query).compact - end + project.repository.find_commits_by_message(query) end def project_ids_relation |