MPS 2024.1 Help

Work with GitLab merge requests

GitLab settings: Settings | Version Control | GitLab

","

Required plugins: Git and GitLab (bundled and enabled by default)

"]}">

Using GitLab merge requests, you can incorporate changes from a source branch to a target branch.

Tools overview

To view incoming merge requests, click GitLab icon in the tool window bar on the left.

Merge requests filters

Alternatively, go to Git | GitLab | Show GitLab Merge Requests in the main menu.

Use the Merge Requests tool window to:

  • Review merge requests: browse code, check diff between the suggested changes and the base revision, and leave comments directly from MPS.

  • Filter requests by state, author, assignee, reviewer, and label.

  • Jump to a merge request on GitLab: right-click a merge request and choose Open Merge Request on GitLab from the context menu.

To make sure you always have the latest information about the merge requests, press Ctrl+F5. Alternatively, right-click the necessary merge request and select Refresh List.

When you select a merge request and double-click it, you will see the merge request details tab:

Merge Request overview
  • Next to the title, there is a merge request number. Click it if you want to open the merge request on GitLab.

  • Click the View Timeline button to open the merge request timeline.

  • If a merge requests consists of several commits, focus on a specific one by selecting it in the Changes from drop-down. Navigate between commits by pressing the up and down buttons.

    Choose commit to investigate
  • Right-click any file to open the context menu for this file.

    Context menu of a file in merge request
  • In case a reviewer has left any comments or suggestions, there is a counter with the number of comments in the list of files.

    Commented files in the Merge Requests tool window

Create a merge request

  1. In the main menu, go to Git | GitLab | View Merge Requests.

  2. In the Merge Requests tool window that opens, click Plus Create Merge Request in the top-right corner.

    A new tab opens with a merge request draft.

    Merge Requests tool window with a new merge request
  3. Click the name of the base repository on the left and specify the branch that will receive the updates.

    Base repository
  4. Click the name of the head repository on the right and specify the branch with the changes that will be added to the base repository.

    Head repository

    If you have a project that uses multiple remote repositories, you can change the head repository in this popup as well.

  5. Specify the name for your merge request in the Title field, and, optionally, provide a description of the changes to be applied through your request and add reviewers.

  6. Click Create Merge Request.

Send your merge request for review

You can send your existing GitLab merge requests for review directly from MPS.

Request review

  1. Click GitLab icon in the tool window bar on the left.

  2. Select your merge request from the list and double-click it. MPS opens an overview of the selected merge request.

  3. At the bottom of the details view, click the Request Review button.

    Request review button
  4. Find the name of the reviewer in the search field or select the reviewer in the list of suggested reviewers.

If someone left comments to your merge request, you can view and answer them directly in MPS.

Work with comments

  1. Click GitLab icon in the tool window bar on the left.

  2. Select the merge request from the list and double-click it. MPS opens an overview of the selected merge request.

  3. Double-click a file to view the comments.

  4. You can either reply to a comment, or resolve it.

    Reply to comment from GitLab

After you finished working on the merge request, you can re-request review, merge, or close it in the same merge request details tab.

Review merge request

When reviewing a merge request, you can leave your comments directly in MPS.

Leave your comments

  1. Select a merge request and open a file in it.

  2. Click in the gutter.

  3. Type your comment and click Add Comment to post it.

    Leave your comment to GitLab merge request

Before you submit a review, you can edit or delete your comments.

After posting your comments, you can submit the review and approve the merge request.

Submit review

  1. Click Submit Review in the merge request details tab.

  2. Select one of the possible outcomes:

    Submit review dialog
    • Approve: to approve merging changes.

    • Submit: to submit your feedback without an approval.

    If you change your mind, you can later click the Revoke Approval button.

If the work with the merge request is done, you can merge or close it in the same merge request details tab.

Last modified: 26 May 2024