diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-05 11:38:19 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-05 11:38:19 +0300 |
commit | b7d20f14c6008a857a16977a92bb87002683059d (patch) | |
tree | f6f502ca1059a08d85b59871f8ec2560bc08d4ae /lib | |
parent | bedc66eb0407aa36127367f53f76944ebb98f5a6 (diff) | |
parent | 55f91f3d4348e1d7be0953d0ddf9984d65f18993 (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.rb | 2 |
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 |