Expose target_iid in Events API

What does this MR do?

Expose target_iid in Events API

Are there points in the code the reviewer needs to double check?

No

Why was this MR needed?

Since API v4, issue and MR API are requires iid. But this API returns only id yet.

Screenshots (if relevant)

Example

$ curl -s --header "PRIVATE-TOKEN XXXXXXXXXXXXXXXX" http://localhost:3000/api/v4/projects/h5bp%2Fhtml5-boilerplate/events | jq .[0]
{
  "title": null,
  "project_id": 8,
  "action_name": "opened",
  "target_id": 81,
  "target_iid": 11,
  "target_type": "Issue",
  "author_id": 1,
  "data": null,
  "target_title": "iid test",
  "created_at": "2017-08-02T06:36:06.395Z",
  "author": {
    "name": "Administrator",
    "username": "root",
    "id": 1,
    "state": "active",
    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
    "web_url": "http://localhost:3000/root"
  },
  "author_username": "root"
}

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

No

Edited by sue445

Merge request reports

Loading