Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-02-02 15:09:06 +00:00
parent bdf5d637da
commit dab865db1e
66 changed files with 304 additions and 117 deletions

View File

@ -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":[ "plugins":[
"./scripts/frontend/stylelint/stylelint-duplicate-selectors.js", "./scripts/frontend/stylelint/stylelint-duplicate-selectors.js",
"./scripts/frontend/stylelint/stylelint-utility-classes.js", "./scripts/frontend/stylelint/stylelint-utility-classes.js",
@ -47,7 +53,7 @@
"indentation":2, "indentation":2,
"length-zero-no-unit":true, "length-zero-no-unit":true,
"max-nesting-depth":[ "max-nesting-depth":[
3, 6,
{ {
"ignoreAtRules":[ "ignoreAtRules":[
"each", "each",
@ -97,15 +103,22 @@
} }
], ],
"selector-list-comma-newline-after":"always", "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-max-id":1,
"selector-no-vendor-prefix":true, "selector-no-vendor-prefix":true,
"selector-pseudo-element-colon-notation":"double", "selector-pseudo-element-colon-notation":"double",
"selector-pseudo-element-no-unknown":true, "selector-pseudo-element-no-unknown":true,
"shorthand-property-no-redundant-values":true, "shorthand-property-no-redundant-values":true,
"string-quotes":"single", "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/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,
} }
} }

View File

@ -103,7 +103,7 @@ gem 'hashie-forbidden_attributes'
gem 'kaminari', '~> 1.0' gem 'kaminari', '~> 1.0'
# HAML # HAML
gem 'hamlit', '~> 2.14.2' gem 'hamlit', '~> 2.14.4'
# Files attachments # Files attachments
gem 'carrierwave', '~> 1.3' gem 'carrierwave', '~> 1.3'

View File

@ -559,7 +559,7 @@ GEM
rainbow rainbow
rubocop (>= 0.50.0) rubocop (>= 0.50.0)
sysexits (~> 1.1) sysexits (~> 1.1)
hamlit (2.14.2) hamlit (2.14.4)
temple (>= 0.8.2) temple (>= 0.8.2)
thor thor
tilt tilt
@ -1392,7 +1392,7 @@ DEPENDENCIES
gssapi gssapi
guard-rspec guard-rspec
haml_lint (~> 0.36.0) haml_lint (~> 0.36.0)
hamlit (~> 2.14.2) hamlit (~> 2.14.4)
hangouts-chat (~> 0.0.5) hangouts-chat (~> 0.0.5)
hashie hashie
hashie-forbidden_attributes hashie-forbidden_attributes

View File

