API: how to get the iid of a merge request from an event that only gives a target_id
Hello,
Here is my use case. I retrieve events in a project using the Events API. For the merge request events, I would like to generate an hyperlink to the Web UI for that merge request.
- I know that for the Web UI, I need to use the iid of the merge request
- From what I have seen, using the API I can retrieve a merge request in a project only with its iid
- Since all I have is the id of the merge request (target_id in the event payload), I don't see how I can implement my use case (I could retrieve the list of all merge requests in the project and traverse it, but that is very inefficient).
Did I miss anything? I have seen quite a few issues that propose adding iid's to various endpoints. For my use case, it's clear that having the iid in the event payload would be the best solution. I could use it as is to generate my hyperlink.
Any idea?