Merge Request API response should include the time when changes have been merged

Problem to solve

The REST API for Merge Requests contains a lot of information related to merge requests. One important piece of information that is missing is when changes were merged. Including this information in the API response will be very useful for anyone using this API.

Further details

I need to produce a report on when changes are being merged. The Activity page shows the Merge Events which is very useful and exactly what I need, but I need the information in a different format and to be generated automatically.

In order to generate this report, I can use GitLab's API, specifically for merge requests. Unfortunately the api response does not include the time when changes are merged. It includes various other date/time values such as: created_at, updated_at, etc.

I can't rely on created_at because a change is not always merged as soon as it's created. I also cannot rely on updated_at value, because a particular merge request can be updated any time after changes had been merged (i.e. the merge request was cherry-picked, or someone added/updated labels/descriptions/notes, etc.)

Proposal

It would be very useful if the API returns the time when merge happened. It could be called merged_at. Include this result on following API calls.

  • https://docs.gitlab.com/ee/api/merge_requests.html#list-merge-requests
  • https://docs.gitlab.com/ee/api/merge_requests.html#list-project-merge-requests
  • https://docs.gitlab.com/ee/api/merge_requests.html#list-group-merge-requests

What does success look like, and how can we measure that?

End users are able to take full advantage of the Merge Requests API and able to find out when a particular change had been merged without going through individual merge requests for details.

Links / references

Edited Sep 02, 2020 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading