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
ebc3f62b
Commit
ebc3f62b
authored
Dec 16, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
cc83aded
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
app/views/projects/services/mattermost_slash_commands/_help.html.haml
...ojects/services/mattermost_slash_commands/_help.html.haml
+2
-3
lib/gitlab/chat_commands/command.rb
lib/gitlab/chat_commands/command.rb
+2
-2
lib/gitlab/chat_commands/presenter.rb
lib/gitlab/chat_commands/presenter.rb
+8
-3
No files found.
app/views/projects/services/mattermost_slash_commands/_help.html.haml
View file @
ebc3f62b
-
pretty_path_with_namespace
=
"
#{
@project
.
namespace
?
@project
.
namespace
.
name
:
'namespace'
}
/
#{
@project
?
@project
.
name
:
'name'
}
"
-
run_actions_text
=
"Perform common operations on this project:
#{
pretty_path_with_namespace
}
"
-
run_actions_text
=
"Perform common operations on this project:
#{
@project
.
name_with_namespace
}
"
.well
This service allows GitLab users to perform common operations on this
...
...
@@ -27,7 +26,7 @@
.form-group
=
label_tag
:display_name
,
'Display name'
,
class:
'col-sm-2 col-xs-12 control-label'
.col-sm-10.col-xs-12.input-group
=
text_field_tag
:display_name
,
"GitLab /
#{
pretty_path
_with_namespace
}
"
,
class:
'form-control input-sm'
,
readonly:
'readonly'
=
text_field_tag
:display_name
,
"GitLab /
#{
@project
.
name
_with_namespace
}
"
,
class:
'form-control input-sm'
,
readonly:
'readonly'
.input-group-btn
=
clipboard_button
(
clipboard_target:
'#display_name'
)
...
...
lib/gitlab/chat_commands/command.rb
View file @
ebc3f62b
...
...
@@ -22,8 +22,6 @@ module Gitlab
end
end
private
def
match_command
match
=
nil
service
=
available_commands
.
find
do
|
klass
|
...
...
@@ -33,6 +31,8 @@ module Gitlab
[
service
,
match
]
end
private
def
help_messages
available_commands
.
map
(
&
:help_message
)
end
...
...
lib/gitlab/chat_commands/presenter.rb
View file @
ebc3f62b
...
...
@@ -135,9 +135,14 @@ module Gitlab
def
link
(
url
,
title
)
case
format
when
'slack'
then
"<
#{
url
}
|
#{
title
}
>"
when
'mattermost'
then
"[
#{
title
}
](
#{
url
}
)"
else
then
title
when
'slack'
"<
#{
url
}
|
#{
title
}
>"
when
'mattermost'
"[
#{
title
}
](
#{
url
}
)"
else
title
end
end
end
...
...
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