lib/gitlab/satellite/merge_action.rb
# Retrieve an array of commits between the source and the target
Retrieve an array of commits between the source and the target
Retrieve an array of commits between the source and the target
def commits_between
        in_locked_and_timed_satellite do |merge_repo|
          prepare_satellite!(merge_repo)
          update_satellite_source_and_target!(merge_repo)
          if (merge_request.for_fork?)
            commits = merge_repo.commits_between("origin/#{merge_request.target_branch}", "source/#{merge_request.source_branch}")
          else
            raise "Attempt to determine commits between for a non forked merge request in satellite MergeRequest.id:[#{merge_request.id}]"
          end
          commits = commits.map { |commit| Gitlab::Git::Commit.new(commit, nil) }
          return commits
        end
      rescue Grit::Git::CommandFailed => ex
        handle_exception(ex)
      end
def commits_between in_locked_and_timed_satellite do | merge_repo | prepare_satellite! ( merge_repo ) update_satellite_source_and_target! ( merge_repo ) if ( merge_request . for_fork? ) commits = merge_repo . commits_between ( "origin/#{merge_request.target_branch}" , "source/#{merge_request.source_branch}" ) else raise "Attempt to determine commits between for a non forked merge request in satellite MergeRequest.id:[#{merge_request.id}]" end commits = commits . map { | commit | Gitlab :: Git :: Commit . new ( commit , nil ) } return commits end rescue Grit :: Git :: CommandFailed => ex handle_exception ( ex ) end
Retrieve an array of commits between the source and the target
Retrieve an array of commits between the source and the target