Draft merge requests (FREE ALL)
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:
Mark merge requests as drafts
- Introduced in GitLab 13.2, Work-In-Progress (WIP) merge requests were renamed to Draft.
- Removed all support for using WIP in GitLab 14.8.
- Mark as draft and Mark as ready buttons introduced in GitLab 13.5.
/draft
quick action as a toggle deprecated in GitLab 15.4.- Changed the draft status to use a checkbox in GitLab 15.8.
There are several ways to flag a merge request as a draft:
- Viewing a merge request: In the upper-right corner of the merge request, select Mark as draft.
-
Creating or editing a merge request: Add
[Draft]
,Draft:
or(Draft)
to the beginning of the merge request's title, or select Mark as draft below the Title field. -
Commenting in an existing merge request: Add the
/draft
quick action in a comment. To mark a merge request as ready, use/ready
. -
Creating a commit: Add
draft:
,Draft:
,fixup!
, orFixup!
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.
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 upper-right corner of the merge request, select Mark as ready. Users with at least the Developer role can also scroll to the bottom of the merge request description and select Mark as ready.
-
Editing an existing merge request: Remove
[Draft]
,Draft:
or(Draft)
from the beginning of the title, or clear Mark as draft below the Title field. -
Commenting in an existing merge request: Add the
/ready
quick action in a comment in the merge request.
In GitLab 13.10 and later, when you mark a merge request as ready, notifications are triggered to merge request participants and watchers.
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:
-
Go to your project and select Code > Merge requests.
-
In the navigation bar, select Open, Merged, Closed, or All to filter by merge request status.
-
Select the search box to display a list of filters and select Draft, or enter the word
draft
. -
Select
=
. -
Select Yes to include drafts, or No to exclude, and press Return to update the list of merge requests:
Pipelines for drafts
Draft merge requests run the same pipelines as merge request that are marked as ready.
In GitLab 15.0 and older, you must mark the merge request as ready if you want to run merged results pipelines.