diff options
author | sue445 <sue445@sue445.net> | 2017-08-02 09:18:17 +0300 |
---|---|---|
committer | sue445 <sue445@sue445.net> | 2017-08-02 10:07:50 +0300 |
commit | 24704acc77ebc85d653fc22d3fe9c7e5eb2a707d (patch) | |
tree | eb46a3589d363d4772890ceed3914c1fbc784a36 | |
parent | 886b0744949c9d10c21e39e192a0ec48c206fb40 (diff) |
Expose target_iid in Events API
-rw-r--r-- | changelogs/unreleased/13247-api_project_events_target_iid.yml | 4 | ||||
-rw-r--r-- | doc/api/events.md | 2 | ||||
-rw-r--r-- | lib/api/entities.rb | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/changelogs/unreleased/13247-api_project_events_target_iid.yml b/changelogs/unreleased/13247-api_project_events_target_iid.yml new file mode 100644 index 00000000000..08a31039f77 --- /dev/null +++ b/changelogs/unreleased/13247-api_project_events_target_iid.yml @@ -0,0 +1,4 @@ +--- +title: Expose target_iid in Events API +merge_request: 13247 +author: sue445 diff --git a/doc/api/events.md b/doc/api/events.md index e7829c9f479..6e530317f6c 100644 --- a/doc/api/events.md +++ b/doc/api/events.md @@ -302,6 +302,7 @@ Example response: "project_id":1, "action_name":"opened", "target_id":160, + "target_iid":160, "target_type":"Issue", "author_id":25, "data":null, @@ -322,6 +323,7 @@ Example response: "project_id":1, "action_name":"opened", "target_id":159, + "target_iid":159, "target_type":"Issue", "author_id":21, "data":null, diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 5cdc441e8cb..0a71c976c7e 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -483,7 +483,7 @@ module API class Event < Grape::Entity 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 :created_at expose :note, using: Entities::Note, if: ->(event, options) { event.note? } |