Skip to content

REST API: add field merge_user to MR response

Piotr Stankowski requested to merge trakos/gitlab:rest_api_mr_merge_user into master

What does this MR do and why?

Solves #349031 (closed).

Currently, MR in GraphQL has field merge_user which exposes either user who merged the MR, or set it to MWPS. However, REST API has field merged_by which only exposes user who merged, but not the user who set it to MWPS.

This proposes:

  • adding merge_user field to REST API that exposes user who merged the MR, or set it to MWP
  • deprecating field merged_by in REST API

How to set up and validate locally

Simply check REST endpoint for fetching MRs, for example:

GET http://localhost:3000/api/v4/projects/6/merge_requests
Accept: application/json
Content-Type: application/json
Authorization: Bearer ypCa3Dzb23o5nvsixwPA

Also, visit documentation for API endpoint (http://localhost:3005/ee/api/merge_requests.html#list-merge-requests).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports