Class: ContextCommitsFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/context_commits_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(project, merge_request, params = {}) ⇒ ContextCommitsFinder

Returns a new instance of ContextCommitsFinder.


4
5
6
7
8
9
10
# File 'app/finders/context_commits_finder.rb', line 4

def initialize(project, merge_request, params = {})
  @project = project
  @merge_request = merge_request
  @search = params[:search]
  @limit = (params[:limit] || 40).to_i
  @offset = (params[:offset] || 0).to_i
end

Instance Method Details

#executeObject


12
13
14
15
16
17
# File 'app/finders/context_commits_finder.rb', line 12

def execute
  commits = init_collection
  commits = filter_existing_commits(commits)

  commits
end