diff options
author | Martin Luder <maser@winterfell.ch> | 2015-05-08 14:34:10 +0200 |
---|---|---|
committer | Martin Luder <maser@winterfell.ch> | 2015-05-08 14:34:10 +0200 |
commit | 55f91f3d4348e1d7be0953d0ddf9984d65f18993 (patch) | |
tree | 0baed0bedb28b1acd015b100c69a7b3a1efa1cce /lib/api/commits.rb | |
parent | 6c32abc5f7f090d4932054e5cc1ff0594edd5ff1 (diff) | |
download | gitlab-ce-55f91f3d4348e1d7be0953d0ddf9984d65f18993.tar.gz |
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.
Diffstat (limited to 'lib/api/commits.rb')
-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 |