Commit 8272c8ce authored by Russell Dickenson's avatar Russell Dickenson Committed by Miguel Rincon

Improve UI text of group webhooks page

* Added link to a description of the term "percent-encoded" because it's not commonly understood.
* Set "X-Gitlab-Token HTTP" in code styling as per the guidelines.
* Changed help text of all triggers to remove duplicate content.
* Changed text for the "empty group hooks" case.

Changelog: changed
parent 58e8d463
...@@ -4,12 +4,14 @@ ...@@ -4,12 +4,14 @@
= form.label :url, s_('Webhooks|URL'), class: 'label-bold' = form.label :url, s_('Webhooks|URL'), class: 'label-bold'
= form.text_field :url, class: 'form-control gl-form-input', placeholder: 'http://example.com/trigger-ci.json' = form.text_field :url, class: 'form-control gl-form-input', placeholder: 'http://example.com/trigger-ci.json'
%p.form-text.text-muted %p.form-text.text-muted
= s_('Webhooks|URL must be percent-encoded if neccessary.') = s_('Webhooks|URL must be percent-encoded if it contains one or more special characters.')
.form-group .form-group
= form.label :token, s_('Webhooks|Secret token'), class: 'label-bold' = form.label :token, s_('Webhooks|Secret token'), class: 'label-bold'
= form.text_field :token, class: 'form-control gl-form-input', placeholder: '' = form.text_field :token, class: 'form-control gl-form-input', placeholder: ''
%p.form-text.text-muted %p.form-text.text-muted
= s_('Webhooks|Use this token to validate received payloads. It is sent with the request in the X-Gitlab-Token HTTP header.') - code_start = '<code>'.html_safe
- code_end = '</code>'.html_safe
= s_('Webhooks|Used to validate received payloads. Sent with the request in the %{code_start}X-Gitlab-Token HTTP%{code_end} header.').html_safe % { code_start: code_start, code_end: code_end }
.form-group .form-group
= form.label :url, s_('Webhooks|Trigger'), class: 'label-bold' = form.label :url, s_('Webhooks|Trigger'), class: 'label-bold'
%ul.list-unstyled.gl-ml-6 %ul.list-unstyled.gl-ml-6
...@@ -19,37 +21,37 @@ ...@@ -19,37 +21,37 @@
%strong= s_('Webhooks|Push events') %strong= s_('Webhooks|Push events')
= form.text_field :push_events_branch_filter, class: 'form-control gl-form-input', placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)' = form.text_field :push_events_branch_filter, class: 'form-control gl-form-input', placeholder: 'Branch name or wildcard pattern to trigger on (leave blank for all)'
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered by a push to the repository') = s_('Webhooks|Push to the repository.')
%li %li
= form.check_box :tag_push_events, class: 'form-check-input' = form.check_box :tag_push_events, class: 'form-check-input'
= form.label :tag_push_events, class: 'list-label form-check-label gl-ml-1' do = form.label :tag_push_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Tag push events') %strong= s_('Webhooks|Tag push events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a new tag is pushed to the repository') = s_('Webhooks|A new tag is pushed to the repository.')
%li %li
= form.check_box :note_events, class: 'form-check-input' = form.check_box :note_events, class: 'form-check-input'
= form.label :note_events, class: 'list-label form-check-label gl-ml-1' do = form.label :note_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Comments') %strong= s_('Webhooks|Comments')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when someone adds a comment') = s_('Webhooks|A comment is added to an issue.')
%li %li
= form.check_box :confidential_note_events, class: 'form-check-input' = form.check_box :confidential_note_events, class: 'form-check-input'
= form.label :confidential_note_events, class: 'list-label form-check-label gl-ml-1' do = form.label :confidential_note_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Confidential comments') %strong= s_('Webhooks|Confidential comments')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when someone adds a comment on a confidential issue') = s_('Webhooks|A comment is added to a confidential issue.')
%li %li
= form.check_box :issues_events, class: 'form-check-input' = form.check_box :issues_events, class: 'form-check-input'
= form.label :issues_events, class: 'list-label form-check-label gl-ml-1' do = form.label :issues_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Issues events') %strong= s_('Webhooks|Issues events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when an issue is created, updated, closed, or reopened') = s_('Webhooks|An issue is created, updated, closed, or reopened.')
%li %li
= form.check_box :confidential_issues_events, class: 'form-check-input' = form.check_box :confidential_issues_events, class: 'form-check-input'
= form.label :confidential_issues_events, class: 'list-label form-check-label gl-ml-1' do = form.label :confidential_issues_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Confidential issues events') %strong= s_('Webhooks|Confidential issues events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a confidential issue is created, updated, closed, or reopened') = s_('Webhooks|A confidential issue is created, updated, closed, or reopened.')
- if @group - if @group
= render_if_exists 'groups/hooks/member_events', form: form = render_if_exists 'groups/hooks/member_events', form: form
= render_if_exists 'groups/hooks/subgroup_events', form: form = render_if_exists 'groups/hooks/subgroup_events', form: form
...@@ -58,43 +60,43 @@ ...@@ -58,43 +60,43 @@
= form.label :merge_requests_events, class: 'list-label form-check-label gl-ml-1' do = form.label :merge_requests_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Merge request events') %strong= s_('Webhooks|Merge request events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a merge request is created, updated, or merged') = s_('Webhooks|A merge request is created, updated, or merged.')
%li %li
= form.check_box :job_events, class: 'form-check-input' = form.check_box :job_events, class: 'form-check-input'
= form.label :job_events, class: 'list-label form-check-label gl-ml-1' do = form.label :job_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Job events') %strong= s_('Webhooks|Job events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when the job status changes') = s_("Webhooks|A job's status changes.")
%li %li
= form.check_box :pipeline_events, class: 'form-check-input' = form.check_box :pipeline_events, class: 'form-check-input'
= form.label :pipeline_events, class: 'list-label form-check-label gl-ml-1' do = form.label :pipeline_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Pipeline events') %strong= s_('Webhooks|Pipeline events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when the pipeline status changes') = s_("Webhooks|A pipeline's status changes.")
%li %li
= form.check_box :wiki_page_events, class: 'form-check-input' = form.check_box :wiki_page_events, class: 'form-check-input'
= form.label :wiki_page_events, class: 'list-label form-check-label gl-ml-1' do = form.label :wiki_page_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Wiki page events') %strong= s_('Webhooks|Wiki page events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a wiki page is created or updated') = s_('Webhooks|A wiki page is created or updated.')
%li %li
= form.check_box :deployment_events, class: 'form-check-input' = form.check_box :deployment_events, class: 'form-check-input'
= form.label :deployment_events, class: 'list-label form-check-label gl-ml-1' do = form.label :deployment_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Deployment events') %strong= s_('Webhooks|Deployment events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a deployment starts, finishes, fails, or is canceled') = s_('Webhooks|A deployment starts, finishes, fails, or is canceled.')
%li %li
= form.check_box :feature_flag_events, class: 'form-check-input' = form.check_box :feature_flag_events, class: 'form-check-input'
= form.label :feature_flag_events, class: 'list-label form-check-label gl-ml-1' do = form.label :feature_flag_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Feature flag events') %strong= s_('Webhooks|Feature flag events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a feature flag is turned on or off') = s_('Webhooks|A feature flag is turned on or off.')
%li %li
= form.check_box :releases_events, class: 'form-check-input' = form.check_box :releases_events, class: 'form-check-input'
= form.label :releases_events, class: 'list-label form-check-label gl-ml-1' do = form.label :releases_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Releases events') %strong= s_('Webhooks|Releases events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a release is created or updated') = s_('Webhooks|A release is created or updated.')
.form-group .form-group
= form.label :enable_ssl_verification, s_('Webhooks|SSL verification'), class: 'label-bold checkbox' = form.label :enable_ssl_verification, s_('Webhooks|SSL verification'), class: 'label-bold checkbox'
.form-check .form-check
......
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
= render 'shared/web_hooks/hook', hook: hook = render 'shared/web_hooks/hook', hook: hook
- else - else
%p.text-center.gl-mt-3.gl-mb-3 %p.text-center.gl-mt-3.gl-mb-3
= _('No webhooks found, add one in the form above.') = _('No webhooks enabled. Select trigger events above.')
...@@ -21,11 +21,10 @@ you can use webhooks to: ...@@ -21,11 +21,10 @@ you can use webhooks to:
every time an issue is created for a specific project or group in GitLab. every time an issue is created for a specific project or group in GitLab.
- [Automatically assign labels to merge requests](https://about.gitlab.com/blog/2016/08/19/applying-gitlab-labels-automatically/). - [Automatically assign labels to merge requests](https://about.gitlab.com/blog/2016/08/19/applying-gitlab-labels-automatically/).
You can configure your GitLab project or [group](#group-webhooks) to trigger You can configure your GitLab project or [group](#group-webhooks) to trigger a
a percent-encoded webhook URL when an event occurs. For example, when new code [percent-encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding) webhook URL
is pushed or a new issue is created. when an event occurs. For example, when new code is pushed or a new issue is created. The webhook
The webhook listens for specific [events](#events) and listens for specific [events](#events) and GitLab sends a POST request with data to the webhook URL.
GitLab sends a POST request with data to the webhook URL.
Usually, you set up your own [webhook receiver](#create-an-example-webhook-receiver) Usually, you set up your own [webhook receiver](#create-an-example-webhook-receiver)
to receive information from GitLab and send it to another app, according to your requirements. to receive information from GitLab and send it to another app, according to your requirements.
...@@ -55,7 +54,7 @@ You can configure a webhook for a group or a project. ...@@ -55,7 +54,7 @@ You can configure a webhook for a group or a project.
1. In your project or group, on the left sidebar, select **Settings > Webhooks**. 1. In your project or group, on the left sidebar, select **Settings > Webhooks**.
1. In **URL**, enter the URL of the webhook endpoint. 1. In **URL**, enter the URL of the webhook endpoint.
The URL must be percentage-encoded, if necessary. The URL must be percent-encoded if it contains one or more special characters.
1. In **Secret token**, enter the [secret token](#validate-payloads-by-using-a-secret-token) to validate payloads. 1. In **Secret token**, enter the [secret token](#validate-payloads-by-using-a-secret-token) to validate payloads.
1. In the **Trigger** section, select the [events](webhook_events.md) to trigger the webhook. 1. In the **Trigger** section, select the [events](webhook_events.md) to trigger the webhook.
1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](#verify-an-ssl-certificate). 1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](#verify-an-ssl-certificate).
......
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
= form.label :member_events, class: 'list-label form-check-label gl-ml-1' do = form.label :member_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Member events') %strong= s_('Webhooks|Member events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a group member is created, updated, or removed') = s_('Webhooks|A group member is created, updated, or removed.')
...@@ -3,4 +3,4 @@ ...@@ -3,4 +3,4 @@
= form.label :subgroup_events, class: 'list-label form-check-label gl-ml-1' do = form.label :subgroup_events, class: 'list-label form-check-label gl-ml-1' do
%strong= s_('Webhooks|Subgroup events') %strong= s_('Webhooks|Subgroup events')
%p.text-muted.gl-ml-1 %p.text-muted.gl-ml-1
= s_('Webhooks|URL is triggered when a subgroup is created or removed') = s_('Webhooks|A subgroup is created or removed.')
...@@ -24068,7 +24068,7 @@ msgstr "" ...@@ -24068,7 +24068,7 @@ msgstr ""
msgid "No webhook events" msgid "No webhook events"
msgstr "" msgstr ""
msgid "No webhooks found, add one in the form above." msgid "No webhooks enabled. Select trigger events above."
msgstr "" msgstr ""
msgid "No worries, you can still use all the %{strong}%{plan_name}%{strong_close} features for now. You have %{remaining_days} day to renew your subscription." msgid "No worries, you can still use all the %{strong}%{plan_name}%{strong_close} features for now. You have %{remaining_days} day to renew your subscription."
...@@ -39743,127 +39743,127 @@ msgstr "" ...@@ -39743,127 +39743,127 @@ msgstr ""
msgid "Webhooks Help" msgid "Webhooks Help"
msgstr "" msgstr ""
msgid "Webhooks|Comments" msgid "Webhooks|A comment is added to a confidential issue."
msgstr "" msgstr ""
msgid "Webhooks|Confidential comments" msgid "Webhooks|A comment is added to an issue."
msgstr "" msgstr ""
msgid "Webhooks|Confidential issues events" msgid "Webhooks|A confidential issue is created, updated, closed, or reopened."
msgstr "" msgstr ""
msgid "Webhooks|Deployment events" msgid "Webhooks|A deployment starts, finishes, fails, or is canceled."
msgstr "" msgstr ""
msgid "Webhooks|Enable SSL verification" msgid "Webhooks|A feature flag is turned on or off."
msgstr "" msgstr ""
msgid "Webhooks|Failed to connect" msgid "Webhooks|A group member is created, updated, or removed."
msgstr "" msgstr ""
msgid "Webhooks|Fails to connect" msgid "Webhooks|A job's status changes."
msgstr "" msgstr ""
msgid "Webhooks|Feature flag events" msgid "Webhooks|A merge request is created, updated, or merged."
msgstr "" msgstr ""
msgid "Webhooks|Issues events" msgid "Webhooks|A new tag is pushed to the repository."
msgstr "" msgstr ""
msgid "Webhooks|Job events" msgid "Webhooks|A pipeline's status changes."
msgstr "" msgstr ""
msgid "Webhooks|Member events" msgid "Webhooks|A release is created or updated."
msgstr "" msgstr ""
msgid "Webhooks|Merge request events" msgid "Webhooks|A subgroup is created or removed."
msgstr "" msgstr ""
msgid "Webhooks|Pipeline events" msgid "Webhooks|A wiki page is created or updated."
msgstr "" msgstr ""
msgid "Webhooks|Push events" msgid "Webhooks|An issue is created, updated, closed, or reopened."
msgstr "" msgstr ""
msgid "Webhooks|Releases events" msgid "Webhooks|Comments"
msgstr "" msgstr ""
msgid "Webhooks|SSL verification" msgid "Webhooks|Confidential comments"
msgstr "" msgstr ""
msgid "Webhooks|Secret token" msgid "Webhooks|Confidential issues events"
msgstr "" msgstr ""
msgid "Webhooks|Subgroup events" msgid "Webhooks|Deployment events"
msgstr "" msgstr ""
msgid "Webhooks|Tag push events" msgid "Webhooks|Enable SSL verification"
msgstr "" msgstr ""
msgid "Webhooks|The webhook %{help_link_start}failed to connect%{help_link_end}, and will retry in %{retry_time}. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below." msgid "Webhooks|Failed to connect"
msgstr "" msgstr ""
msgid "Webhooks|The webhook failed to connect, and is disabled. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below." msgid "Webhooks|Fails to connect"
msgstr "" msgstr ""
msgid "Webhooks|The webhook was triggered more than %{limit} times per minute and is now disabled. To re-enable this webhook, fix the problems shown in %{strong_start}Recent events%{strong_end}, then re-test your settings. %{support_link_start}Contact Support%{support_link_end} if you need help re-enabling your webhook." msgid "Webhooks|Feature flag events"
msgstr "" msgstr ""
msgid "Webhooks|Trigger" msgid "Webhooks|Issues events"
msgstr "" msgstr ""
msgid "Webhooks|URL" msgid "Webhooks|Job events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered by a push to the repository" msgid "Webhooks|Member events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a confidential issue is created, updated, closed, or reopened" msgid "Webhooks|Merge request events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a deployment starts, finishes, fails, or is canceled" msgid "Webhooks|Pipeline events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a feature flag is turned on or off" msgid "Webhooks|Push events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a group member is created, updated, or removed" msgid "Webhooks|Push to the repository."
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a merge request is created, updated, or merged" msgid "Webhooks|Releases events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a new tag is pushed to the repository" msgid "Webhooks|SSL verification"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a release is created or updated" msgid "Webhooks|Secret token"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a subgroup is created or removed" msgid "Webhooks|Subgroup events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when a wiki page is created or updated" msgid "Webhooks|Tag push events"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when an issue is created, updated, closed, or reopened" msgid "Webhooks|The webhook %{help_link_start}failed to connect%{help_link_end}, and will retry in %{retry_time}. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below."
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when someone adds a comment" msgid "Webhooks|The webhook failed to connect, and is disabled. To re-enable it, check %{strong_start}Recent events%{strong_end} for error details, then test your settings below."
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when someone adds a comment on a confidential issue" msgid "Webhooks|The webhook was triggered more than %{limit} times per minute and is now disabled. To re-enable this webhook, fix the problems shown in %{strong_start}Recent events%{strong_end}, then re-test your settings. %{support_link_start}Contact Support%{support_link_end} if you need help re-enabling your webhook."
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when the job status changes" msgid "Webhooks|Trigger"
msgstr "" msgstr ""
msgid "Webhooks|URL is triggered when the pipeline status changes" msgid "Webhooks|URL"
msgstr "" msgstr ""
msgid "Webhooks|URL must be percent-encoded if neccessary." msgid "Webhooks|URL must be percent-encoded if it contains one or more special characters."
msgstr "" msgstr ""
msgid "Webhooks|Use this token to validate received payloads. It is sent with the request in the X-Gitlab-Token HTTP header." msgid "Webhooks|Used to validate received payloads. Sent with the request in the %{code_start}X-Gitlab-Token HTTP%{code_end} header."
msgstr "" msgstr ""
msgid "Webhooks|Webhook failed to connect" msgid "Webhooks|Webhook failed to connect"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment