Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-05 11:38:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-05 11:38:19 +0300
commitb7d20f14c6008a857a16977a92bb87002683059d (patch)
treef6f502ca1059a08d85b59871f8ec2560bc08d4ae /lib
parentbedc66eb0407aa36127367f53f76944ebb98f5a6 (diff)
parent55f91f3d4348e1d7be0953d0ddf9984d65f18993 (diff)
Merge branch 'maser/gitlab-ce-order-commit-comments-in-api' into 'master'
Order commit comments in API chronologically When fetching commit comments via API, the comments were not ordered, but just returned in the order Postgresql finds them. Now the API always returns comments in chronological order. Same as !628 but with CI See merge request !768
Diffstat (limited to 'lib')
-rw-r--r--lib/api/commits.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index 23270b1c0f4..f4efb651eb6 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -62,7 +62,7 @@ module API
sha = params[:sha]
commit = user_project.commit(sha)
not_found! 'Commit' unless commit
- notes = Note.where(commit_id: commit.id)
+ notes = Note.where(commit_id: commit.id).order(:created_at)
present paginate(notes), with: Entities::CommitNote
end