99 lines
4.2 KiB
Text
99 lines
4.2 KiB
Text
- run_actions_text = s_("ProjectService|Perform common operations on GitLab project: %{project_name}") % { project_name: @project.full_name }
|
|
|
|
%p= s_("ProjectService|To set up this service:")
|
|
%ul.list-unstyled.indent-list
|
|
%li
|
|
1.
|
|
= link_to 'https://docs.mattermost.com/developer/slash-commands.html#enabling-custom-commands', target: '_blank', rel: 'noopener noreferrer nofollow' do
|
|
Enable custom slash commands
|
|
= sprite_icon('external-link', size: 16)
|
|
on your Mattermost installation
|
|
%li
|
|
2.
|
|
= link_to 'https://docs.mattermost.com/developer/slash-commands.html#set-up-a-custom-command', target: '_blank', rel: 'noopener noreferrer nofollow' do
|
|
Add a slash command
|
|
= sprite_icon('external-link', size: 16)
|
|
in your Mattermost team with these options:
|
|
%hr
|
|
|
|
.help-form
|
|
.form-group
|
|
= label_tag :display_name, _('Display name'), class: 'col-12 col-form-label label-bold'
|
|
.col-12.input-group
|
|
= text_field_tag :display_name, "GitLab / #{@project.full_name}", class: 'form-control form-control-sm', readonly: 'readonly'
|
|
.input-group-append
|
|
= clipboard_button(target: '#display_name', class: 'input-group-text')
|
|
|
|
.form-group
|
|
= label_tag :description, _('Description'), class: 'col-12 col-form-label label-bold'
|
|
.col-12.input-group
|
|
= text_field_tag :description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
|
|
.input-group-append
|
|
= clipboard_button(target: '#description', class: 'input-group-text')
|
|
|
|
.form-group
|
|
= label_tag nil, s_('MattermostService|Command trigger word'), class: 'col-12 col-form-label label-bold'
|
|
.col-12
|
|
%p= s_('MattermostService|Fill in the word that works best for your team.')
|
|
%p
|
|
= s_('MattermostService|Suggestions:')
|
|
%code= 'gitlab'
|
|
%code= @project.path # Path contains no spaces, but dashes
|
|
%code= @project.full_path
|
|
|
|
.form-group
|
|
= label_tag :request_url, s_('MattermostService|Request URL'), class: 'col-12 col-form-label label-bold'
|
|
.col-12.input-group
|
|
= text_field_tag :request_url, service_trigger_url(subject), class: 'form-control form-control-sm', readonly: 'readonly'
|
|
.input-group-append
|
|
= clipboard_button(target: '#request_url', class: 'input-group-text')
|
|
|
|
.form-group
|
|
= label_tag nil, s_('MattermostService|Request method'), class: 'col-12 col-form-label label-bold'
|
|
.col-12 POST
|
|
|
|
.form-group
|
|
= label_tag :response_username, s_('MattermostService|Response username'), class: 'col-12 col-form-label label-bold'
|
|
.col-12.input-group
|
|
= text_field_tag :response_username, 'GitLab', class: 'form-control form-control-sm', readonly: 'readonly'
|
|
.input-group-append
|
|
= clipboard_button(target: '#response_username', class: 'input-group-text')
|
|
|
|
.form-group
|
|
= label_tag :response_icon, s_('MattermostService|Response icon'), class: 'col-12 col-form-label label-bold'
|
|
.col-12.input-group
|
|
= text_field_tag :response_icon, asset_url('gitlab_logo.png'), class: 'form-control form-control-sm', readonly: 'readonly'
|
|
.input-group-append
|
|
= clipboard_button(target: '#response_icon', class: 'input-group-text')
|
|
|
|
.form-group
|
|
= label_tag nil, _('Autocomplete'), class: 'col-12 col-form-label label-bold'
|
|
.col-12 Yes
|
|
|
|
.form-group
|
|
= label_tag :autocomplete_hint, _('Autocomplete hint'), class: 'col-12 col-12 col-form-label label-bold'
|
|
.col-12.input-group
|
|
= text_field_tag :autocomplete_hint, '[help]', class: 'form-control form-control-sm', readonly: 'readonly'
|
|
.input-group-append
|
|
= clipboard_button(target: '#autocomplete_hint', class: 'input-group-text')
|
|
|
|
.form-group
|
|
= label_tag :autocomplete_description, _('Autocomplete description'), class: 'col-12 col-form-label label-bold'
|
|
.col-12.input-group
|
|
= text_field_tag :autocomplete_description, run_actions_text, class: 'form-control form-control-sm', readonly: 'readonly'
|
|
.input-group-append
|
|
= clipboard_button(target: '#autocomplete_description', class: 'input-group-text')
|
|
|
|
%hr
|
|
|
|
%ul.list-unstyled.indent-list
|
|
%li
|
|
3. Paste the
|
|
%strong Token
|
|
into the field below
|
|
%li
|
|
4. Select the
|
|
%strong Active
|
|
checkbox, press
|
|
%strong Save changes
|
|
and start using GitLab inside Mattermost!
|