summaryrefslogtreecommitdiff
path: root/doc/user/project
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-09-06 02:58:00 +0000
committerAsh McKenzie <amckenzie@gitlab.com>2019-09-06 02:58:00 +0000
commit428500186952519ae1ad335dc5c05364bf8563b4 (patch)
treeb4a1574e87cd51c99f7313c29517c00af438d846 /doc/user/project
parent71ff2c13e8241a4c19cb902e6ab62d2fb99630d4 (diff)
parent582e075e9f51567a0f004e5b34ca099b09a72059 (diff)
downloadgitlab-ce-428500186952519ae1ad335dc5c05364bf8563b4.tar.gz
Merge branch 'add-label-push-opts' into 'master'
Support adding and removing labels w/ push opts Closes #5942 See merge request gitlab-org/gitlab-ce!31831
Diffstat (limited to 'doc/user/project')
-rw-r--r--doc/user/project/merge_requests/index.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md
index d6da8cb99c7..9f31f38460a 100644
--- a/doc/user/project/merge_requests/index.md
+++ b/doc/user/project/merge_requests/index.md
@@ -289,6 +289,7 @@ as pushing changes:
- Set the merge request to remove the source branch when it's merged.
- Set the title of the merge request to a particular title.
- Set the description of the merge request to a particular description.
+- Add or remove labels from the merge request.
### Create a new merge request using git push options
@@ -375,6 +376,33 @@ git push -o merge_request.description="The description I want"
You can also use this push option in addition to the
`merge_request.create` push option.
+### Add or remove labels using git push options
+
+You can add or remove labels from merge requests using push options.
+
+For example, to add two labels to an existing merge request, use the
+`merge_request.label` push option:
+
+```sh
+git push -o merge_request.label="label1" -o merge_request.label="label2"
+```
+
+To remove two labels from an existing merge request, use
+the `merge_request.unlabel` push option:
+
+```sh
+git push -o merge_request.unlabel="label1" -o merge_request.unlabel="label2"
+```
+
+You can also use these push options in addition to the
+`merge_request.create` push option.
+
+To create a merge request and add two labels to it, use:
+
+```sh
+git push -o merge_request.create -o merge_request.label="label1" -o merge_request.label="label2"
+```
+
## Find the merge request that introduced a change
> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/2383) in GitLab 10.5.