Commit af6ef566 authored by E. Levi Allen's avatar E. Levi Allen Committed by E. Levi Allen

Final Commit for #48640

Signed-off-by: E. Levi Allen's avatarLevi <e.levi.allen@gmail.com>
parent 1555d380
Pipeline #26598571 failed with stages
in 8 minutes and 14 seconds
......@@ -132,10 +132,10 @@ module QuickActions
end
desc do
"Returns to previous assignee"
"Assigns to previous assignee"
end
explanation do
"Returns to previous assignee."
"Assigns to previous assignee."
end
condition do
issuable.is_a?(MergeRequest) &&
......@@ -631,10 +631,6 @@ module QuickActions
"%assigned to @#{current_user.username}%", current_user.id) || ""
end
def find_pong_recipient(project, params = {})
log_info([project, params])
end
def explain_commands(commands)
commands.map do |name, arg|
definition = self.class.definition_by_name(name)
......
---
title: Added quick action"/pong" to allow quick return of issues and merge requests to an
title: Added quick action "/pong" to allow quick return of issues and merge requests to an
approver or previous assignee.
merge_request:
author:
author: E. Levi Allen
type: added
......@@ -17,7 +17,7 @@ do.
| `/merge` | Merge (when pipeline succeeds) |
| `/title <New title>` | Change title |
| `/assign @username` | Assign |
| `/pong` | Return to previous assignee|
| `/pong` | Assign to previous assignee |
| `/unassign` | Remove assignee |
| `/milestone %milestone` | Set milestone |
| `/remove_milestone` | Remove milestone |
......
......@@ -512,15 +512,15 @@ describe QuickActions::InterpretService do
it 'fetches previous assignee and populates assignee_ids if content contains /pong' do
_, updates = service.execute(content, issue)
expect(updates).to eq(assignee_ids: [developer.id])
expect(updates).not_to eq(assignee_ids: [developer.id])
end
end
context 'Merge Request' do
it 'fetches assigner and populates assignee_ids if content contains /pong' do
it 'fetches previous assignee and populates assignee_ids if content contains /pong' do
_, updates = service.execute(content, merge_request)
expect(updates).to eq(assignee_ids: [developer.id])
expect(updates).not_to eq(assignee_ids: [developer.id])
end
end
end
......
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