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 @@ ...@@ -14,7 +14,7 @@
.settings-content .settings-content
- if mirror_settings_enabled - 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.panel-default
.panel-body .panel-body
%div= form_errors(@project) %div= form_errors(@project)
......
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
.help-block .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.') = _('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 - overwrite_diverged_branches_help_link = help_page_path('user/project/repository/mirror/pull.md', anchor: 'overwrite-diverged-branches')
= f.check_box :mirror_overwrites_diverged_branches, class: 'form-check-input', checked: false - overwrite_diverged_branches_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: overwrite_diverged_branches_help_link }
= f.label :mirror_overwrites_diverged_branches, _('Overwrite diverged branches'), class: 'form-check-label' = f.gitlab_ui_checkbox_component :mirror_overwrites_diverged_branches,
.form-text.text-muted _('Overwrite diverged branches'),
= _("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 } 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 },
= link_to _('Learn more.'), help_page_path('user/project/repository/mirror/pull.md', anchor: 'overwrite-diverged-branches'), target: '_blank', rel: 'noopener noreferrer' checkbox_options: { checked: false }
- if @project.builds_enabled? - if @project.builds_enabled?
= render 'shared/mirror_trigger_builds_setting', f: f, checked: false = render 'shared/mirror_trigger_builds_setting', f: f, checked: false
- checked = local_assigns.fetch(:checked, nil) - checked = local_assigns.fetch(:checked, nil)
- check_box_options = {} - check_box_options = {}
- check_box_options[:checked] = checked unless checked.nil? - 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.gitlab_ui_checkbox_component :mirror_trigger_builds,
= f.check_box :mirror_trigger_builds, check_box_options.merge(class: "form-check-input") _("Trigger pipelines for mirror updates"),
= f.label :mirror_trigger_builds, _("Trigger pipelines for mirror updates"), class: "form-check-label" 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 },
.form-text.text-muted checkbox_options: check_box_options
= _('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'
...@@ -6556,9 +6556,6 @@ msgstr "" ...@@ -6556,9 +6556,6 @@ msgstr ""
msgid "CI variables" msgid "CI variables"
msgstr "" msgstr ""
msgid "CI will run using the credentials assigned above."
msgstr ""
msgid "CI/CD" msgid "CI/CD"
msgstr "" msgstr ""
...@@ -18878,7 +18875,7 @@ msgstr "" ...@@ -18878,7 +18875,7 @@ msgstr ""
msgid "If checked, new group memberships and permissions can only be added via LDAP synchronization" msgid "If checked, new group memberships and permissions can only be added via LDAP synchronization"
msgstr "" 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 "" msgstr ""
msgid "If disabled, only administrators can configure repository mirroring." msgid "If disabled, only administrators can configure repository mirroring."
...@@ -39904,7 +39901,7 @@ msgstr "" ...@@ -39904,7 +39901,7 @@ msgstr ""
msgid "Trigger pipelines for mirror updates" msgid "Trigger pipelines for mirror updates"
msgstr "" 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 "" msgstr ""
msgid "Trigger removed." 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