Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
bdf5d637da
commit
dab865db1e
66 changed files with 304 additions and 117 deletions
21
.stylelintrc
21
.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,
|
||||
}
|
||||
}
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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"
|
||||
/>
|
||||
|
|
|
@ -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>
|
|
@ -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');
|
||||
|
|
|
@ -547,6 +547,10 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
setAddColumnFormVisibility: ({ commit }, visible) => {
|
||||
commit(types.SET_ADD_COLUMN_FORM_VISIBLE, visible);
|
||||
},
|
||||
|
||||
fetchBacklog: () => {
|
||||
notImplemented();
|
||||
},
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -270,4 +270,8 @@ export default {
|
|||
state.selectedBoardItems.filter((obj) => obj !== boardItem),
|
||||
);
|
||||
},
|
||||
|
||||
[mutationTypes.SET_ADD_COLUMN_FORM_VISIBLE]: (state, visible) => {
|
||||
state.addColumnFormVisible = visible;
|
||||
},
|
||||
};
|
||||
|
|
|
@ -24,6 +24,7 @@ export default () => ({
|
|||
},
|
||||
selectedProject: {},
|
||||
error: undefined,
|
||||
addColumnFormVisible: false,
|
||||
// TODO: remove after ce/ee split of board_content.vue
|
||||
isShowingEpicsSwimlanes: false,
|
||||
});
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
@ -552,6 +562,17 @@ export default {
|
|||
name="project[project_feature_attributes][requirements_access_level]"
|
||||
/>
|
||||
</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')"
|
||||
|
|
|
@ -3,6 +3,7 @@ export default {
|
|||
return {
|
||||
packagesEnabled: false,
|
||||
requirementsEnabled: false,
|
||||
securityAndComplianceEnabled: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) }
|
||||
return html.html_safe unless display_count
|
||||
|
||||
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
|
||||
count = issuables_count_for_state(issuable_type, state)
|
||||
|
||||
html << " " << tag
|
||||
if count != -1
|
||||
html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill')
|
||||
end
|
||||
|
||||
html.html_safe
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 } }
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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|
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: Add `security_and_compliance_access_level` column into the `project_features`
|
||||
table
|
||||
merge_request: 52551
|
||||
author:
|
||||
type: added
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Remove MR List counts if they cannot be generated
|
||||
merge_request: 52698
|
||||
author:
|
||||
type: fixed
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Update code quality template to use 0.85.22
|
||||
merge_request: 52913
|
||||
author:
|
||||
type: changed
|
5
changelogs/unreleased/gl-button-resolve-conflict.yml
Normal file
5
changelogs/unreleased/gl-button-resolve-conflict.yml
Normal 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
|
5
changelogs/unreleased/msj-todo-alerts.yml
Normal file
5
changelogs/unreleased/msj-todo-alerts.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix formatting of "to do" in alert sidebar and error
|
||||
merge_request: 53037
|
||||
author:
|
||||
type: fixed
|
5
changelogs/unreleased/msj-todo-design-errors.yml
Normal file
5
changelogs/unreleased/msj-todo-design-errors.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Change to-do formatting in Design error messages and sidebar
|
||||
merge_request: 53040
|
||||
author:
|
||||
type: fixed
|
5
changelogs/unreleased/yo-gl-new-input.yml
Normal file
5
changelogs/unreleased/yo-gl-new-input.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Apply new GitLab UI for form inputs project settings page
|
||||
merge_request: 52097
|
||||
author: Yogi (@yo)
|
||||
type: other
|
5
changelogs/unreleased/yo-update-gl-button.yml
Normal file
5
changelogs/unreleased/yo-update-gl-button.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Apply new GitLab UI for commit browse file button
|
||||
merge_request: 51805
|
||||
author: Yogi (@yo)
|
||||
type: other
|
8
config/feature_flags/development/board_new_list.yml
Normal file
8
config/feature_flags/development/board_new_list.yml
Normal 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
|
|
@ -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
|
|
@ -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
|
1
db/schema_migrations/20210126030249
Normal file
1
db/schema_migrations/20210126030249
Normal file
|
@ -0,0 +1 @@
|
|||
b5c219d1b1443ddf482f26d8280a1c7318456affce3ad57a082eb8f9efc32206
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ""
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) }
|
||||
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -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 });
|
||||
|
||||
|
|
|
@ -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)
|
||||
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 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 "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 count cannot be generated' do
|
||||
before do
|
||||
allow(helper).to receive(:issuables_count_for_state).and_return(-1)
|
||||
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>')
|
||||
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
|
||||
|
||||
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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue