summaryrefslogtreecommitdiff
path: root/lib/api/entities/note.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/note.rb')
-rw-r--r--lib/api/entities/note.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/entities/note.rb b/lib/api/entities/note.rb
index f22ab73afd0..9a60c04220d 100644
--- a/lib/api/entities/note.rb
+++ b/lib/api/entities/note.rb
@@ -14,6 +14,7 @@ module API
expose :created_at, :updated_at
expose :system?, as: :system
expose :noteable_id, :noteable_type
+ expose :commit_id, if: ->(note, options) { note.noteable_type == "MergeRequest" && note.is_a?(DiffNote) }
expose :position, if: ->(note, options) { note.is_a?(DiffNote) } do |note|
note.position.to_h