Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_detailed_help.html.haml « mattermost_slash_commands « services « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 549ca36cb6afb0f8190f3f411352ad534415e8d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
- pretty_name = @project&.full_name ? html_escape(@project&.full_name) : '<' + _('project name') + '>'
- run_actions_text = html_escape(s_("ProjectService|Perform common operations on GitLab project: %{project_name}")) % { project_name: pretty_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')
    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')
    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 / #{pretty_name}".html_safe, 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'
        - if @project
          %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!