@ -27,7 +27,7 @@ export default {
<template> <template>
<div class="block gl-display-flex gl-justify-content-space-between"> <div class="block gl-display-flex gl-justify-content-space-between">
<span class="issuable-header-text hide-collapsed"> <span class="issuable-header-text hide-collapsed">
{{ __('To-Do') }} {{ __('To Do') }}
</span> </span>
<sidebar-todo <sidebar-todo
v-if="!sidebarCollapsed" v-if="!sidebarCollapsed"

View File

@ -9,7 +9,7 @@ import alertQuery from '../../graphql/queries/details.query.graphql';
export default { export default {
i18n: { i18n: {
UPDATE_ALERT_TODO_ERROR: s__( 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: { components: {

View File

@ -179,7 +179,7 @@ export default {
id="badge-link-url" id="badge-link-url"
v-model="linkUrl" v-model="linkUrl"
type="URL" type="URL"
class="form-control" class="form-control gl-form-input"
required required
@input="debouncedPreview" @input="debouncedPreview"
/> />
@ -194,7 +194,7 @@ export default {
id="badge-image-url" id="badge-image-url"
v-model="imageUrl" v-model="imageUrl"
type="URL" type="URL"
class="form-control" class="form-control gl-form-input"
required required
@input="debouncedPreview" @input="debouncedPreview"
/> />

View File

@ -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>

View File

@ -16,6 +16,7 @@ import {
getBoardsModalData, getBoardsModalData,
} from 'ee_else_ce/boards/ee_functions'; } 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 BoardContent from '~/boards/components/board_content.vue';
import BoardExtraActions from '~/boards/components/board_extra_actions.vue'; import BoardExtraActions from '~/boards/components/board_extra_actions.vue';
import createDefaultClient from '~/lib/graphql'; 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); boardConfigToggle(boardsStore);
const issueBoardsModal = document.getElementById('js-add-issues-btn'); const issueBoardsModal = document.getElementById('js-add-issues-btn');

View File

@ -547,6 +547,10 @@ export default {
} }
}, },
setAddColumnFormVisibility: ({ commit }, visible) => {
commit(types.SET_ADD_COLUMN_FORM_VISIBLE, visible);
},
fetchBacklog: () => { fetchBacklog: () => {
notImplemented(); notImplemented();
}, },

View File

@ -42,3 +42,4 @@ export const RECEIVE_GROUP_PROJECTS_FAILURE = 'RECEIVE_GROUP_PROJECTS_FAILURE';
export const SET_SELECTED_PROJECT = 'SET_SELECTED_PROJECT'; export const SET_SELECTED_PROJECT = 'SET_SELECTED_PROJECT';
export const ADD_BOARD_ITEM_TO_SELECTION = 'ADD_BOARD_ITEM_TO_SELECTION'; 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 REMOVE_BOARD_ITEM_FROM_SELECTION = 'REMOVE_BOARD_ITEM_FROM_SELECTION';
export const SET_ADD_COLUMN_FORM_VISIBLE = 'SET_ADD_COLUMN_FORM_VISIBLE';

View File

@ -270,4 +270,8 @@ export default {
state.selectedBoardItems.filter((obj) => obj !== boardItem), state.selectedBoardItems.filter((obj) => obj !== boardItem),
); );
}, },
[mutationTypes.SET_ADD_COLUMN_FORM_VISIBLE]: (state, visible) => {
state.addColumnFormVisible = visible;
},
}; };

View File

@ -24,6 +24,7 @@ export default () => ({
}, },
selectedProject: {}, selectedProject: {},
error: undefined, error: undefined,
addColumnFormVisible: false,
// TODO: remove after ce/ee split of board_content.vue // TODO: remove after ce/ee split of board_content.vue
isShowingEpicsSwimlanes: false, isShowingEpicsSwimlanes: false,
}); });

View File

