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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
b2b1b4a4
Commit
b2b1b4a4
authored
Aug 12, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefer `/reopen` over `/open`, remove `/reassign`
parent
d9715266
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
app/services/slash_commands/interpret_service.rb
app/services/slash_commands/interpret_service.rb
+21
-21
doc/workflow/slash_commands.md
doc/workflow/slash_commands.md
+3
-3
No files found.
app/services/slash_commands/interpret_service.rb
View file @
b2b1b4a4
...
...
@@ -53,7 +53,7 @@ module SlashCommands
noteable
.
closed?
&&
current_user
.
can?
(
:"update_
#{
noteable
.
to_ability_name
}
"
,
noteable
)
end
command
:
open
,
:re
open
do
command
:
reopen
,
:
open
do
@updates
[
:state_event
]
=
'reopen'
end
...
...
@@ -72,7 +72,7 @@ module SlashCommands
condition
do
current_user
.
can?
(
:"admin_
#{
noteable
.
to_ability_name
}
"
,
project
)
end
command
:assign
,
:reassign
do
|
assignee_param
|
command
:assign
do
|
assignee_param
|
user
=
extract_references
(
assignee_param
,
:user
).
first
user
||=
User
.
find_by
(
username:
assignee_param
)
user
||=
User
.
find_by
(
name:
assignee_param
)
...
...
@@ -180,7 +180,7 @@ module SlashCommands
end
desc
'Set due date'
params
'<in 2 days
| this Friday |
December 31st>'
params
'<in 2 days
; this Friday;
December 31st>'
condition
do
noteable
.
respond_to?
(
:due_date
)
&&
current_user
.
can?
(
:"update_
#{
noteable
.
to_ability_name
}
"
,
noteable
)
...
...
@@ -204,7 +204,7 @@ module SlashCommands
# This is a dummy command, so that it appears in the autocomplete commands
desc
'CC'
params
'@user'
command
:cc
,
noop:
true
command
:cc
def
find_label_ids
(
labels_param
)
label_ids_by_reference
=
extract_references
(
labels_param
,
:label
).
map
(
&
:id
)
...
...
doc/workflow/slash_commands.md
View file @
b2b1b4a4
...
...
@@ -12,9 +12,9 @@ do.
| Command | Aliases | Action |
|:---------------------------|:--------------------|:-------------|
|
`/close`
| None | Close the issue or merge request |
|
`/
open`
|
`/reopen`
| Reopen the issue or merge request |
|
`/
reopen`
|
`/open`
| Reopen the issue or merge request |
|
`/title <New title>`
| None | Change title |
|
`/assign @username`
|
`/reassign`
| Assign |
|
`/assign @username`
|
None
| Assign |
|
`/unassign`
|
`/remove_assignee`
| Remove assignee |
|
`/milestone %milestone`
| None | Set milestone |
|
`/clear_milestone`
|
`/remove_milestone`
| Remove milestone |
...
...
@@ -25,5 +25,5 @@ do.
|
`/done`
| None | Mark todo as done |
|
`/subscribe`
| None | Subscribe |
|
`/unsubscribe`
| None | Unsubscribe |
|
`/due <in 2 days
| this Friday |
December 31st>`
|
`/due_date`
| Set due date |
|
`/due <in 2 days
; this Friday;
December 31st>`
|
`/due_date`
| Set due date |
|
`/clear_due_date`
| None | Remove due date |
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