Commit 1b117e7f authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'api_project_events_target_iid' into 'master'

Expose target_iid in Events API

See merge request !13247
parents 92bfd5ba 24704acc
---
title: Expose target_iid in Events API
merge_request: 13247
author: sue445
...@@ -302,6 +302,7 @@ Example response: ...@@ -302,6 +302,7 @@ Example response:
"project_id":1, "project_id":1,
"action_name":"opened", "action_name":"opened",
"target_id":160, "target_id":160,
"target_iid":160,
"target_type":"Issue", "target_type":"Issue",
"author_id":25, "author_id":25,
"data":null, "data":null,
...@@ -322,6 +323,7 @@ Example response: ...@@ -322,6 +323,7 @@ Example response:
"project_id":1, "project_id":1,
"action_name":"opened", "action_name":"opened",
"target_id":159, "target_id":159,
"target_iid":159,
"target_type":"Issue", "target_type":"Issue",
"author_id":21, "author_id":21,
"data":null, "data":null,
......
...@@ -496,7 +496,7 @@ module API ...@@ -496,7 +496,7 @@ module API
class Event < Grape::Entity class Event < Grape::Entity
expose :title, :project_id, :action_name expose :title, :project_id, :action_name
expose :target_id, :target_type, :author_id expose :target_id, :target_iid, :target_type, :author_id
expose :data, :target_title expose :data, :target_title
expose :created_at expose :created_at
expose :note, using: Entities::Note, if: ->(event, options) { event.note? } expose :note, using: Entities::Note, if: ->(event, options) { event.note? }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment