diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-02 18:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-02 18:09:06 +0300 |
commit | dab865db1e85e2fc3dd29dae8dc6b8e11b1ba3f7 (patch) | |
tree | 12a383ef1779b38c36d170ee5a6fe90585985f0f | |
parent | bdf5d637dab13620c56063c628274746182196ad (diff) |
Add latest changes from gitlab-org/gitlab@master
66 files changed, 305 insertions, 118 deletions
diff --git a/.stylelintrc b/.stylelintrc index b0ace93e04f..b9174d1dca1 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -1,4 +1,10 @@ { + "ignoreFiles": [ + "app/assets/stylesheets/pages/emojis.scss", + "app/assets/stylesheets/startup/startup-*.scss", + "app/assets/stylesheets/lazy_bundles/select2.scss", + "app/assets/stylesheets/highlight/themes/*.scss" + ], "plugins":[ "./scripts/frontend/stylelint/stylelint-duplicate-selectors.js", "./scripts/frontend/stylelint/stylelint-utility-classes.js", @@ -47,7 +53,7 @@ "indentation":2, "length-zero-no-unit":true, "max-nesting-depth":[ - 3, + 6, { "ignoreAtRules":[ "each", @@ -97,15 +103,22 @@ } ], "selector-list-comma-newline-after":"always", - "selector-max-compound-selectors":[3, { "severity": "warning" }], + "selector-max-compound-selectors":[6, { "severity": "warning" }], "selector-max-id":1, "selector-no-vendor-prefix":true, "selector-pseudo-element-colon-notation":"double", "selector-pseudo-element-no-unknown":true, "shorthand-property-no-redundant-values":true, "string-quotes":"single", - "value-no-vendor-prefix":[true, { "ignoreValues": ["sticky"] }], + "value-no-vendor-prefix": [true, { "ignoreValues": ["sticky"] }], "stylelint-gitlab/duplicate-selectors":[true,{ "severity": "warning" }], - "stylelint-gitlab/utility-classes":[true,{ "severity": "warning" }] + "stylelint-gitlab/utility-classes":[true,{ "severity": "warning" }], + "declaration-block-no-duplicate-properties": [ + true, + { + "ignore": ["consecutive-duplicates"] + } + ], + "no-eol-whitespace": true, } } @@ -103,7 +103,7 @@ gem 'hashie-forbidden_attributes' gem 'kaminari', '~> 1.0' # HAML -gem 'hamlit', '~> 2.14.2' +gem 'hamlit', '~> 2.14.4' # Files attachments gem 'carrierwave', '~> 1.3' diff --git a/Gemfile.lock b/Gemfile.lock index 61dfa7937b3..0c5d8782686 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -559,7 +559,7 @@ GEM rainbow rubocop (>= 0.50.0) sysexits (~> 1.1) - hamlit (2.14.2) + hamlit (2.14.4) temple (>= 0.8.2) thor tilt @@ -1392,7 +1392,7 @@ DEPENDENCIES gssapi guard-rspec haml_lint (~> 0.36.0) - hamlit (~> 2.14.2) + hamlit (~> 2.14.4) hangouts-chat (~> 0.0.5) hashie hashie-forbidden_attributes diff --git a/app/assets/javascripts/alert_management/components/sidebar/sidebar_header.vue b/app/assets/javascripts/alert_management/components/sidebar/sidebar_header.vue index 70902a204f8..fd40b5d9f65 100644 --- a/app/assets/javascripts/alert_management/components/sidebar/sidebar_header.vue +++ b/app/assets/javascripts/alert_management/components/sidebar/sidebar_header.vue @@ -27,7 +27,7 @@ export default { <template> <div class="block gl-display-flex gl-justify-content-space-between"> <span class="issuable-header-text hide-collapsed"> - {{ __('To-Do') }} + {{ __('To Do') }} </span> <sidebar-todo v-if="!sidebarCollapsed" diff --git a/app/assets/javascripts/alert_management/components/sidebar/sidebar_todo.vue b/app/assets/javascripts/alert_management/components/sidebar/sidebar_todo.vue index 7255f7bf0b8..34d34f3d232 100644 --- a/app/assets/javascripts/alert_management/components/sidebar/sidebar_todo.vue +++ b/app/assets/javascripts/alert_management/components/sidebar/sidebar_todo.vue @@ -9,7 +9,7 @@ import alertQuery from '../../graphql/queries/details.query.graphql'; export default { i18n: { UPDATE_ALERT_TODO_ERROR: s__( - 'AlertManagement|There was an error while updating the To-Do of the alert.', + 'AlertManagement|There was an error while updating the to-do item of the alert.', ), }, components: { diff --git a/app/assets/javascripts/badges/components/badge_form.vue b/app/assets/javascripts/badges/components/badge_form.vue index 9e09f527a39..0beb6bed9ea 100644 --- a/app/assets/javascripts/badges/components/badge_form.vue +++ b/app/assets/javascripts/badges/components/badge_form.vue @@ -179,7 +179,7 @@ export default { id="badge-link-url" v-model="linkUrl" type="URL" - class="form-control" + class="form-control gl-form-input" required @input="debouncedPreview" /> @@ -194,7 +194,7 @@ export default { id="badge-image-url" v-model="imageUrl" type="URL" - class="form-control" + class="form-control gl-form-input" required @input="debouncedPreview" /> diff --git a/app/assets/javascripts/boards/components/board_add_new_column_trigger.vue b/app/assets/javascripts/boards/components/board_add_new_column_trigger.vue new file mode 100644 index 00000000000..ea68df9ce12 --- /dev/null +++ b/app/assets/javascripts/boards/components/board_add_new_column_trigger.vue @@ -0,0 +1,21 @@ +<script> +import { GlButton } from '@gitlab/ui'; +import { mapActions } from 'vuex'; + +export default { + components: { + GlButton, + }, + methods: { + ...mapActions(['setAddColumnFormVisibility']), + }, +}; +</script> + +<template> + <span class="gl-ml-4"> + <gl-button variant="success" @click="setAddColumnFormVisibility(true)" + >{{ __('Create list') }} + </gl-button> + </span> +</template> diff --git a/app/assets/javascripts/boards/index.js b/app/assets/javascripts/boards/index.js index b3c34bbaefe..5e8dd81438b 100644 --- a/app/assets/javascripts/boards/index.js +++ b/app/assets/javascripts/boards/index.js @@ -16,6 +16,7 @@ import { getBoardsModalData, } from 'ee_else_ce/boards/ee_functions'; +import BoardAddNewColumnTrigger from '~/boards/components/board_add_new_column_trigger.vue'; import BoardContent from '~/boards/components/board_content.vue'; import BoardExtraActions from '~/boards/components/board_extra_actions.vue'; import createDefaultClient from '~/lib/graphql'; @@ -288,6 +289,21 @@ export default () => { }, }); + const createColumnTriggerEl = document.querySelector('.js-create-column-trigger'); + if (createColumnTriggerEl) { + // eslint-disable-next-line no-new + new Vue({ + el: createColumnTriggerEl, + components: { + BoardAddNewColumnTrigger, + }, + store, + render(createElement) { + return createElement('board-add-new-column-trigger'); + }, + }); + } + boardConfigToggle(boardsStore); const issueBoardsModal = document.getElementById('js-add-issues-btn'); diff --git a/app/assets/javascripts/boards/stores/actions.js b/app/assets/javascripts/boards/stores/actions.js index c1faccd3405..8c9f86b17a4 100644 --- a/app/assets/javascripts/boards/stores/actions.js +++ b/app/assets/javascripts/boards/stores/actions.js @@ -547,6 +547,10 @@ export default { } }, + setAddColumnFormVisibility: ({ commit }, visible) => { + commit(types.SET_ADD_COLUMN_FORM_VISIBLE, visible); + }, + fetchBacklog: () => { notImplemented(); }, diff --git a/app/assets/javascripts/boards/stores/mutation_types.js b/app/assets/javascripts/boards/stores/mutation_types.js index 443c3461012..5ec0ee158df 100644 --- a/app/assets/javascripts/boards/stores/mutation_types.js +++ b/app/assets/javascripts/boards/stores/mutation_types.js @@ -42,3 +42,4 @@ export const RECEIVE_GROUP_PROJECTS_FAILURE = 'RECEIVE_GROUP_PROJECTS_FAILURE'; export const SET_SELECTED_PROJECT = 'SET_SELECTED_PROJECT'; export const ADD_BOARD_ITEM_TO_SELECTION = 'ADD_BOARD_ITEM_TO_SELECTION'; export const REMOVE_BOARD_ITEM_FROM_SELECTION = 'REMOVE_BOARD_ITEM_FROM_SELECTION'; +export const SET_ADD_COLUMN_FORM_VISIBLE = 'SET_ADD_COLUMN_FORM_VISIBLE'; diff --git a/app/assets/javascripts/boards/stores/mutations.js b/app/assets/javascripts/boards/stores/mutations.js index b626acc208f..acf62782fad 100644 --- a/app/assets/javascripts/boards/stores/mutations.js +++ b/app/assets/javascripts/boards/stores/mutations.js @@ -270,4 +270,8 @@ export default { state.selectedBoardItems.filter((obj) => obj !== boardItem), ); }, + + [mutationTypes.SET_ADD_COLUMN_FORM_VISIBLE]: (state, visible) => { + state.addColumnFormVisible = visible; + }, }; diff --git a/app/assets/javascripts/boards/stores/state.js b/app/assets/javascripts/boards/stores/state.js index d2e10fbf29b..badbd2d80e5 100644 --- a/app/assets/javascripts/boards/stores/state.js +++ b/app/assets/javascripts/boards/stores/state.js @@ -24,6 +24,7 @@ export default () => ({ }, selectedProject: {}, error: undefined, + addColumnFormVisible: false, // TODO: remove after ce/ee split of board_content.vue isShowingEpicsSwimlanes: false, }); diff --git a/app/assets/javascripts/deploy_keys/components/keys_panel.vue b/app/assets/javascripts/deploy_keys/components/keys_panel.vue index 2693cd08cc3..d71f4f5507f 100644 --- a/app/assets/javascripts/deploy_keys/components/keys_panel.vue +++ b/app/assets/javascripts/deploy_keys/components/keys_panel.vue @@ -48,7 +48,7 @@ export default { :project-id="projectId" /> </template> - <div v-else class="settings-message text-center"> + <div v-else class="settings-message text-center gl-mt-5"> {{ s__('DeployKeys|No deploy keys found. Create one with the form above.') }} </div> </div> diff --git a/app/assets/javascripts/design_management/utils/error_messages.js b/app/assets/javascripts/design_management/utils/error_messages.js index cb4bb6e26a8..e7b2c814bb3 100644 --- a/app/assets/javascripts/design_management/utils/error_messages.js +++ b/app/assets/javascripts/design_management/utils/error_messages.js @@ -44,13 +44,13 @@ export const MOVE_DESIGN_ERROR = __( 'Something went wrong when reordering designs. Please try again', ); -export const CREATE_DESIGN_TODO_ERROR = __('Failed to create To-Do for the design.'); +export const CREATE_DESIGN_TODO_ERROR = __('Failed to create a to-do item for the design.'); -export const CREATE_DESIGN_TODO_EXISTS_ERROR = __('There is already a To-Do for this design.'); +export const CREATE_DESIGN_TODO_EXISTS_ERROR = __('There is already a to-do item for this design.'); -export const DELETE_DESIGN_TODO_ERROR = __('Failed to remove To-Do for the design.'); +export const DELETE_DESIGN_TODO_ERROR = __('Failed to remove a to-do item for the design.'); -export const TOGGLE_TODO_ERROR = __('Failed to toggle To-Do for the design.'); +export const TOGGLE_TODO_ERROR = __('Failed to toggle the to-do status for the design.'); const MAX_SKIPPED_FILES_LISTINGS = 5; diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue index bda797881ca..8a7dbf890ab 100644 --- a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue +++ b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue @@ -75,6 +75,11 @@ export default { required: false, default: false, }, + securityAndComplianceAvailable: { + type: Boolean, + required: false, + default: false, + }, visibilityHelpPath: { type: String, required: false, @@ -141,6 +146,7 @@ export default { metricsDashboardAccessLevel: featureAccessLevel.PROJECT_MEMBERS, analyticsAccessLevel: featureAccessLevel.EVERYONE, requirementsAccessLevel: featureAccessLevel.EVERYONE, + securityAndComplianceAccessLevel: featureAccessLevel.PROJECT_MEMBERS, operationsAccessLevel: featureAccessLevel.EVERYONE, containerRegistryEnabled: true, lfsEnabled: true, @@ -264,6 +270,10 @@ export default { featureAccessLevel.PROJECT_MEMBERS, this.requirementsAccessLevel, ); + this.securityAndComplianceAccessLevel = Math.min( + featureAccessLevel.PROJECT_MEMBERS, + this.securityAndComplianceAccessLevel, + ); this.operationsAccessLevel = Math.min( featureAccessLevel.PROJECT_MEMBERS, this.operationsAccessLevel, @@ -553,6 +563,17 @@ export default { /> </project-setting-row> <project-setting-row + v-if="securityAndComplianceAvailable" + :label="s__('ProjectSettings|Security & Compliance')" + :help-text="s__('ProjectSettings|Security & Compliance for this project')" + > + <project-feature-setting + v-model="securityAndComplianceAccessLevel" + :options="featureAccessLevelOptions" + name="project[project_feature_attributes][security_and_compliance_access_level]" + /> + </project-setting-row> + <project-setting-row ref="wiki-settings" :label="s__('ProjectSettings|Wiki')" :help-text="s__('ProjectSettings|Pages for project documentation')" diff --git a/app/assets/javascripts/pages/projects/shared/permissions/mixins/settings_pannel_mixin.js b/app/assets/javascripts/pages/projects/shared/permissions/mixins/settings_pannel_mixin.js index ae0936417ad..b52e30dae39 100644 --- a/app/assets/javascripts/pages/projects/shared/permissions/mixins/settings_pannel_mixin.js +++ b/app/assets/javascripts/pages/projects/shared/permissions/mixins/settings_pannel_mixin.js @@ -3,6 +3,7 @@ export default { return { packagesEnabled: false, requirementsEnabled: false, + securityAndComplianceEnabled: false, }; }, watch: { diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component.vue b/app/assets/javascripts/pipelines/components/graph/graph_component.vue index 19e1f1e4e4c..9b2b1accb8b 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component.vue @@ -168,6 +168,7 @@ export default { <template #downstream> <linked-pipelines-column v-if="showDownstreamPipelines" + class="gl-mr-6" :linked-pipelines="downstreamPipelines" :column-title="__('Downstream')" :type="$options.pipelineTypeConstants.DOWNSTREAM" diff --git a/app/assets/javascripts/vue_shared/components/todo_button.vue b/app/assets/javascripts/vue_shared/components/todo_button.vue index a9d4f8403fa..935d222a1a9 100644 --- a/app/assets/javascripts/vue_shared/components/todo_button.vue +++ b/app/assets/javascripts/vue_shared/components/todo_button.vue @@ -15,7 +15,7 @@ export default { }, computed: { buttonLabel() { - return this.isTodo ? __('Mark as done') : __('Add a To Do'); + return this.isTodo ? __('Mark as done') : __('Add a to do'); }, }, }; diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 74c01caab9c..6e5a4dbb08a 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -105,7 +105,7 @@ module CommitsHelper tooltip = _("Browse Directory") end - link_to url, class: "btn btn-default has-tooltip", title: tooltip, data: { container: "body" } do + link_to url, class: "btn gl-button btn-default has-tooltip", title: tooltip, data: { container: "body" } do sprite_icon('folder-open') end end diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 79e7a279479..a5f64837c02 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -215,24 +215,12 @@ module IssuablesHelper state_title = titles[state] || state.to_s.humanize html = content_tag(:span, state_title) - if display_count - count = issuables_count_for_state(issuable_type, state) - tag = - if count == -1 - tooltip = _("Couldn't calculate number of %{issuables}.") % { issuables: issuable_type.to_s.humanize(capitalize: false) } - - content_tag( - :span, - '?', - class: 'badge badge-pill has-tooltip', - aria: { label: tooltip }, - title: tooltip - ) - else - content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill') - end - - html << " " << tag + return html.html_safe unless display_count + + count = issuables_count_for_state(issuable_type, state) + + if count != -1 + html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill') end html.html_safe diff --git a/app/models/issue_link.rb b/app/models/issue_link.rb index 5448ebdf50b..ba97874ed39 100644 --- a/app/models/issue_link.rb +++ b/app/models/issue_link.rb @@ -17,9 +17,11 @@ class IssueLink < ApplicationRecord TYPE_RELATES_TO = 'relates_to' TYPE_BLOCKS = 'blocks' + # we don't store is_blocked_by in the db but need it for displaying the relation + # from the target (used in IssueLink.inverse_link_type) TYPE_IS_BLOCKED_BY = 'is_blocked_by' - enum link_type: { TYPE_RELATES_TO => 0, TYPE_BLOCKS => 1, TYPE_IS_BLOCKED_BY => 2 } + enum link_type: { TYPE_RELATES_TO => 0, TYPE_BLOCKS => 1 } def self.inverse_link_type(type) type diff --git a/app/services/projects/update_pages_service.rb b/app/services/projects/update_pages_service.rb index 25d46ada885..29e92d725e2 100644 --- a/app/services/projects/update_pages_service.rb +++ b/app/services/projects/update_pages_service.rb @@ -80,6 +80,10 @@ module Projects end def deploy_to_legacy_storage(artifacts_path) + # path today used by one project can later be used by another + # so we can't really scope this feature flag by project or group + return unless Feature.enabled?(:pages_update_legacy_storage, default_enabled: true) + # Create temporary directory in which we will extract the artifacts make_secure_tmp_dir(tmp_path) do |tmp_path| extract_archive!(artifacts_path, tmp_path) diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 20d9cbcb7e9..f383674eb6c 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -212,7 +212,8 @@ = render_if_exists "layouts/nav/test_cases_link", project: @project - = render_if_exists 'layouts/nav/sidebar/project_security_link' # EE-specific + - if project_nav_tab? :security_and_compliance + = render_if_exists 'layouts/nav/sidebar/project_security_link' # EE-specific - if project_nav_tab? :operations = nav_link(controller: sidebar_operations_paths) do diff --git a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml b/app/views/projects/_merge_request_merge_suggestions_settings.html.haml index 258cf86ab05..31a85a204be 100644 --- a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml +++ b/app/views/projects/_merge_request_merge_suggestions_settings.html.haml @@ -9,7 +9,7 @@ anchor: 'configure-the-commit-message-for-applied-suggestions'), target: '_blank' .mb-2 - = form.text_field :suggestion_commit_message, class: 'form-control mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE + = form.text_field :suggestion_commit_message, class: 'form-control gl-form-input mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE %p.form-text.text-muted = s_('ProjectSettings|The variables GitLab supports:') - Gitlab::Suggestions::CommitMessage::PLACEHOLDERS.keys.each do |placeholder| diff --git a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml b/app/views/projects/merge_requests/conflicts/_submit_form.html.haml index 15655e2b162..87356f33b1e 100644 --- a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml +++ b/app/views/projects/merge_requests/conflicts/_submit_form.html.haml @@ -21,4 +21,4 @@ %button.btn.gl-button.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" } %span {{commitButtonText}} .col-6.text-right - = link_to "Cancel", project_merge_request_path(@merge_request.project, @merge_request), class: "gl-button btn btn-cancel" + = link_to "Cancel", project_merge_request_path(@merge_request.project, @merge_request), class: "gl-button btn btn-default" diff --git a/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml b/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml index 7294c5d321a..4ba5ec5795a 100644 --- a/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml +++ b/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml @@ -4,7 +4,7 @@ .discard-changes-alert Are you sure you want to discard your changes? .discard-actions - %button.btn.btn-sm.btn-close{ "@click" => "acceptDiscardConfirmation(file)" } Discard changes - %button.btn.btn-sm{ "@click" => "cancelDiscardConfirmation(file)" } Cancel + %button.btn.btn-sm.btn-danger-secondary.gl-button{ "@click" => "acceptDiscardConfirmation(file)" } Discard changes + %button.btn.btn-default.btn-sm.gl-button{ "@click" => "cancelDiscardConfirmation(file)" } Cancel .editor-wrap{ ":class" => "classObject" } .editor{ "style" => "height: 350px", data: { 'editor-loading': true } } diff --git a/app/views/projects/mirrors/_authentication_method.html.haml b/app/views/projects/mirrors/_authentication_method.html.haml index 88bd7da7fef..94f8703657b 100644 --- a/app/views/projects/mirrors/_authentication_method.html.haml +++ b/app/views/projects/mirrors/_authentication_method.html.haml @@ -6,11 +6,11 @@ .select-wrapper = f.select :auth_method, options_for_select(auth_options, mirror.auth_method), - {}, { class: "form-control select-control js-mirror-auth-type qa-authentication-method" } + {}, { class: "form-control gl-form-input select-control js-mirror-auth-type qa-authentication-method" } = sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200") = f.hidden_field :auth_method, value: "password", class: "js-hidden-mirror-auth-type" .form-group .well-password-auth.collapse.js-well-password-auth = f.label :password, _("Password"), class: "label-bold" - = f.password_field :password, value: mirror.password, class: 'form-control qa-password', autocomplete: 'new-password' + = f.password_field :password, value: mirror.password, class: 'form-control gl-form-input qa-password', autocomplete: 'new-password' diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index 98d35845b31..d6ad6147e6e 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -21,7 +21,7 @@ .form-group.has-feedback = label_tag :url, _('Git repository URL'), class: 'label-light' - = text_field_tag :url, nil, class: 'form-control js-mirror-url js-repo-url qa-mirror-repository-url-input', placeholder: _('Input the remote repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password' + = text_field_tag :url, nil, class: 'form-control gl-form-input js-mirror-url js-repo-url qa-mirror-repository-url-input', placeholder: _('Input the remote repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password' = render 'projects/mirrors/instructions' diff --git a/app/views/projects/mirrors/_mirror_repos_form.html.haml b/app/views/projects/mirrors/_mirror_repos_form.html.haml index 215d0a59d1b..dca01ebbe90 100644 --- a/app/views/projects/mirrors/_mirror_repos_form.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_form.html.haml @@ -1,7 +1,7 @@ .form-group = label_tag :mirror_direction, _('Mirror direction'), class: 'label-light' .select-wrapper - = select_tag :mirror_direction, options_for_select([[_('Push'), 'push']]), class: 'form-control select-control js-mirror-direction qa-mirror-direction', disabled: true + = select_tag :mirror_direction, options_for_select([[_('Push'), 'push']]), class: 'form-control gl-form-input select-control js-mirror-direction qa-mirror-direction', disabled: true = sprite_icon('chevron-down', css_class: "gl-icon gl-absolute gl-top-3 gl-right-3 gl-text-gray-200") = render partial: "projects/mirrors/mirror_repos_push", locals: { f: f } diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index 6f17cae1a73..3b03e213983 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -7,17 +7,17 @@ .form-group.col-md-5 = f.label :name, class: 'label-bold', for: 'project_name_edit' do = _('Project name') - = f.text_field :name, class: 'form-control qa-project-name-field', id: "project_name_edit" + = f.text_field :name, class: 'form-control gl-form-input qa-project-name-field', id: "project_name_edit" .form-group.col-md-7 = f.label :id, class: 'label-bold' do = _('Project ID') - = f.text_field :id, class: 'form-control w-auto', readonly: true + = f.text_field :id, class: 'form-control gl-form-input w-auto', readonly: true .row .form-group.col-md-9 = f.label :tag_list, _('Topics (optional)'), class: 'label-bold' - = f.text_field :tag_list, value: @project.tag_list.join(', '), maxlength: 2000, class: "form-control" + = f.text_field :tag_list, value: @project.tag_list.join(', '), maxlength: 2000, class: "form-control gl-form-input" %p.form-text.text-muted= _('Separate topics with commas.') = render_if_exists 'compliance_management/compliance_framework/project_settings', f: f @@ -25,7 +25,7 @@ .row .form-group.col-md-9 = f.label :description, _('Project description (optional)'), class: 'label-bold' - = f.text_area :description, class: 'form-control', rows: 3, maxlength: 250 + = f.text_area :description, class: 'form-control gl-form-input', rows: 3, maxlength: 250 .row= render_if_exists 'projects/classification_policy_settings', f: f diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 5e52eb1023c..e0c4a3d624e 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -63,7 +63,7 @@ .form-group = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| = form.label :default_git_depth, _('Git shallow clone'), class: 'label-bold' - = form.number_field :default_git_depth, { class: 'form-control', min: 0, max: 1000 } + = form.number_field :default_git_depth, { class: 'form-control gl-form-input', min: 0, max: 1000 } %p.form-text.text-muted = html_escape(_('The number of changes to fetch from GitLab when cloning a repository. Lower values can speed up pipeline execution. Set to %{code_open}0%{code_close} or blank to fetch all branches and tags for each job')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'git-shallow-clone'), target: '_blank' @@ -71,7 +71,7 @@ %hr .form-group = f.label :build_timeout_human_readable, _('Timeout'), class: 'label-bold' - = f.text_field :build_timeout_human_readable, class: 'form-control' + = f.text_field :build_timeout_human_readable, class: 'form-control gl-form-input' %p.form-text.text-muted = html_escape(_('Jobs fail if they run longer than the timeout time. Input value is in seconds by default. Human readable input is also accepted, for example %{code_open}1 hour%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'timeout'), target: '_blank' @@ -79,7 +79,7 @@ - if can?(current_user, :update_max_artifacts_size, @project) .form-group = f.label :max_artifacts_size, _('Maximum artifacts size'), class: 'label-bold' - = f.number_field :max_artifacts_size, class: 'form-control' + = f.number_field :max_artifacts_size, class: 'form-control gl-form-input' %p.form-text.text-muted = _("The maximum file size in megabytes for individual job artifacts.") = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size'), target: '_blank' @@ -89,7 +89,7 @@ .input-group %span.input-group-prepend .input-group-text / - = f.text_field :build_coverage_regex, class: 'form-control', placeholder: 'Regular expression', data: { qa_selector: 'build_coverage_regex_field' } + = f.text_field :build_coverage_regex, class: 'form-control gl-form-input', placeholder: 'Regular expression', data: { qa_selector: 'build_coverage_regex_field' } %span.input-group-append .input-group-text / %p.form-text.text-muted diff --git a/app/views/projects/settings/operations/_tracing.html.haml b/app/views/projects/settings/operations/_tracing.html.haml index 316b8546a63..03970dfe0b9 100644 --- a/app/views/projects/settings/operations/_tracing.html.haml +++ b/app/views/projects/settings/operations/_tracing.html.haml @@ -24,7 +24,7 @@ .form-group = f.fields_for :tracing_setting_attributes, setting do |form| = form.label :external_url, _('Jaeger URL'), class: 'label-bold' - = form.url_field :external_url, class: 'form-control', placeholder: 'e.g. https://jaeger.mycompany.com' + = form.url_field :external_url, class: 'form-control gl-form-input', placeholder: 'e.g. https://jaeger.mycompany.com' %p.form-text.text-muted - jaeger_help_url = "https://www.jaegertracing.io/docs/1.7/getting-started/" - link_start_tag = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: jaeger_help_url } diff --git a/app/views/projects/triggers/_form.html.haml b/app/views/projects/triggers/_form.html.haml index dec71cdb56a..1dbf8addb57 100644 --- a/app/views/projects/triggers/_form.html.haml +++ b/app/views/projects/triggers/_form.html.haml @@ -7,5 +7,5 @@ %p.form-control-plaintext= @trigger.token .form-group = f.label :key, "Description", class: "label-bold" - = f.text_field :description, class: "form-control", required: true, title: 'Trigger description is required.', placeholder: "Trigger description" + = f.text_field :description, class: 'form-control gl-form-input', required: true, title: 'Trigger description is required.', placeholder: "Trigger description" = f.submit btn_text, class: "btn btn-success" diff --git a/app/views/shared/deploy_keys/_form.html.haml b/app/views/shared/deploy_keys/_form.html.haml index 94742d96af7..0934a1b0e23 100644 --- a/app/views/shared/deploy_keys/_form.html.haml +++ b/app/views/shared/deploy_keys/_form.html.haml @@ -6,7 +6,7 @@ .form-group = form.label :title, class: 'col-form-label col-sm-2' - .col-sm-10= form.text_field :title, class: 'form-control', readonly: ('readonly' unless can?(current_user, :update_deploy_key, deploy_key)) + .col-sm-10= form.text_field :title, class: 'form-control gl-form-input', readonly: ('readonly' unless can?(current_user, :update_deploy_key, deploy_key)) .form-group - if deploy_key.new_record? @@ -16,11 +16,11 @@ - link_start = "<a href='#{help_page_path('ssh/README')}' target='_blank' rel='noreferrer noopener'>".html_safe - link_end = '</a>' = _('Paste a machine public key here. Read more about how to generate it %{link_start}here%{link_end}').html_safe % { link_start: link_start, link_end: link_end.html_safe } - = form.text_area :key, class: 'form-control thin_area', rows: 5 + = form.text_area :key, class: 'form-control gl-form-input thin_area', rows: 5 - else = form.label :fingerprint, class: 'col-form-label col-sm-2' .col-sm-10 - = form.text_field :fingerprint, class: 'form-control', readonly: 'readonly' + = form.text_field :fingerprint, class: 'form-control gl-form-input', readonly: 'readonly' - if deploy_keys_project.present? = form.fields_for :deploy_keys_projects, deploy_keys_project do |deploy_keys_project_form| diff --git a/app/views/shared/deploy_keys/_project_group_form.html.haml b/app/views/shared/deploy_keys/_project_group_form.html.haml index 179ec33ee65..6e77740f0c9 100644 --- a/app/views/shared/deploy_keys/_project_group_form.html.haml +++ b/app/views/shared/deploy_keys/_project_group_form.html.haml @@ -2,10 +2,10 @@ = form_errors(@deploy_keys.new_key) .form-group.row = f.label :title, class: "label-bold" - = f.text_field :title, class: 'form-control', required: true + = f.text_field :title, class: 'form-control gl-form-input', required: true .form-group.row = f.label :key, class: "label-bold" - = f.text_area :key, class: "form-control", rows: 5, required: true + = f.text_area :key, class: 'form-control gl-form-input', rows: 5, required: true .form-group.row %p.light.gl-mb-0 = _('Paste a machine public key here. Read more about how to generate it') diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index ece165ab1ca..96fcb3cbf7f 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -6,15 +6,15 @@ .form-group = f.label :name, class: 'label-bold' - = f.text_field :name, class: 'form-control qa-deploy-token-name', required: true + = f.text_field :name, class: 'form-control gl-form-input qa-deploy-token-name', required: true .form-group = f.label :expires_at, class: 'label-bold' - = f.text_field :expires_at, class: 'datepicker form-control qa-deploy-token-expires-at', value: f.object.expires_at + = f.text_field :expires_at, class: 'datepicker form-control gl-form-input qa-deploy-token-expires-at', value: f.object.expires_at .form-group = f.label :username, class: 'label-bold' - = f.text_field :username, class: 'form-control qa-deploy-token-username' + = f.text_field :username, class: 'form-control gl-form-input qa-deploy-token-username' .text-secondary= s_('DeployTokens|Default format is "gitlab+deploy-token-{n}". Enter custom username if you want to change it.') .form-group diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index 79d86500bd9..1ebb160e591 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -195,7 +195,10 @@ #js-board-labels-toggle .js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } } - if user_can_admin_list - = render 'shared/issuable/board_create_list_dropdown', board: board + - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) + .js-create-column-trigger{ data: board_list_data } + - else + = render 'shared/issuable/board_create_list_dropdown', board: board - if @project #js-add-issues-btn.gl-ml-3{ data: { can_admin_list: can?(current_user, :admin_list, @project) } } - if current_user diff --git a/app/views/shared/web_hooks/_form.html.haml b/app/views/shared/web_hooks/_form.html.haml index c37a34f9be8..667b56c725a 100644 --- a/app/views/shared/web_hooks/_form.html.haml +++ b/app/views/shared/web_hooks/_form.html.haml @@ -2,10 +2,10 @@ .form-group = form.label :url, s_('Webhooks|URL'), class: 'label-bold' - = form.text_field :url, class: 'form-control', placeholder: 'http://example.com/trigger-ci.json' + = form.text_field :url, class: 'form-control gl-form-input', placeholder: 'http://example.com/trigger-ci.json' .form-group = form.label :token, s_('Webhooks|Secret Token'), class: 'label-bold' - = form.text_field :token, class: 'form-control', placeholder: '' + = form.text_field :token, class: 'form-control gl-form-input', placeholder: '' %p.form-text.text-muted = s_('Webhooks|Use this token to validate received payloads. It will be sent with the request in the X-Gitlab-Token HTTP header.') .form-group @@ -13,9 +13,9 @@ %ul.list-unstyled.gl-ml-6 %li = form.check_box :push_events, class: 'form-check-input' - = form.label :push_events, class: 'list-label form-check-label gl-ml-1' do + = form.label :push_events, class: 'list-label form-check-label gl-ml-1 gl-mb-3' do %strong= s_('Webhooks|Push events') - = form.text_field :push_events_branch_filter, class: 'form-control', 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 = s_('Webhooks|This URL will be triggered by a push to the repository') %li diff --git a/changelogs/unreleased/290112_add_security_dashboard_access_level_into_project_features.yml b/changelogs/unreleased/290112_add_security_dashboard_access_level_into_project_features.yml new file mode 100644 index 00000000000..d3b0056ddbd --- /dev/null +++ b/changelogs/unreleased/290112_add_security_dashboard_access_level_into_project_features.yml @@ -0,0 +1,6 @@ +--- +title: Add `security_and_compliance_access_level` column into the `project_features` + table +merge_request: 52551 +author: +type: added diff --git a/changelogs/unreleased/291170-issue-mr-list-tabs-icons-sometimes-display-as.yml b/changelogs/unreleased/291170-issue-mr-list-tabs-icons-sometimes-display-as.yml new file mode 100644 index 00000000000..66662aada71 --- /dev/null +++ b/changelogs/unreleased/291170-issue-mr-list-tabs-icons-sometimes-display-as.yml @@ -0,0 +1,5 @@ +--- +title: Remove MR List counts if they cannot be generated +merge_request: 52698 +author: +type: fixed diff --git a/changelogs/unreleased/eb-code-quality-version-0-85-22.yml b/changelogs/unreleased/eb-code-quality-version-0-85-22.yml new file mode 100644 index 00000000000..cfd67cf2f09 --- /dev/null +++ b/changelogs/unreleased/eb-code-quality-version-0-85-22.yml @@ -0,0 +1,5 @@ +--- +title: Update code quality template to use 0.85.22 +merge_request: 52913 +author: +type: changed diff --git a/changelogs/unreleased/gl-button-resolve-conflict.yml b/changelogs/unreleased/gl-button-resolve-conflict.yml new file mode 100644 index 00000000000..83886355e22 --- /dev/null +++ b/changelogs/unreleased/gl-button-resolve-conflict.yml @@ -0,0 +1,5 @@ +--- +title: Apply new GitLab UI for buttons in MR resolve conflicts page +merge_request: 52783 +author: Yogi (@yo) +type: other diff --git a/changelogs/unreleased/msj-todo-alerts.yml b/changelogs/unreleased/msj-todo-alerts.yml new file mode 100644 index 00000000000..ee57d24466e --- /dev/null +++ b/changelogs/unreleased/msj-todo-alerts.yml @@ -0,0 +1,5 @@ +--- +title: Fix formatting of "to do" in alert sidebar and error +merge_request: 53037 +author: +type: fixed diff --git a/changelogs/unreleased/msj-todo-design-errors.yml b/changelogs/unreleased/msj-todo-design-errors.yml new file mode 100644 index 00000000000..d7c1417949e --- /dev/null +++ b/changelogs/unreleased/msj-todo-design-errors.yml @@ -0,0 +1,5 @@ +--- +title: Change to-do formatting in Design error messages and sidebar +merge_request: 53040 +author: +type: fixed diff --git a/changelogs/unreleased/yo-gl-new-input.yml b/changelogs/unreleased/yo-gl-new-input.yml new file mode 100644 index 00000000000..13381f713e7 --- /dev/null +++ b/changelogs/unreleased/yo-gl-new-input.yml @@ -0,0 +1,5 @@ +--- +title: Apply new GitLab UI for form inputs project settings page +merge_request: 52097 +author: Yogi (@yo) +type: other diff --git a/changelogs/unreleased/yo-update-gl-button.yml b/changelogs/unreleased/yo-update-gl-button.yml new file mode 100644 index 00000000000..8353c8bb288 --- /dev/null +++ b/changelogs/unreleased/yo-update-gl-button.yml @@ -0,0 +1,5 @@ +--- +title: Apply new GitLab UI for commit browse file button +merge_request: 51805 +author: Yogi (@yo) +type: other diff --git a/config/feature_flags/development/board_new_list.yml b/config/feature_flags/development/board_new_list.yml new file mode 100644 index 00000000000..e80da8c554f --- /dev/null +++ b/config/feature_flags/development/board_new_list.yml @@ -0,0 +1,8 @@ +--- +name: board_new_list +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52061 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/299366 +milestone: '13.8' +type: development +group: group::project management +default_enabled: false diff --git a/config/feature_flags/development/pages_update_legacy_storage.yml b/config/feature_flags/development/pages_update_legacy_storage.yml new file mode 100644 index 00000000000..4a228b4cb8b --- /dev/null +++ b/config/feature_flags/development/pages_update_legacy_storage.yml @@ -0,0 +1,8 @@ +--- +name: pages_update_legacy_storage +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50683 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/296138 +milestone: '13.9' +type: development +group: group::release +default_enabled: true diff --git a/db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb b/db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb new file mode 100644 index 00000000000..cd325747282 --- /dev/null +++ b/db/migrate/20210126030249_add_security_dashboard_access_level_into_project_features.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class AddSecurityDashboardAccessLevelIntoProjectFeatures < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + PRIVATE_ACCESS_LEVEL = 10 + + def up + with_lock_retries do + add_column :project_features, :security_and_compliance_access_level, :integer, default: PRIVATE_ACCESS_LEVEL, null: false + end + end + + def down + with_lock_retries do + remove_column :project_features, :security_and_compliance_access_level + end + end +end diff --git a/db/schema_migrations/20210126030249 b/db/schema_migrations/20210126030249 new file mode 100644 index 00000000000..068f5eeb9c5 --- /dev/null +++ b/db/schema_migrations/20210126030249 @@ -0,0 +1 @@ +b5c219d1b1443ddf482f26d8280a1c7318456affce3ad57a082eb8f9efc32206
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 37316252119..ce7b51d067c 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -15837,7 +15837,8 @@ CREATE TABLE project_features ( metrics_dashboard_access_level integer, requirements_access_level integer DEFAULT 20 NOT NULL, operations_access_level integer DEFAULT 20 NOT NULL, - analytics_access_level integer DEFAULT 20 NOT NULL + analytics_access_level integer DEFAULT 20 NOT NULL, + security_and_compliance_access_level integer DEFAULT 10 NOT NULL ); CREATE SEQUENCE project_features_id_seq diff --git a/doc/development/usage_ping.md b/doc/development/usage_ping.md index 751cbdf2201..82af5f12f05 100644 --- a/doc/development/usage_ping.md +++ b/doc/development/usage_ping.md @@ -133,7 +133,7 @@ Any such changes lead to inconsistent reports from multiple GitLab instances. If there is a problem with an existing metric, it's best to deprecate the existing metric, and use it, side by side, with the desired new metric. -Example: +Example: Consider following change. Before GitLab 12.6, the `example_metric` was implemented as: ```ruby @@ -495,7 +495,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF aggregation. - `aggregation`: may be set to a `:daily` or `:weekly` key. Defines how counting data is stored in Redis. Aggregation on a `daily` basis does not pull more fine grained data. - - `feature_flag`: optional. For details, see our [GitLab internal Feature flags](feature_flags/) documentation. + - `feature_flag`: optional. For details, see our [GitLab internal Feature flags](feature_flags/) documentation. The feature flags are owned by the group adding the event tracking. Use one of the following methods to track events: diff --git a/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml index 501d8737acd..daed75a42ee 100644 --- a/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Code-Quality.gitlab-ci.yml @@ -7,7 +7,7 @@ code_quality: variables: DOCKER_DRIVER: overlay2 DOCKER_TLS_CERTDIR: "" - CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.19" + CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:0.85.22" needs: [] script: - export SOURCE_CODE=$PWD diff --git a/lib/gitlab/instrumentation/redis_cluster_validator.rb b/lib/gitlab/instrumentation/redis_cluster_validator.rb index 6800e5667f6..644a5fc4fff 100644 --- a/lib/gitlab/instrumentation/redis_cluster_validator.rb +++ b/lib/gitlab/instrumentation/redis_cluster_validator.rb @@ -61,7 +61,7 @@ module Gitlab key_slot(args.first) end - unless key_slots.uniq.length == 1 + if key_slots.uniq.many? # rubocop: disable CodeReuse/ActiveRecord raise CrossSlotError.new("Redis command #{command_name} arguments hash to different slots. See https://docs.gitlab.com/ee/development/redis.html#multi-key-commands") end end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 1cd44b18b5b..d94db45663d 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -1635,9 +1635,6 @@ msgstr "" msgid "Add a Grafana button in the admin sidebar, monitoring section, to access a variety of statistics on the health and performance of GitLab." msgstr "" -msgid "Add a To Do" -msgstr "" - msgid "Add a bullet list" msgstr "" @@ -2576,9 +2573,6 @@ msgstr "" msgid "AlertManagement|There was an error displaying the alerts. Confirm your endpoint's configuration details to ensure alerts appear." msgstr "" -msgid "AlertManagement|There was an error while updating the To-Do of the alert." -msgstr "" - msgid "AlertManagement|There was an error while updating the assignee(s) list. Please try again." msgstr "" @@ -2588,6 +2582,9 @@ msgstr "" msgid "AlertManagement|There was an error while updating the status of the alert." msgstr "" +msgid "AlertManagement|There was an error while updating the to-do item of the alert." +msgstr "" + msgid "AlertManagement|This assignee cannot be assigned to this alert." msgstr "" @@ -8195,9 +8192,6 @@ msgstr "" msgid "Could not upload your designs as one or more files uploaded are not supported." msgstr "" -msgid "Couldn't calculate number of %{issuables}." -msgstr "" - msgid "Country" msgstr "" @@ -8314,6 +8308,9 @@ msgstr "" msgid "Create iteration" msgstr "" +msgid "Create list" +msgstr "" + msgid "Create lists from labels. Issues with that label appear in that list." msgstr "" @@ -12035,10 +12032,10 @@ msgstr "" msgid "Failed to create Merge Request. Please try again." msgstr "" -msgid "Failed to create To-Do for the design." +msgid "Failed to create a branch for this issue. Please try again." msgstr "" -msgid "Failed to create a branch for this issue. Please try again." +msgid "Failed to create a to-do item for the design." msgstr "" msgid "Failed to create framework" @@ -12155,10 +12152,10 @@ msgstr "" msgid "Failed to publish issue on status page." msgstr "" -msgid "Failed to remove To-Do for the design." +msgid "Failed to remove a Zoom meeting" msgstr "" -msgid "Failed to remove a Zoom meeting" +msgid "Failed to remove a to-do item for the design." msgstr "" msgid "Failed to remove issue from board, please try again." @@ -12203,7 +12200,7 @@ msgstr "" msgid "Failed to signing using smartcard authentication" msgstr "" -msgid "Failed to toggle To-Do for the design." +msgid "Failed to toggle the to-do status for the design." msgstr "" msgid "Failed to update branch!" @@ -22973,6 +22970,12 @@ msgstr "" msgid "ProjectSettings|Requirements management system for this project" msgstr "" +msgid "ProjectSettings|Security & Compliance" +msgstr "" + +msgid "ProjectSettings|Security & Compliance for this project" +msgstr "" + msgid "ProjectSettings|Set the default behavior and availability of this option in merge requests. Changes made are also applied to existing merge requests." msgstr "" @@ -28478,9 +28481,6 @@ msgstr "" msgid "TestCases|Something went wrong while creating a test case." msgstr "" -msgid "TestCases|Something went wrong while fetching count of test cases." -msgstr "" - msgid "TestCases|Something went wrong while fetching test case." msgstr "" @@ -29109,10 +29109,10 @@ msgstr "" msgid "There is a halted Elasticsearch migration" msgstr "" -msgid "There is already a To-Do for this design." +msgid "There is already a repository with that name on disk" msgstr "" -msgid "There is already a repository with that name on disk" +msgid "There is already a to-do item for this design." msgstr "" msgid "There is no chart data available." @@ -30382,9 +30382,6 @@ msgstr "" msgid "To widen your search, change or remove filters." msgstr "" -msgid "To-Do" -msgstr "" - msgid "To-Do List" msgstr "" diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index b3cc2eb418d..bcc653991c9 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -13,6 +13,8 @@ RSpec.describe 'Issue Boards', :js do let_it_be(:user2) { create(:user) } before do + stub_feature_flags(board_new_list: false) + project.add_maintainer(user) project.add_maintainer(user2) diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb index 3f00bdc478d..a0786d36fdf 100644 --- a/spec/features/issuables/issuable_list_spec.rb +++ b/spec/features/issuables/issuable_list_spec.rb @@ -53,7 +53,7 @@ RSpec.describe 'issuable list', :js do visit_issuable_list(:issue) - expect(page).to have_text('Open ? Closed ? All ?') + expect(page).to have_text('Open Closed All') end it "counts merge requests closing issues icons for each issue" do diff --git a/spec/features/labels_hierarchy_spec.rb b/spec/features/labels_hierarchy_spec.rb index 5d141580874..aeb42cc2edb 100644 --- a/spec/features/labels_hierarchy_spec.rb +++ b/spec/features/labels_hierarchy_spec.rb @@ -18,6 +18,7 @@ RSpec.describe 'Labels Hierarchy', :js do before do stub_feature_flags(graphql_board_lists: false) + stub_feature_flags(board_new_list: false) grandparent.add_owner(user) sign_in(user) @@ -270,6 +271,10 @@ RSpec.describe 'Labels Hierarchy', :js do end context 'creating boards lists' do + before do + stub_feature_flags(board_new_list: false) + end + context 'on project boards' do let(:board) { create(:board, project: project_1) } diff --git a/spec/frontend/design_management/components/design_todo_button_spec.js b/spec/frontend/design_management/components/design_todo_button_spec.js index 9ebc6ca26a2..0c7516c55df 100644 --- a/spec/frontend/design_management/components/design_todo_button_spec.js +++ b/spec/frontend/design_management/components/design_todo_button_spec.js @@ -111,7 +111,7 @@ describe('Design management design todo button', () => { }); it('renders correct button text', () => { - expect(wrapper.text()).toBe('Add a To Do'); + expect(wrapper.text()).toBe('Add a to do'); }); describe('when clicked', () => { diff --git a/spec/frontend/vue_shared/components/todo_button_spec.js b/spec/frontend/vue_shared/components/todo_button_spec.js index 1f8a214d632..2066c3bd671 100644 --- a/spec/frontend/vue_shared/components/todo_button_spec.js +++ b/spec/frontend/vue_shared/components/todo_button_spec.js @@ -33,7 +33,7 @@ describe('Todo Button', () => { it.each` label | isTodo ${'Mark as done'} | ${true} - ${'Add a To Do'} | ${false} + ${'Add a to do'} | ${false} `('sets correct label when isTodo is $isTodo', ({ label, isTodo }) => { createComponent({ isTodo }); diff --git a/spec/helpers/issuables_helper_spec.rb b/spec/helpers/issuables_helper_spec.rb index 57845904d32..7c7838e0053 100644 --- a/spec/helpers/issuables_helper_spec.rb +++ b/spec/helpers/issuables_helper_spec.rb @@ -72,28 +72,38 @@ RSpec.describe IssuablesHelper do let(:user) { create(:user) } describe 'state text' do - before do - allow(helper).to receive(:issuables_count_for_state).and_return(42) - end - - it 'returns "Open" when state is :opened' do - expect(helper.issuables_state_counter_text(:issues, :opened, true)) - .to eq('<span>Open</span> <span class="badge badge-pill">42</span>') - end + context 'when number of issuables can be generated' do + before do + allow(helper).to receive(:issuables_count_for_state).and_return(42) + end - it 'returns "Closed" when state is :closed' do - expect(helper.issuables_state_counter_text(:issues, :closed, true)) - .to eq('<span>Closed</span> <span class="badge badge-pill">42</span>') + it 'returns navigation with badges' do + expect(helper.issuables_state_counter_text(:issues, :opened, true)) + .to eq('<span>Open</span> <span class="badge badge-pill">42</span>') + expect(helper.issuables_state_counter_text(:issues, :closed, true)) + .to eq('<span>Closed</span> <span class="badge badge-pill">42</span>') + expect(helper.issuables_state_counter_text(:merge_requests, :merged, true)) + .to eq('<span>Merged</span> <span class="badge badge-pill">42</span>') + expect(helper.issuables_state_counter_text(:merge_requests, :all, true)) + .to eq('<span>All</span> <span class="badge badge-pill">42</span>') + end end - it 'returns "Merged" when state is :merged' do - expect(helper.issuables_state_counter_text(:merge_requests, :merged, true)) - .to eq('<span>Merged</span> <span class="badge badge-pill">42</span>') - end + context 'when count cannot be generated' do + before do + allow(helper).to receive(:issuables_count_for_state).and_return(-1) + end - it 'returns "All" when state is :all' do - expect(helper.issuables_state_counter_text(:merge_requests, :all, true)) - .to eq('<span>All</span> <span class="badge badge-pill">42</span>') + it 'returns avigation without badges' do + expect(helper.issuables_state_counter_text(:issues, :opened, true)) + .to eq('<span>Open</span>') + expect(helper.issuables_state_counter_text(:issues, :closed, true)) + .to eq('<span>Closed</span>') + expect(helper.issuables_state_counter_text(:merge_requests, :merged, true)) + .to eq('<span>Merged</span>') + expect(helper.issuables_state_counter_text(:merge_requests, :all, true)) + .to eq('<span>All</span>') + end end end end diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index fa1df7acd07..e301be47d68 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -583,6 +583,7 @@ ProjectFeature: - requirements_access_level - analytics_access_level - operations_access_level +- security_and_compliance_access_level - created_at - updated_at ProtectedBranch::MergeAccessLevel: diff --git a/spec/lib/gitlab/instrumentation/redis_cluster_validator_spec.rb b/spec/lib/gitlab/instrumentation/redis_cluster_validator_spec.rb index 2ca7465e775..e4af3f77d5d 100644 --- a/spec/lib/gitlab/instrumentation/redis_cluster_validator_spec.rb +++ b/spec/lib/gitlab/instrumentation/redis_cluster_validator_spec.rb @@ -53,6 +53,7 @@ RSpec.describe Gitlab::Instrumentation::RedisClusterValidator do :del | [%w(foo bar)] | true # Arguments can be a nested array :del | %w(foo foo) | false :hset | %w(foo bar) | false # Not a multi-key command + :mget | [] | false # This is invalid, but not because it's a cross-slot command end with_them do diff --git a/spec/models/issue_link_spec.rb b/spec/models/issue_link_spec.rb index ef41108ebea..433b51b8a70 100644 --- a/spec/models/issue_link_spec.rb +++ b/spec/models/issue_link_spec.rb @@ -9,7 +9,7 @@ RSpec.describe IssueLink do end describe 'link_type' do - it { is_expected.to define_enum_for(:link_type).with_values(relates_to: 0, blocks: 1, is_blocked_by: 2) } + it { is_expected.to define_enum_for(:link_type).with_values(relates_to: 0, blocks: 1) } it 'provides the "related" as default link_type' do expect(create(:issue_link).link_type).to eq 'relates_to' diff --git a/spec/services/projects/update_pages_service_spec.rb b/spec/services/projects/update_pages_service_spec.rb index a6730c5de52..3439a18f3a5 100644 --- a/spec/services/projects/update_pages_service_spec.rb +++ b/spec/services/projects/update_pages_service_spec.rb @@ -55,6 +55,15 @@ RSpec.describe Projects::UpdatePagesService do end end + it "doesn't deploy to legacy storage if it's disabled" do + stub_feature_flags(pages_update_legacy_storage: false) + + expect(execute).to eq(:success) + expect(project.pages_deployed?).to be_truthy + + expect(File.exist?(File.join(project.pages_path, 'public', 'index.html'))).to eq(false) + end + it 'creates pages_deployment and saves it in the metadata' do expect do expect(execute).to eq(:success) diff --git a/spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb b/spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb index f89d52f81ad..7f49d20c83e 100644 --- a/spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb +++ b/spec/support/shared_examples/boards/multiple_issue_boards_shared_examples.rb @@ -3,6 +3,8 @@ RSpec.shared_examples 'multiple issue boards' do context 'authorized user' do before do + stub_feature_flags(board_new_list: false) + parent.add_maintainer(user) login_as(user) |