summaryrefslogtreecommitdiff
path: root/lib/api/notes.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-09-13 14:53:05 +0000
committerRobert Speicher <robert@gitlab.com>2018-09-13 14:53:05 +0000
commitc7d1eef671dbf598814a6c2ff1f81b924583ae8a (patch)
tree23988df1d29e933943858a66821ba7f493976b3e /lib/api/notes.rb
parentff5d8b635f234241441009e41af7b61f5804b2c2 (diff)
parent2039c8280db1646845c33d6c5a74e5f23ca6f4de (diff)
downloadgitlab-ce-c7d1eef671dbf598814a6c2ff1f81b924583ae8a.tar.gz
Merge branch 'rubocop-code-reuse' into 'master'
Add RuboCop cops to enforce code reusing rules See merge request gitlab-org/gitlab-ce!21391
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r--lib/api/notes.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index 39923e6d5b5..dc9373bb3c2 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -28,6 +28,7 @@ module API
desc: 'Return notes sorted in `asc` or `desc` order.'
use :pagination
end
+ # rubocop: disable CodeReuse/ActiveRecord
get ":id/#{noteables_str}/:noteable_id/notes" do
noteable = find_noteable(parent_type, noteables_str, params[:noteable_id])
@@ -45,6 +46,7 @@ module API
.reject { |n| n.cross_reference_not_visible_for?(current_user) }
present notes, with: Entities::Note
end
+ # rubocop: enable CodeReuse/ActiveRecord
desc "Get a single #{noteable_type.to_s.downcase} note" do
success Entities::Note