Commit 6d7024be authored by E. Levi Allen's avatar E. Levi Allen Committed by E. Levi Allen

Clean & Updating Tests; Final Commit for #48640

Signed-off-by: E. Levi Allen's avatarLevi <[email protected]>
parent 1555d380
...@@ -132,10 +132,10 @@ module QuickActions ...@@ -132,10 +132,10 @@ module QuickActions
end end
desc do desc do
"Returns to previous assignee" "Assign to previous assignee"
end end
explanation do explanation do
"Returns to previous assignee." "Assign to previous assignee."
end end
condition do condition do
issuable.is_a?(MergeRequest) && issuable.is_a?(MergeRequest) &&
...@@ -631,10 +631,6 @@ module QuickActions ...@@ -631,10 +631,6 @@ module QuickActions
"%assigned to @#{current_user.username}%", current_user.id) || "" "%assigned to @#{current_user.username}%", current_user.id) || ""
end end
def find_pong_recipient(project, params = {})
log_info([project, params])
end
def explain_commands(commands) def explain_commands(commands)
commands.map do |name, arg| commands.map do |name, arg|
definition = self.class.definition_by_name(name) 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. approver or previous assignee.
merge_request: merge_request:
author: author: E. Levi Allen
type: added type: added
...@@ -17,7 +17,7 @@ do. ...@@ -17,7 +17,7 @@ do.
| `/merge` | Merge (when pipeline succeeds) | | `/merge` | Merge (when pipeline succeeds) |
| `/title <New title>` | Change title | | `/title <New title>` | Change title |
| `/assign @username` | Assign | | `/assign @username` | Assign |
| `/pong` | Return to previous assignee| | `/pong` | Assign to previous assignee |
| `/unassign` | Remove assignee | | `/unassign` | Remove assignee |
| `/milestone %milestone` | Set milestone | | `/milestone %milestone` | Set milestone |
| `/remove_milestone` | Remove milestone | | `/remove_milestone` | Remove milestone |
......
...@@ -512,15 +512,15 @@ describe QuickActions::InterpretService do ...@@ -512,15 +512,15 @@ describe QuickActions::InterpretService do
it 'fetches previous assignee 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, issue) _, updates = service.execute(content, issue)
expect(updates).to eq(assignee_ids: [developer.id]) expect(updates).not_to eq(assignee_ids: [developer.id])
end end
end end
context 'Merge Request' do 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) _, 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 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