@ -48,7 +48,7 @@ export default {
:project-id="projectId" :project-id="projectId"
/> />
</template> </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.') }} {{ s__('DeployKeys|No deploy keys found. Create one with the form above.') }}
</div> </div>
</div> </div>

View File

@ -44,13 +44,13 @@ export const MOVE_DESIGN_ERROR = __(
'Something went wrong when reordering designs. Please try again', '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; const MAX_SKIPPED_FILES_LISTINGS = 5;

View File

@ -75,6 +75,11 @@ export default {
required: false, required: false,
default: false, default: false,
}, },
securityAndComplianceAvailable: {
type: Boolean,
required: false,
default: false,
},
visibilityHelpPath: { visibilityHelpPath: {
type: String, type: String,
required: false, required: false,
@ -141,6 +146,7 @@ export default {
metricsDashboardAccessLevel: featureAccessLevel.PROJECT_MEMBERS, metricsDashboardAccessLevel: featureAccessLevel.PROJECT_MEMBERS,
analyticsAccessLevel: featureAccessLevel.EVERYONE, analyticsAccessLevel: featureAccessLevel.EVERYONE,
requirementsAccessLevel: featureAccessLevel.EVERYONE, requirementsAccessLevel: featureAccessLevel.EVERYONE,
securityAndComplianceAccessLevel: featureAccessLevel.PROJECT_MEMBERS,
operationsAccessLevel: featureAccessLevel.EVERYONE, operationsAccessLevel: featureAccessLevel.EVERYONE,
containerRegistryEnabled: true, containerRegistryEnabled: true,
lfsEnabled: true, lfsEnabled: true,
@ -264,6 +270,10 @@ export default {
featureAccessLevel.PROJECT_MEMBERS, featureAccessLevel.PROJECT_MEMBERS,
this.requirementsAccessLevel, this.requirementsAccessLevel,
); );
this.securityAndComplianceAccessLevel = Math.min(
featureAccessLevel.PROJECT_MEMBERS,
this.securityAndComplianceAccessLevel,
);
this.operationsAccessLevel = Math.min( this.operationsAccessLevel = Math.min(
featureAccessLevel.PROJECT_MEMBERS, featureAccessLevel.PROJECT_MEMBERS,
this.operationsAccessLevel, this.operationsAccessLevel,
@ -552,6 +562,17 @@ export default {
name="project[project_feature_attributes][requirements_access_level]" name="project[project_feature_attributes][requirements_access_level]"
/> />
</project-setting-row> </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 <project-setting-row
ref="wiki-settings" ref="wiki-settings"
:label="s__('ProjectSettings|Wiki')" :label="s__('ProjectSettings|Wiki')"

View File

@ -3,6 +3,7 @@ export default {
return { return {
packagesEnabled: false, packagesEnabled: false,
requirementsEnabled: false, requirementsEnabled: false,
securityAndComplianceEnabled: false,
}; };
}, },
watch: { watch: {

View File

@ -168,6 +168,7 @@ export default {
<template #downstream> <template #downstream>
<linked-pipelines-column <linked-pipelines-column
v-if="showDownstreamPipelines" v-if="showDownstreamPipelines"
class="gl-mr-6"
:linked-pipelines="downstreamPipelines" :linked-pipelines="downstreamPipelines"
:column-title="__('Downstream')" :column-title="__('Downstream')"
:type="$options.pipelineTypeConstants.DOWNSTREAM" :type="$options.pipelineTypeConstants.DOWNSTREAM"

View File

@ -15,7 +15,7 @@ export default {
}, },
computed: { computed: {
buttonLabel() { buttonLabel() {
return this.isTodo ? __('Mark as done') : __('Add a To Do'); return this.isTodo ? __('Mark as done') : __('Add a to do');
}, },
}, },
}; };

View File

@ -105,7 +105,7 @@ module CommitsHelper
tooltip = _("Browse Directory") tooltip = _("Browse Directory")
end 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') sprite_icon('folder-open')
end end
end end

View File

@ -215,24 +215,12 @@ module IssuablesHelper
state_title = titles[state] || state.to_s.humanize state_title = titles[state] || state.to_s.humanize
html = content_tag(:span, state_title) html = content_tag(:span, state_title)
if display_count return html.html_safe unless 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( count = issuables_count_for_state(issuable_type, state)
: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 if count != -1
html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill')
end end
html.html_safe html.html_safe

View File

@ -17,9 +17,11 @@ class IssueLink < ApplicationRecord
TYPE_RELATES_TO = 'relates_to' TYPE_RELATES_TO = 'relates_to'
TYPE_BLOCKS = 'blocks' 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' 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) def self.inverse_link_type(type)
type type

View File

@ -80,6 +80,10 @@ module Projects
end end
def deploy_to_legacy_storage(artifacts_path) 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 # Create temporary directory in which we will extract the artifacts
make_secure_tmp_dir(tmp_path) do |tmp_path| make_secure_tmp_dir(tmp_path) do |tmp_path|
extract_archive!(artifacts_path, tmp_path) extract_archive!(artifacts_path, tmp_path)

View File

@ -212,7 +212,8 @@
= render_if_exists "layouts/nav/test_cases_link", project: @project = 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 - if project_nav_tab? :operations
= nav_link(controller: sidebar_operations_paths) do = nav_link(controller: sidebar_operations_paths) do

View File

@ -9,7 +9,7 @@
anchor: 'configure-the-commit-message-for-applied-suggestions'), anchor: 'configure-the-commit-message-for-applied-suggestions'),
target: '_blank' target: '_blank'
.mb-2 .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 %p.form-text.text-muted
= s_('ProjectSettings|The variables GitLab supports:') = s_('ProjectSettings|The variables GitLab supports:')
- Gitlab::Suggestions::CommitMessage::PLACEHOLDERS.keys.each do |placeholder| - Gitlab::Suggestions::CommitMessage::PLACEHOLDERS.keys.each do |placeholder|

View File

@ -21,4 +21,4 @@
%button.btn.gl-button.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" } %button.btn.gl-button.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" }
%span {{commitButtonText}} %span {{commitButtonText}}
.col-6.text-right .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"

View File

@ -4,7 +4,7 @@
.discard-changes-alert .discard-changes-alert
Are you sure you want to discard your changes? Are you sure you want to discard your changes?
.discard-actions .discard-actions
%button.btn.btn-sm.btn-close{ "@click" => "acceptDiscardConfirmation(file)" } Discard changes %button.btn.btn-sm.btn-danger-secondary.gl-button{ "@click" => "acceptDiscardConfirmation(file)" } Discard changes
%button.btn.btn-sm{ "@click" => "cancelDiscardConfirmation(file)" } Cancel %button.btn.btn-default.btn-sm.gl-button{ "@click" => "cancelDiscardConfirmation(file)" } Cancel
.editor-wrap{ ":class" => "classObject" } .editor-wrap{ ":class" => "classObject" }
.editor{ "style" => "height: 350px", data: { 'editor-loading': true } } .editor{ "style" => "height: 350px", data: { 'editor-loading': true } }

View File

@ -6,11 +6,11 @@
.select-wrapper .select-wrapper
= f.select :auth_method, = f.select :auth_method,
options_for_select(auth_options, mirror.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") = 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" = f.hidden_field :auth_method, value: "password", class: "js-hidden-mirror-auth-type"
.form-group .form-group
.well-password-auth.collapse.js-well-password-auth .well-password-auth.collapse.js-well-password-auth
= f.label :password, _("Password"), class: "label-bold" = 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'

View File

@ -21,7 +21,7 @@
.form-group.has-feedback .form-group.has-feedback
= label_tag :url, _('Git repository URL'), class: 'label-light' = 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' = render 'projects/mirrors/instructions'

View File

@ -1,7 +1,7 @@
.form-group .form-group
= label_tag :mirror_direction, _('Mirror direction'), class: 'label-light' = label_tag :mirror_direction, _('Mirror direction'), class: 'label-light'
.select-wrapper .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") = 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 } = render partial: "projects/mirrors/mirror_repos_push", locals: { f: f }

View File

@ -7,17 +7,17 @@
.form-group.col-md-5 .form-group.col-md-5
= f.label :name, class: 'label-bold', for: 'project_name_edit' do = f.label :name, class: 'label-bold', for: 'project_name_edit' do
= _('Project name') = _('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 .form-group.col-md-7
= f.label :id, class: 'label-bold' do = f.label :id, class: 'label-bold' do
= _('Project ID') = _('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 .row
.form-group.col-md-9 .form-group.col-md-9
= f.label :tag_list, _('Topics (optional)'), class: 'label-bold' = 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.') %p.form-text.text-muted= _('Separate topics with commas.')
= render_if_exists 'compliance_management/compliance_framework/project_settings', f: f = render_if_exists 'compliance_management/compliance_framework/project_settings', f: f
@ -25,7 +25,7 @@
.row .row
.form-group.col-md-9 .form-group.col-md-9
= f.label :description, _('Project description (optional)'), class: 'label-bold' = 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 .row= render_if_exists 'projects/classification_policy_settings', f: f

View File

@ -63,7 +63,7 @@
.form-group .form-group
= f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| = 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.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 %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 } = 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' = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'git-shallow-clone'), target: '_blank'
@ -71,7 +71,7 @@
%hr %hr
.form-group .form-group
= f.label :build_timeout_human_readable, _('Timeout'), class: 'label-bold' = 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 %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 } = 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' = 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) - if can?(current_user, :update_max_artifacts_size, @project)
.form-group .form-group
= f.label :max_artifacts_size, _('Maximum artifacts size'), class: 'label-bold' = 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 %p.form-text.text-muted
= _("The maximum file size in megabytes for individual job artifacts.") = _("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' = 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 .input-group
%span.input-group-prepend %span.input-group-prepend
.input-group-text / .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 %span.input-group-append
.input-group-text / .input-group-text /
%p.form-text.text-muted %p.form-text.text-muted

View File

@ -24,7 +24,7 @@
.form-group .form-group
= f.fields_for :tracing_setting_attributes, setting do |form| = f.fields_for :tracing_setting_attributes, setting do |form|
= form.label :external_url, _('Jaeger URL'), class: 'label-bold' = 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 %p.form-text.text-muted
- jaeger_help_url = "https://www.jaegertracing.io/docs/1.7/getting-started/" - 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 } - link_start_tag = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: jaeger_help_url }

View File

@ -7,5 +7,5 @@
%p.form-control-plaintext= @trigger.token %p.form-control-plaintext= @trigger.token
.form-group .form-group
= f.label :key, "Description", class: "label-bold" = 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" = f.submit btn_text, class: "btn btn-success"

View File

@ -6,7 +6,7 @@
.form-group .form-group
= form.label :title, class: 'col-form-label col-sm-2' = 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 .form-group
- if deploy_key.new_record? - 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_start = "<a href='#{help_page_path('ssh/README')}' target='_blank' rel='noreferrer noopener'>".html_safe
- link_end = '</a>' - 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 } = _('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 - else
= form.label :fingerprint, class: 'col-form-label col-sm-2' = form.label :fingerprint, class: 'col-form-label col-sm-2'
.col-sm-10 .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? - if deploy_keys_project.present?
= form.fields_for :deploy_keys_projects, deploy_keys_project do |deploy_keys_project_form| = form.fields_for :deploy_keys_projects, deploy_keys_project do |deploy_keys_project_form|

View File

@ -2,10 +2,10 @@
= form_errors(@deploy_keys.new_key) = form_errors(@deploy_keys.new_key)
.form-group.row .form-group.row
= f.label :title, class: "label-bold" = 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 .form-group.row
= f.label :key, class: "label-bold" = 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 .form-group.row
%p.light.gl-mb-0 %p.light.gl-mb-0
= _('Paste a machine public key here. Read more about how to generate it') = _('Paste a machine public key here. Read more about how to generate it')

View File

@ -6,15 +6,15 @@
.form-group .form-group
= f.label :name, class: 'label-bold' = 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 .form-group
= f.label :expires_at, class: 'label-bold' = 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 .form-group
= f.label :username, class: 'label-bold' = 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.') .text-secondary= s_('DeployTokens|Default format is "gitlab+deploy-token-{n}". Enter custom username if you want to change it.')
.form-group .form-group

View File

@ -195,7 +195,10 @@
#js-board-labels-toggle #js-board-labels-toggle
.js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } } .js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } }
- if user_can_admin_list - 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 - if @project
#js-add-issues-btn.gl-ml-3{ data: { can_admin_list: can?(current_user, :admin_list, @project) } } #js-add-issues-btn.gl-ml-3{ data: { can_admin_list: can?(current_user, :admin_list, @project) } }
- if current_user - if current_user

