RubyMine 2024.1 Help

Work with GitLab merge requests

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 RubyMine.

  • 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

Send your merge request for review

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

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. RubyMine 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 RubyMine.

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. RubyMine 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 RubyMine.

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: 03 April 2024