Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
03e94951
Commit
03e94951
authored
Mar 29, 2022
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support attn alias for attention
Changelog: changed
parent
e77715bc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
app/services/quick_actions/interpret_service.rb
app/services/quick_actions/interpret_service.rb
+2
-2
lib/gitlab/quick_actions/merge_request_actions.rb
lib/gitlab/quick_actions/merge_request_actions.rb
+1
-1
spec/services/quick_actions/interpret_service_spec.rb
spec/services/quick_actions/interpret_service_spec.rb
+11
-0
No files found.
app/services/quick_actions/interpret_service.rb
View file @
03e94951
...
...
@@ -168,7 +168,7 @@ module QuickActions
next
unless
definition
definition
.
execute
(
self
,
arg
)
usage_ping_tracking
(
name
,
arg
)
usage_ping_tracking
(
definition
.
name
,
arg
)
end
end
...
...
@@ -186,7 +186,7 @@ module QuickActions
def
usage_ping_tracking
(
quick_action_name
,
arg
)
Gitlab
::
UsageDataCounters
::
QuickActionActivityUniqueCounter
.
track_unique_action
(
quick_action_name
,
quick_action_name
.
to_s
,
args:
arg
&
.
strip
,
user:
current_user
)
...
...
lib/gitlab/quick_actions/merge_request_actions.rb
View file @
03e94951
...
...
@@ -291,7 +291,7 @@ module Gitlab
parse_params
do
|
attention_param
|
extract_users
(
attention_param
)
end
command
:attention
do
|
users
|
command
:attention
,
:attn
do
|
users
|
next
if
users
.
empty?
users
.
each
do
|
user
|
...
...
spec/services/quick_actions/interpret_service_spec.rb
View file @
03e94951
...
...
@@ -726,6 +726,17 @@ RSpec.describe QuickActions::InterpretService do
expect
(
reviewer
).
to
be_attention_requested
end
it
'supports attn alias'
do
attn_cmd
=
content
.
gsub
(
/attention/
,
'attn'
)
_
,
_
,
message
=
service
.
execute
(
attn_cmd
,
issuable
)
expect
(
message
).
to
eq
(
"Requested attention from
#{
developer
.
to_reference
}
."
)
reviewer
.
reload
expect
(
reviewer
).
to
be_attention_requested
end
end
shared_examples
'remove attention command'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment