2015-11-17 05:03:18 -05:00
|
|
|
module MergeRequestsAction
|
|
|
|
extend ActiveSupport::Concern
|
2016-07-23 19:28:12 -04:00
|
|
|
include IssuableCollections
|
2015-11-17 05:03:18 -05:00
|
|
|
|
2017-11-22 02:50:36 -05:00
|
|
|
# rubocop:disable Gitlab/ModuleWithInstanceVariables
|
2015-11-17 05:03:18 -05:00
|
|
|
def merge_requests
|
2017-11-07 08:34:12 -05:00
|
|
|
@merge_requests = issuables_collection.page(params[:page])
|
2017-01-23 15:40:25 -05:00
|
|
|
|
2017-11-07 08:34:12 -05:00
|
|
|
@issuable_meta_data = issuable_meta_data(@merge_requests, collection_type)
|
2015-11-17 05:03:18 -05:00
|
|
|
end
|
2017-11-22 02:50:36 -05:00
|
|
|
# rubocop:enable Gitlab/ModuleWithInstanceVariables
|
2016-11-27 05:33:15 -05:00
|
|
|
|
|
|
|
private
|
|
|
|
|
2018-02-20 07:33:49 -05:00
|
|
|
def finder_type
|
|
|
|
(super if defined?(super)) ||
|
|
|
|
(MergeRequestsFinder if action_name == 'merge_requests')
|
|
|
|
end
|
|
|
|
|
2016-11-27 05:33:15 -05:00
|
|
|
def filter_params
|
|
|
|
super.merge(non_archived: true)
|
|
|
|
end
|
2015-11-17 05:03:18 -05:00
|
|
|
end
|