Commit 0a170ec0 authored by Mark Chao's avatar Mark Chao

Merge branch '328681-incorrect-field-label-for-integrations' into 'master'

Update label of select branch dropdown on chat integrations edit page

See merge request gitlab-org/gitlab!73098
parents f372ec6f 00a9bb6c
...@@ -73,7 +73,12 @@ module Integrations ...@@ -73,7 +73,12 @@ module Integrations
{ type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}", required: true }.freeze, { type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}", required: true }.freeze,
{ type: 'text', name: 'username', placeholder: 'GitLab-integration' }.freeze, { type: 'text', name: 'username', placeholder: 'GitLab-integration' }.freeze,
{ type: 'checkbox', name: 'notify_only_broken_pipelines', help: 'Do not send notifications for successful pipelines.' }.freeze, { type: 'checkbox', name: 'notify_only_broken_pipelines', help: 'Do not send notifications for successful pipelines.' }.freeze,
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices }.freeze, {
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
}.freeze,
{ {
type: 'text', type: 'text',
name: 'labels_to_be_notified', name: 'labels_to_be_notified',
......
...@@ -41,7 +41,12 @@ module Integrations ...@@ -41,7 +41,12 @@ module Integrations
[ [
{ type: "text", name: "webhook", placeholder: "https://discordapp.com/api/webhooks/…", help: "URL to the webhook for the Discord channel." }, { type: "text", name: "webhook", placeholder: "https://discordapp.com/api/webhooks/…", help: "URL to the webhook for the Discord channel." },
{ type: "checkbox", name: "notify_only_broken_pipelines" }, { type: "checkbox", name: "notify_only_broken_pipelines" },
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices } {
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
}
] ]
end end
......
...@@ -76,7 +76,12 @@ module Integrations ...@@ -76,7 +76,12 @@ module Integrations
help: s_("EmailsOnPushService|Send notifications from the committer's email address if the domain matches the domain used by your GitLab instance (such as %{domains}).") % { domains: domains } }, help: s_("EmailsOnPushService|Send notifications from the committer's email address if the domain matches the domain used by your GitLab instance (such as %{domains}).") % { domains: domains } },
{ type: 'checkbox', name: 'disable_diffs', title: s_("EmailsOnPushService|Disable code diffs"), { type: 'checkbox', name: 'disable_diffs', title: s_("EmailsOnPushService|Disable code diffs"),
help: s_("EmailsOnPushService|Don't include possibly sensitive code diffs in notification body.") }, help: s_("EmailsOnPushService|Don't include possibly sensitive code diffs in notification body.") },
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices }, {
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
},
{ {
type: 'textarea', type: 'textarea',
name: 'recipients', name: 'recipients',
......
...@@ -40,7 +40,12 @@ module Integrations ...@@ -40,7 +40,12 @@ module Integrations
[ [
{ type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}" }, { type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}" },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' },
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices } {
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
}
] ]
end end
......
...@@ -37,7 +37,12 @@ module Integrations ...@@ -37,7 +37,12 @@ module Integrations
[ [
{ type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}" }, { type: 'text', name: 'webhook', placeholder: "#{webhook_placeholder}" },
{ type: 'checkbox', name: 'notify_only_broken_pipelines', help: 'If selected, successful pipelines do not trigger a notification event.' }, { type: 'checkbox', name: 'notify_only_broken_pipelines', help: 'If selected, successful pipelines do not trigger a notification event.' },
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices } {
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
}
] ]
end end
......
...@@ -71,6 +71,7 @@ module Integrations ...@@ -71,6 +71,7 @@ module Integrations
name: 'notify_only_broken_pipelines' }, name: 'notify_only_broken_pipelines' },
{ type: 'select', { type: 'select',
name: 'branches_to_be_notified', name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices } choices: branch_choices }
] ]
end end
......
...@@ -34,7 +34,12 @@ module Integrations ...@@ -34,7 +34,12 @@ module Integrations
[ [
{ type: 'text', name: 'webhook', placeholder: "https://yourcircuit.com/rest/v2/webhooks/incoming/…", required: true }, { type: 'text', name: 'webhook', placeholder: "https://yourcircuit.com/rest/v2/webhooks/incoming/…", required: true },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' },
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices } {
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
}
] ]
end end
......
...@@ -36,7 +36,12 @@ module Integrations ...@@ -36,7 +36,12 @@ module Integrations
[ [
{ type: 'text', name: 'webhook', placeholder: "https://api.ciscospark.com/v1/webhooks/incoming/...", required: true }, { type: 'text', name: 'webhook', placeholder: "https://api.ciscospark.com/v1/webhooks/incoming/...", required: true },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' }, { type: 'checkbox', name: 'notify_only_broken_pipelines' },
{ type: 'select', name: 'branches_to_be_notified', choices: branch_choices } {
type: 'select',
name: 'branches_to_be_notified',
title: s_('Integrations|Branches for which notifications are to be sent'),
choices: branch_choices
}
] ]
end end
......
...@@ -54,7 +54,7 @@ Then fill in the integration configuration: ...@@ -54,7 +54,7 @@ Then fill in the integration configuration:
To change the bot's username, provide a value. To change the bot's username, provide a value.
- **Notify only broken pipelines**: If you enable the **Pipeline** event, and you want - **Notify only broken pipelines**: If you enable the **Pipeline** event, and you want
notifications about failed pipelines only. notifications about failed pipelines only.
- **Branches to be notified**: The branches to send notifications for. - **Branches for which notifications are to be sent**: The branches to send notifications for.
- **Labels to be notified**: (Optional) Labels required for the issue or merge request - **Labels to be notified**: (Optional) Labels required for the issue or merge request
to trigger a notification. Leave blank to notify for all issues and merge requests. to trigger a notification. Leave blank to notify for all issues and merge requests.
- **Labels to be notified behavior**: When you use the **Labels to be notified** filter, - **Labels to be notified behavior**: When you use the **Labels to be notified** filter,
......
...@@ -45,7 +45,7 @@ to control GitLab from Slack. Slash commands are configured separately. ...@@ -45,7 +45,7 @@ to control GitLab from Slack. Slash commands are configured separately.
1. (Optional) In **Username**, enter the username of the Slack bot that sends 1. (Optional) In **Username**, enter the username of the Slack bot that sends
the notifications. the notifications.
1. Select the **Notify only broken pipelines** checkbox to notify only on failures. 1. Select the **Notify only broken pipelines** checkbox to notify only on failures.
1. In the **Branches to be notified** dropdown, select which types of branches 1. In the **Branches for which notifications are to be sent** dropdown, select which types of branches
to send notifications for. to send notifications for.
1. Leave the **Labels to be notified** field blank to get all notifications, or 1. Leave the **Labels to be notified** field blank to get all notifications, or
add labels that the issue or merge request must have to trigger a add labels that the issue or merge request must have to trigger a
......
...@@ -21,7 +21,7 @@ In GitLab: ...@@ -21,7 +21,7 @@ In GitLab:
1. Select the checkboxes corresponding to the GitLab events you want to receive in Unify Circuit. 1. Select the checkboxes corresponding to the GitLab events you want to receive in Unify Circuit.
1. Paste the **Webhook URL** that you copied from the Unify Circuit configuration step. 1. Paste the **Webhook URL** that you copied from the Unify Circuit configuration step.
1. Select the **Notify only broken pipelines** checkbox to notify only on failures. 1. Select the **Notify only broken pipelines** checkbox to notify only on failures.
1. In the **Branches to be notified** dropdown, select which types of branches to send notifications for. 1. In the **Branches for which notifications are to be sent** dropdown, select which types of branches to send notifications for.
1. Select `Save changes` or optionally select **Test settings**. 1. Select `Save changes` or optionally select **Test settings**.
Your Unify Circuit conversation now starts receiving GitLab event notifications. Your Unify Circuit conversation now starts receiving GitLab event notifications.
...@@ -18350,6 +18350,9 @@ msgstr "" ...@@ -18350,6 +18350,9 @@ msgstr ""
msgid "Integrations|An error occurred while loading projects using custom settings." msgid "Integrations|An error occurred while loading projects using custom settings."
msgstr "" msgstr ""
msgid "Integrations|Branches for which notifications are to be sent"
msgstr ""
msgid "Integrations|Browser limitations" msgid "Integrations|Browser limitations"
msgstr "" msgstr ""
......
...@@ -86,7 +86,7 @@ RSpec.describe ServiceFieldEntity do ...@@ -86,7 +86,7 @@ RSpec.describe ServiceFieldEntity do
expected_hash = { expected_hash = {
type: 'select', type: 'select',
name: 'branches_to_be_notified', name: 'branches_to_be_notified',
title: nil, title: 'Branches for which notifications are to be sent',
placeholder: nil, placeholder: nil,
required: nil, required: nil,
choices: [['All branches', 'all'], ['Default branch', 'default'], ['Protected branches', 'protected'], ['Default branch and protected branches', 'default_and_protected']], choices: [['All branches', 'all'], ['Default branch', 'default'], ['Protected branches', 'protected'], ['Default branch and protected branches', 'default_and_protected']],
......
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