View File

@ -2,10 +2,10 @@
.form-group .form-group
= 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', 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-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', 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 will be sent with the request in the X-Gitlab-Token HTTP header.') = 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 .form-group
@ -13,9 +13,9 @@
%ul.list-unstyled.gl-ml-6 %ul.list-unstyled.gl-ml-6
%li %li
= form.check_box :push_events, class: 'form-check-input' = 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') %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 %p.text-muted.gl-ml-1
= s_('Webhooks|This URL will be triggered by a push to the repository') = s_('Webhooks|This URL will be triggered by a push to the repository')
%li %li

View File

@ -0,0 +1,6 @@
---
title: Add `security_and_compliance_access_level` column into the `project_features`
table
merge_request: 52551
author:
type: added

View File

@ -0,0 +1,5 @@
---
title: Remove MR List counts if they cannot be generated
merge_request: 52698
author:
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Update code quality template to use 0.85.22
merge_request: 52913
author:
type: changed

View File

@ -0,0 +1,5 @@
---
title: Apply new GitLab UI for buttons in MR resolve conflicts page
merge_request: 52783
author: Yogi (@yo)
type: other

View File

@ -0,0 +1,5 @@
---
title: Fix formatting of "to do" in alert sidebar and error
merge_request: 53037
author:
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Change to-do formatting in Design error messages and sidebar
merge_request: 53040
author:
type: fixed

