Draft merge requests

If a merge request isn’t ready to merge, potentially because of continued development or open threads, you can prevent it from being accepted before you mark it as ready. Flag it as a draft to disable the Merge button until you remove the Draft flag:

Blocked Merge Button

Mark merge requests as drafts

Version history
  • Introduced in GitLab 13.2, Work-In-Progress (WIP) merge requests were renamed to Draft. Support for using WIP is scheduled for removal in GitLab 14.0.
  • Mark as draft and Mark as ready buttons introduced in GitLab 13.5.

There are several ways to flag a merge request as a draft:

  • Viewing a merge request: In the top right corner of the merge request, click Mark as draft.
  • Creating or editing a merge request: Add [Draft], Draft: or (Draft) to the beginning of the merge request’s title, or click Start the title with Draft: below the Title field.
  • Commenting in an existing merge request: Add the /draft quick action in a comment. This quick action is a toggle, and can be repeated to change the status again. This quick action discards any other text in the comment.
  • Creating a commit: Add draft:, Draft:, fixup!, or Fixup! to the beginning of a commit message targeting the merge request’s source branch. This is not a toggle, and adding this text again in a later commit doesn’t mark the merge request as ready.
cautionAdding WIP: to the start of the merge request’s title still marks a merge request as a draft. This feature is scheduled for removal in GitLab 14.0. Use Draft: instead.

Mark merge requests as ready

When a merge request is ready to be merged, you can remove the Draft flag in several ways:

  • Viewing a merge request: In the top right corner of the merge request, click Mark as ready. Users with Developer or greater permissions can also scroll to the bottom of the merge request description and click Mark as ready:

    Mark as ready

  • Editing an existing merge request: Remove [Draft], Draft: or (Draft) from the beginning of the title, or click Remove the Draft: prefix from the title below the Title field.
  • Commenting in an existing merge request: Add the /draft quick action in a comment in the merge request. This quick action is a toggle, and can be repeated to change the status back. This quick action discards any other text in the comment.

Include or exclude drafts when searching

When viewing or searching in your project’s merge requests list, you can include or exclude draft merge requests:

  1. In your project, select Merge Requests from the left sidebar.
  2. In the navigation bar, click Open, Merged, Closed, or All to filter by merge request status.
  3. Click the search box to display a list of filters and select Draft, or enter the word draft.
  4. Select =.
  5. Select Yes to include drafts, or No to exclude, and press Return to update the list of merge requests:

    Filter draft merge requests

Pipelines for drafts

When the pipelines for merged results feature is enabled, draft merge requests run merge request pipelines only.

To run pipelines for merged results, you must mark the merge request as ready.