diff options
author | Jeroen Jacobs <git@jeroenj.be> | 2014-06-27 16:48:30 +0200 |
---|---|---|
committer | Jeroen Jacobs <git@jeroenj.be> | 2014-09-26 10:58:11 +0200 |
commit | 430758653ce7e4d32b40648e6263b79c2709bdad (patch) | |
tree | dc62ecc9587f532406495ac4a6ac5e53e490088f /lib/api/entities.rb | |
parent | de5e0e590fa4e75cb9d66398b902a8348a2c42dc (diff) | |
download | gitlab-ce-430758653ce7e4d32b40648e6263b79c2709bdad.tar.gz |
Adds comments to commits in the API
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index ffa3e8a149e..c7b86ed3d76 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -158,6 +158,14 @@ module API expose :author, using: Entities::UserBasic end + class CommitNote < Grape::Entity + expose :note + expose(:path) { |note| note.diff_file_name } + expose(:line) { |note| note.diff_new_line } + expose(:line_type) { |note| note.diff_line_type } + expose :author, using: Entities::UserBasic + end + class Event < Grape::Entity expose :title, :project_id, :action_name expose :target_id, :target_type, :author_id |