View File

@ -0,0 +1,5 @@
---
title: Apply new GitLab UI for form inputs project settings page
merge_request: 52097
author: Yogi (@yo)
type: other

View File

@ -0,0 +1,5 @@
---
title: Apply new GitLab UI for commit browse file button
merge_request: 51805
author: Yogi (@yo)
type: other

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
b5c219d1b1443ddf482f26d8280a1c7318456affce3ad57a082eb8f9efc32206

View File

@ -15837,7 +15837,8 @@ CREATE TABLE project_features (
metrics_dashboard_access_level integer, metrics_dashboard_access_level integer,
requirements_access_level integer DEFAULT 20 NOT NULL, requirements_access_level integer DEFAULT 20 NOT NULL,
operations_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 CREATE SEQUENCE project_features_id_seq

View File

@ -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, 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. 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: Consider following change. Before GitLab 12.6, the `example_metric` was implemented as:
```ruby ```ruby
@ -495,7 +495,7 @@ Implemented using Redis methods [PFADD](https://redis.io/commands/pfadd) and [PF
aggregation. aggregation.
- `aggregation`: may be set to a `:daily` or `:weekly` key. Defines how counting data is stored in Redis. - `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. 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: Use one of the following methods to track events:

View File

@ -7,7 +7,7 @@ code_quality:
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "" 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: [] needs: []
script: script:
- export SOURCE_CODE=$PWD - export SOURCE_CODE=$PWD

View File

@ -61,7 +61,7 @@ module Gitlab
key_slot(args.first) key_slot(args.first)
end 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") 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
end end

View File

@ -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." 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 "" msgstr ""
msgid "Add a To Do"
msgstr ""
msgid "Add a bullet list" msgid "Add a bullet list"
msgstr "" 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." msgid "AlertManagement|There was an error displaying the alerts. Confirm your endpoint's configuration details to ensure alerts appear."
msgstr "" 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." msgid "AlertManagement|There was an error while updating the assignee(s) list. Please try again."
msgstr "" msgstr ""
@ -2588,6 +2582,9 @@ msgstr ""
msgid "AlertManagement|There was an error while updating the status of the alert." msgid "AlertManagement|There was an error while updating the status of the alert."
msgstr "" 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." msgid "AlertManagement|This assignee cannot be assigned to this alert."
msgstr "" msgstr ""
@ -8195,9 +8192,6 @@ msgstr ""
msgid "Could not upload your designs as one or more files uploaded are not supported." msgid "Could not upload your designs as one or more files uploaded are not supported."
msgstr "" msgstr ""
msgid "Couldn't calculate number of %{issuables}."
msgstr ""
msgid "Country" msgid "Country"
msgstr "" msgstr ""
@ -8314,6 +8308,9 @@ msgstr ""
msgid "Create iteration" msgid "Create iteration"
msgstr "" msgstr ""
msgid "Create list"
msgstr ""
msgid "Create lists from labels. Issues with that label appear in that list." msgid "Create lists from labels. Issues with that label appear in that list."
msgstr "" msgstr ""
@ -12035,10 +12032,10 @@ msgstr ""
msgid "Failed to create Merge Request. Please try again." msgid "Failed to create Merge Request. Please try again."
msgstr "" msgstr ""
msgid "Failed to create To-Do for the design." msgid "Failed to create a branch for this issue. Please try again."
msgstr "" 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 "" msgstr ""
msgid "Failed to create framework" msgid "Failed to create framework"
@ -12155,10 +12152,10 @@ msgstr ""
msgid "Failed to publish issue on status page." msgid "Failed to publish issue on status page."
msgstr "" msgstr ""
msgid "Failed to remove To-Do for the design." msgid "Failed to remove a Zoom meeting"
msgstr "" msgstr ""
msgid "Failed to remove a Zoom meeting" msgid "Failed to remove a to-do item for the design."
msgstr "" msgstr ""
msgid "Failed to remove issue from board, please try again." msgid "Failed to remove issue from board, please try again."
@ -12203,7 +12200,7 @@ msgstr ""
msgid "Failed to signing using smartcard authentication" msgid "Failed to signing using smartcard authentication"
msgstr "" msgstr ""
msgid "Failed to toggle To-Do for the design." msgid "Failed to toggle the to-do status for the design."
msgstr "" msgstr ""
msgid "Failed to update branch!" msgid "Failed to update branch!"
@ -22973,6 +22970,12 @@ msgstr ""
msgid "ProjectSettings|Requirements management system for this project" msgid "ProjectSettings|Requirements management system for this project"
msgstr "" 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." msgid "ProjectSettings|Set the default behavior and availability of this option in merge requests. Changes made are also applied to existing merge requests."
msgstr "" msgstr ""
@ -28478,9 +28481,6 @@ msgstr ""
msgid "TestCases|Something went wrong while creating a test case." msgid "TestCases|Something went wrong while creating a test case."
msgstr "" msgstr ""
msgid "TestCases|Something went wrong while fetching count of test cases."
msgstr ""
msgid "TestCases|Something went wrong while fetching test case." msgid "TestCases|Something went wrong while fetching test case."
msgstr "" msgstr ""
@ -29109,10 +29109,10 @@ msgstr ""
msgid "There is a halted Elasticsearch migration" msgid "There is a halted Elasticsearch migration"
msgstr "" msgstr ""
msgid "There is already a To-Do for this design." msgid "There is already a repository with that name on disk"
msgstr "" msgstr ""
msgid "There is already a repository with that name on disk" msgid "There is already a to-do item for this design."
msgstr "" msgstr ""
msgid "There is no chart data available." msgid "There is no chart data available."
@ -30382,9 +30382,6 @@ msgstr ""
msgid "To widen your search, change or remove filters." msgid "To widen your search, change or remove filters."
msgstr "" msgstr ""
msgid "To-Do"
msgstr ""
msgid "To-Do List" msgid "To-Do List"
msgstr "" msgstr ""

View File

@ -13,6 +13,8 @@ RSpec.describe 'Issue Boards', :js do
let_it_be(:user2) { create(:user) } let_it_be(:user2) { create(:user) }
before do before do
stub_feature_flags(board_new_list: false)
project.add_maintainer(user) project.add_maintainer(user)
project.add_maintainer(user2) project.add_maintainer(user2)

View File

@ -53,7 +53,7 @@ RSpec.describe 'issuable list', :js do
visit_issuable_list(:issue) visit_issuable_list(:issue)
expect(page).to have_text('Open ? Closed ? All ?') expect(page).to have_text('Open Closed All')
end end
it "counts merge requests closing issues icons for each issue" do it "counts merge requests closing issues icons for each issue" do

View File

@ -18,6 +18,7 @@ RSpec.describe 'Labels Hierarchy', :js do
before do before do
stub_feature_flags(graphql_board_lists: false) stub_feature_flags(graphql_board_lists: false)
stub_feature_flags(board_new_list: false)
grandparent.add_owner(user) grandparent.add_owner(user)
sign_in(user) sign_in(user)
@ -270,6 +271,10 @@ RSpec.describe 'Labels Hierarchy', :js do
end end
context 'creating boards lists' do context 'creating boards lists' do
before do
stub_feature_flags(board_new_list: false)
end
context 'on project boards' do context 'on project boards' do
let(:board) { create(:board, project: project_1) } let(:board) { create(:board, project: project_1) }

View File

@ -111,7 +111,7 @@ describe('Design management design todo button', () => {
}); });
it('renders correct button text', () => { it('renders correct button text', () => {
expect(wrapper.text()).toBe('Add a To Do'); expect(wrapper.text()).toBe('Add a to do');
}); });
describe('when clicked', () => { describe('when clicked', () => {

View File

@ -33,7 +33,7 @@ describe('Todo Button', () => {
it.each` it.each`
label | isTodo label | isTodo
${'Mark as done'} | ${true} ${'Mark as done'} | ${true}
${'Add a To Do'} | ${false} ${'Add a to do'} | ${false}
`('sets correct label when isTodo is $isTodo', ({ label, isTodo }) => { `('sets correct label when isTodo is $isTodo', ({ label, isTodo }) => {
createComponent({ isTodo }); createComponent({ isTodo });

View File

@ -72,28 +72,38 @@ RSpec.describe IssuablesHelper do
let(:user) { create(:user) } let(:user) { create(:user) }
describe 'state text' do describe 'state text' do
before do context 'when number of issuables can be generated' do
allow(helper).to receive(:issuables_count_for_state).and_return(42) before do
allow(helper).to receive(:issuables_count_for_state).and_return(42)
end
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 end
it 'returns "Open" when state is :opened' do context 'when count cannot be generated' do
expect(helper.issuables_state_counter_text(:issues, :opened, true)) before do
.to eq('<span>Open</span> <span class="badge badge-pill">42</span>') allow(helper).to receive(:issuables_count_for_state).and_return(-1)
end end
it 'returns "Closed" when state is :closed' do it 'returns avigation without badges' do
expect(helper.issuables_state_counter_text(:issues, :closed, true)) expect(helper.issuables_state_counter_text(:issues, :opened, true))
.to eq('<span>Closed</span> <span class="badge badge-pill">42</span>') .to eq('<span>Open</span>')
end expect(helper.issuables_state_counter_text(:issues, :closed, true))
.to eq('<span>Closed</span>')
it 'returns "Merged" when state is :merged' do expect(helper.issuables_state_counter_text(:merge_requests, :merged, true))
expect(helper.issuables_state_counter_text(:merge_requests, :merged, true)) .to eq('<span>Merged</span>')
.to eq('<span>Merged</span> <span class="badge badge-pill">42</span>') expect(helper.issuables_state_counter_text(:merge_requests, :all, true))
end .to eq('<span>All</span>')
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>')
end end
end end
end end

View File

@ -583,6 +583,7 @@ ProjectFeature:
- requirements_access_level - requirements_access_level
- analytics_access_level - analytics_access_level
- operations_access_level - operations_access_level
- security_and_compliance_access_level
- created_at - created_at
- updated_at - updated_at
ProtectedBranch::MergeAccessLevel: ProtectedBranch::MergeAccessLevel:

View File

@ -53,6 +53,7 @@ RSpec.describe Gitlab::Instrumentation::RedisClusterValidator do
:del | [%w(foo bar)] | true # Arguments can be a nested array :del | [%w(foo bar)] | true # Arguments can be a nested array
:del | %w(foo foo) | false :del | %w(foo foo) | false
:hset | %w(foo bar) | false # Not a multi-key command :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 end
with_them do with_them do

View File

@ -9,7 +9,7 @@ RSpec.describe IssueLink do
end end
describe 'link_type' do 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 it 'provides the "related" as default link_type' do
expect(create(:issue_link).link_type).to eq 'relates_to' expect(create(:issue_link).link_type).to eq 'relates_to'

View File

@ -55,6 +55,15 @@ RSpec.describe Projects::UpdatePagesService do
end end
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 it 'creates pages_deployment and saves it in the metadata' do
expect do expect do
expect(execute).to eq(:success) expect(execute).to eq(:success)

View File

@ -3,6 +3,8 @@
RSpec.shared_examples 'multiple issue boards' do RSpec.shared_examples 'multiple issue boards' do
context 'authorized user' do context 'authorized user' do
before do before do
stub_feature_flags(board_new_list: false)
parent.add_maintainer(user) parent.add_maintainer(user)
login_as(user) login_as(user)