Commit 6a8359f3 authored by Douwe Maan's avatar Douwe Maan
Browse files

Merge branch 'pacoguzman/gitlab-ce-15001-since-and-until-operators-api-commits'

# Conflicts:
#	Gemfile.lock
parents 72e4bd5f c4b9bd04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ v 8.8.0 (unreleased)
  - Add support for supressing text diffs using .gitattributes on the default branch (Matt Oakes)
  - Added multiple colors for labels in dropdowns when dups happen.
  - Improve description for the Two-factor Authentication sign-in screen. (Connor Shea)
  - API support for the 'since' and 'until' operators on commit requests (Paco Guzman)

v 8.7.3
  - Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
+1 −1
Original line number Diff line number Diff line
@@ -353,7 +353,7 @@ GEM
      posix-spawn (~> 0.3)
    gitlab_emoji (0.3.1)
      gemojione (~> 2.2, >= 2.2.1)
    gitlab_git (10.0.1)
    gitlab_git (10.0.2)
      activesupport (~> 4.0)
      charlock_holmes (~> 0.7.3)
      github-linguist (~> 4.7.0)
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ def show
      if search.present?
        @repository.find_commits_by_message(search, @ref, @path, @limit, @offset).compact
      else
        @repository.commits(@ref, @path, @limit, @offset)
        @repository.commits(@ref, path: @path, limit: @limit, offset: @offset)
      end

    @note_counts = project.notes.where(commit_id: @commits.map(&:id)).
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ def show
  end

  def commits
    @commits = @project.repository.commits(@ref, nil, 2000, 0, true)
    @commits = @project.repository.commits(@ref, limit: 2000, skip_merges: true)
    @commits_graph = Gitlab::Graphs::Commits.new(@commits)
    @commits_per_week_days = @commits_graph.commits_per_week_days
    @commits_per_time = @commits_graph.commits_per_time
@@ -55,7 +55,7 @@ def languages
  private

  def fetch_graph
    @commits = @project.repository.commits(@ref, nil, 6000, 0, true)
    @commits = @project.repository.commits(@ref, limit: 6000, skip_merges: true)
    @log = []

    @commits.each do |commit|
+4 −2
Original line number Diff line number Diff line
@@ -87,13 +87,15 @@ def commit(id = 'HEAD')
    nil
  end

  def commits(ref, path = nil, limit = nil, offset = nil, skip_merges = false)
  def commits(ref, path: nil, limit: nil, offset: nil, skip_merges: false, after: nil, before: nil)
    options = {
      repo: raw_repository,
      ref: ref,
      path: path,
      limit: limit,
      offset: offset,
      after: after,
      before: before,
      # --follow doesn't play well with --skip. See:
      # https://gitlab.com/gitlab-org/gitlab-ce/issues/3574#note_3040520
      follow: false,
@@ -575,7 +577,7 @@ def branches_sorted_by(value)
  end

  def contributors
    commits = self.commits(nil, nil, 2000, 0, true)
    commits = self.commits(nil, limit: 2000, offset: 0, skip_merges: true)

    commits.group_by(&:author_email).map do |email, commits|
      contributor = Gitlab::Contributor.new
Loading