Skip to content
Snippets Groups Projects

Merge Requests

Merge requests allow team members to visualize and collaborate on the proposed changes to work that exist as commits on a given Git branch. At CGDS, merge requests are feature-based, meaning when the work for a proposed topic is complete, the proposed changes are requested to be reviewed and integrated into the origin/master branch.

The procedures for drafting, reviewing, and merging Merge Requests are listed below. Visit GitLab Add Merge Request to learn how to execute a GitLab merge request.

Creating Merge Request

  1. Navigate to Branches section of the Project within GitLab that needs to be merged.
  2. Initiate the merge request by pressing the Merge request button that is on the row of the desired branch to merge. Screenshot
  3. Enter a descriptive title according to the work being reviewed. Afterwards, set the merge request to be a Work inProgress AKA WIP.
    • Click the "Start the title with WIP:" link below the Title text box.
      Screenshot
  4. Write a complete summary of the changes that are included in the Merge Request in the Description text area.
  5. Select an Assignee in the drop down menu to assign who will review the merge request.
    • The assignee chosen is up to the discretion of the user creating the merge request. The assignee is either the person who is accountable for the project or the content is within their area of expertise.
    • If the chosen assignee is someone who neither has expertise using Gitlab's advanced features nor will be working frequently with such features in future (e.g. analysts), the MR submitter will converse with the assignee outside of Gitlab, get their comments, resolve the conflicts, get the changes approved by assignee, document assignee's comments in gitlab, and then will finalize the MR themselves.
  6. Select the Target branch that the work is being pulled into. This is not always origin/master.
  7. Check the Delete source branch when merge request is accepted checkbox.
    • It is optional to select Squash Commits. If there were commits that will benefit from having the history then it is recommended to not squash.
  8. Click the Submit merge request button at the bottom left of the merge request.

Reviewing Merge Request

This will be performed by the assignee (aka reviewer).

  1. Assigned reviewers will review the proposed changes via Merge Request view in GitLab. They will leave comments and request changes as needed.
  2. The user who submitted the merge request must respond to all comments and suggestions.
  3. Once the reviewer is satisfied with responses and suggested changes, they will Resolve the threads.
    • Read GitLab Marking Comments and Threads Resolved to learn more about resolving threads.
    • GitLab will not allow the branch to be merged until all comments and threads are resolved.
    • If there is a disagreement between the author of the proposed changes and reviewer, a third party team member can be brought in to help determine a solution.
  4. The final reviewer will remove the Work in Progress status once they are a satisfied with responses to comments and the resolutions in regards to changes requested. There are two ways to remove teh WIP status:
    • Within Editing the merge request, To remove the WIP status, click the Remove the WIP: prefix from the title link as seen in the figure below. Screenshot
    • Within the main discussion page of the GitLab merge request, click the Resolve WIP status button. Screenshot

Finalizing Merge Request

  1. Once the merge request has passed the review, then the author of merge request finalizes merging by clicking the green Merge button on the center of the Merge Request page. Screenshot