Commit 2e6deff6 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '358374-update-mirror-form-checkboxes' into 'master'

Update repository mirror settings checkboxes

See merge request gitlab-org/gitlab!84820
parents a8cf3be2 0cc7d850
......@@ -14,7 +14,7 @@
.settings-content
- if mirror_settings_enabled
= form_for @project, url: project_mirror_path(@project), html: { class: 'gl-show-field-errors js-mirror-form', autocomplete: 'new-password', data: mirrors_form_data_attributes } do |f|
= gitlab_ui_form_for @project, url: project_mirror_path(@project), html: { class: 'gl-show-field-errors js-mirror-form', autocomplete: 'new-password', data: mirrors_form_data_attributes } do |f|
.panel.panel-default
.panel-body
%div= form_errors(@project)
......
......@@ -33,12 +33,12 @@
.help-block
= _('You will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches.')
.form-check.gl-mb-3
= f.check_box :mirror_overwrites_diverged_branches, class: 'form-check-input', checked: false
= f.label :mirror_overwrites_diverged_branches, _('Overwrite diverged branches'), class: 'form-check-label'
.form-text.text-muted
= _("If disabled, a diverged local branch will not be automatically updated with commits from its remote counterpart, to prevent local data loss. If the default branch (%{default_branch}) has diverged and cannot be updated, mirroring will fail. Other diverged branches are silently ignored.") % { default_branch: @project.default_branch }
= link_to _('Learn more.'), help_page_path('user/project/repository/mirror/pull.md', anchor: 'overwrite-diverged-branches'), target: '_blank', rel: 'noopener noreferrer'
- overwrite_diverged_branches_help_link = help_page_path('user/project/repository/mirror/pull.md', anchor: 'overwrite-diverged-branches')
- overwrite_diverged_branches_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: overwrite_diverged_branches_help_link }
= f.gitlab_ui_checkbox_component :mirror_overwrites_diverged_branches,
_('Overwrite diverged branches'),
help_text: _("If disabled, a diverged local branch will not be automatically updated with commits from its remote counterpart, to prevent local data loss. If the default branch (%{default_branch}) has diverged and cannot be updated, mirroring will fail. Other diverged branches are silently ignored. %{link_start}Learn more.%{link_end}").html_safe % { default_branch: @project.default_branch, link_start: overwrite_diverged_branches_help_link_start, link_end: '</a>'.html_safe },
checkbox_options: { checked: false }
- if @project.builds_enabled?
= render 'shared/mirror_trigger_builds_setting', f: f, checked: false
- checked = local_assigns.fetch(:checked, nil)
- check_box_options = {}
- check_box_options[:checked] = checked unless checked.nil?
- trigger_pipelines_for_mirror_updates_help_link = help_page_path('user/project/repository/mirror/pull.md', anchor: 'trigger-pipelines-for-mirror-updates')
- trigger_pipelines_for_mirror_updates_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: trigger_pipelines_for_mirror_updates_help_link }
.form-check.gl-mb-3
= f.check_box :mirror_trigger_builds, check_box_options.merge(class: "form-check-input")
= f.label :mirror_trigger_builds, _("Trigger pipelines for mirror updates"), class: "form-check-label"
.form-text.text-muted
= _('Trigger pipelines when branches or tags are updated in the upstream repository. Depending on the activity of the upstream repository, this may greatly increase the load on your CI runners. Only enable this if you know they can handle the load.')
%strong= _('CI will run using the credentials assigned above.')
= link_to _('Learn more.'), help_page_path('user/project/repository/mirror/pull.md', anchor: 'trigger-pipelines-for-mirror-updates'), target: '_blank', rel: 'noopener noreferrer'
= f.gitlab_ui_checkbox_component :mirror_trigger_builds,
_("Trigger pipelines for mirror updates"),
help_text: _('Trigger pipelines when branches or tags are updated in the upstream repository. Depending on the activity of the upstream repository, this may greatly increase the load on your CI runners. Only enable this if you know they can handle the load. %{strong_start}CI will run using the credentials assigned above.%{strong_end} %{link_start}Learn more.%{link_end}').html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: trigger_pipelines_for_mirror_updates_help_link_start, link_end: '</a>'.html_safe },
checkbox_options: check_box_options
......@@ -6556,9 +6556,6 @@ msgstr ""
msgid "CI variables"
msgstr ""
msgid "CI will run using the credentials assigned above."
msgstr ""
msgid "CI/CD"
msgstr ""
......@@ -18878,7 +18875,7 @@ msgstr ""
msgid "If checked, new group memberships and permissions can only be added via LDAP synchronization"
msgstr ""
msgid "If disabled, a diverged local branch will not be automatically updated with commits from its remote counterpart, to prevent local data loss. If the default branch (%{default_branch}) has diverged and cannot be updated, mirroring will fail. Other diverged branches are silently ignored."
msgid "If disabled, a diverged local branch will not be automatically updated with commits from its remote counterpart, to prevent local data loss. If the default branch (%{default_branch}) has diverged and cannot be updated, mirroring will fail. Other diverged branches are silently ignored. %{link_start}Learn more.%{link_end}"
msgstr ""
msgid "If disabled, only administrators can configure repository mirroring."
......@@ -39904,7 +39901,7 @@ msgstr ""
msgid "Trigger pipelines for mirror updates"
msgstr ""
msgid "Trigger pipelines when branches or tags are updated in the upstream repository. Depending on the activity of the upstream repository, this may greatly increase the load on your CI runners. Only enable this if you know they can handle the load."
msgid "Trigger pipelines when branches or tags are updated in the upstream repository. Depending on the activity of the upstream repository, this may greatly increase the load on your CI runners. Only enable this if you know they can handle the load. %{strong_start}CI will run using the credentials assigned above.%{strong_end} %{link_start}Learn more.%{link_end}"
msgstr ""
msgid "Trigger removed."
......
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