Commit 81762d32 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '25381-add-request-review-alias' into 'master'

Add a /request_review alias for /assign_reviewer

See merge request gitlab-org/gitlab!51751
parents 27d052ae 92a2674a
---
title: Add a /request_review alias for /assign_reviewer
merge_request: 51751
author:
type: added
...@@ -187,7 +187,7 @@ module Gitlab ...@@ -187,7 +187,7 @@ module Gitlab
parse_params do |reviewer_param| parse_params do |reviewer_param|
extract_users(reviewer_param) extract_users(reviewer_param)
end end
command :assign_reviewer, :reviewer do |users| command :assign_reviewer, :reviewer, :request_review do |users|
next if users.empty? next if users.empty?
if quick_action_target.allows_multiple_reviewers? if quick_action_target.allows_multiple_reviewers?
......
...@@ -945,6 +945,12 @@ RSpec.describe QuickActions::InterpretService do ...@@ -945,6 +945,12 @@ RSpec.describe QuickActions::InterpretService do
it_behaves_like 'assign_reviewer command' it_behaves_like 'assign_reviewer command'
end end
context 'with the "request_review" alias' do
let(:content) { "/request_review @#{developer.username}" }
it_behaves_like 'assign_reviewer command'
end
context 'with no user' do context 'with no user' do
let(:content) { '/assign_reviewer' } let(:content) { '/assign_reviewer' }
......
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