Skip to content

WorkItemAddClosingMergeRequest mutation allows URLs and full references

Mario Celi requested to merge 454136-parse-other-references into master

What does this MR do and why?

Mutation's argument mergeRequestReference can also be a full merge request reference or merge request URL

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.

How to set up and validate locally

You can perform a query like the following in GraphiQL http://localhost:3000/-/graphql-explorer

mutation {
  workItemAddClosingMergeRequest(
    input: {id: "gid://gitlab/WorkItem/<ID>", mergeRequestReference: "flightjs/flight!9"}
  ) {
    errors
    workItem {
      widgets {
        type
        ... on WorkItemWidgetDevelopment {
          closingMergeRequests {
            nodes {
              fromMrDescription
              id
              mergeRequest {
                id
                iid
              }
            }
          }
        }
      }
    }
    closingMergeRequest {
      fromMrDescription
      mergeRequest {
        id
        iid
      }
    }
  }
}

Related to #454136 (closed)

Merge request reports