Skip to content

Change work item closing merge request GQL API

Mario Celi requested to merge 454137-rename-field into master

What does this MR do and why?

relatedMergeRequests no longer makes sense, so renaming to closingMergeRequests as now the presence of those records always means that the work item will be closed. API breaking change, but no need to follow the deprecation process since this part of the API was released as ALPHA and it is still not used by GitLab

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

  1. You can use the close pattern in a merge request to mention an issue. Resolves #2 for example. This will create a record in the DB we are trying to fetch. You can mention the same issue in multiple MRs to create more associated records.
  2. Then, use the following query to fetch associated merge requests for the mentioned issue
    {
       namespace(fullPath: "flightjs/flight") {
         workItem(iid: "<mentioned_issue_iid>") {
           widgets {
             type
             ... on WorkItemWidgetDevelopment {
               closingMergeRequests {
                 nodes {
                   fromMrDescription
                   mergeRequest { id }
                 }
               }
             }
           }
         }
       }
     }

Related to #454137 (closed)

Edited by Mario Celi

Merge request reports