Commit b15df829 authored by Stan Hu's avatar Stan Hu

Add documentation for /rebase quick action

This documents the use of /rebase for merge requests.
parent 0b69b711
......@@ -127,12 +127,12 @@ module MergeRequests
def handle_quick_actions(merge_request)
super
# Ensure this parameter gets used as an attribute
# Ensure this parameter does not get used as an attribute
rebase = params.delete(:rebase)
if rebase
rebase_from_quick_action(merge_request)
# Ignore /merge if /rebase is used to avoid an unexpected race
# Ignore "/merge" if "/rebase" is used to avoid an unexpected race
params.delete(:merge)
end
......
---
title: Add a quick action for /rebase
merge_request: 49800
author:
type: added
......@@ -56,6 +56,7 @@ The following quick actions are applicable to descriptions, discussions and thre
| `/promote` | ✓ | | | Promote issue to epic. **(PREMIUM)** |
| `/publish` | ✓ | | | Publish issue to an associated [Status Page](../../operations/incident_management/status_page.md) ([Introduced in GitLab 13.0](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30906)) **(ULTIMATE)** |
| `/reassign @user1 @user2` | ✓ | ✓ | | Replace current assignees with those specified. **(STARTER)** |
| `/rebase` | | ✓ | | Rebase source branch. This will schedule a background task that attempt to rebase the changes in the source branch on the latest commit of the target branch. If `/rebase` is used, `/merge` will be ignored to avoid a race condition where the source branch is merged or deleted before it is rebased. |
| `/relabel ~label1 ~label2` | ✓ | ✓ | ✓ | Replace current labels with those specified. |
| `/relate #issue1 #issue2` | ✓ | | | Mark issues as related. **(STARTER)** |
| `/remove_child_epic <epic>` | | | ✓ | Remove child epic from `<epic>`. The `<epic>` value should be in the format of `&epic`, `group&epic`, or a URL to an epic ([introduced in GitLab 12.0](https://gitlab.com/gitlab-org/gitlab/-/issues/7330)). **(ULTIMATE)** |
......
......@@ -56,7 +56,7 @@ module Gitlab
access_check.can_push_to_branch?(merge_request.source_branch)
end
command :rebase do
# This will be used to avoid simultaneous /merge and /rebase actions
# This will be used to avoid simultaneous "/merge" and "/rebase" actions
@updates[:rebase] = true
branch = quick_action_target.source_branch
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment