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
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2017-02-15 16:24:18 +0300
committerMark Fletcher <mark@gitlab.com>2017-02-15 16:26:57 +0300
commit7a8d0aab61fa5d59a4bde5330948f1adcfbb542c (patch)
tree93ad521209554a436bbc8cfa00c6128514fe7267 /lib/api/commits.rb
parent865e3fcc13834a1503b8a6c3f7cc7826bacdcc9f (diff)
Ensure only commit comments relevant to target project are returned
Diffstat (limited to 'lib/api/commits.rb')
-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 2fefe760d24..173083d0ade 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -114,7 +114,7 @@ module API
commit = user_project.commit(params[:sha])
not_found! 'Commit' unless commit
- notes = Note.where(commit_id: commit.id).order(:created_at)
+ notes = user_project.notes.where(commit_id: commit.id).order(:created_at)
present paginate(notes), with: Entities::CommitNote
end