Skip to content

Commit 3e0c035

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 74e6480 commit 3e0c035

File tree

31 files changed

+1275
-941
lines changed

31 files changed

+1275
-941
lines changed

.gitlab/ci/review.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ review-cleanup:
55
extends:
66
- .default-retry
77
- .review:rules:review-cleanup
8-
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:gitlab-helm3-kubectl1.14
8+
image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-build-images:gitlab-helm3.5-kubectl1.17
99
stage: prepare
1010
environment:
1111
name: review/${CI_COMMIT_REF_SLUG}${FREQUENCY}

.rubocop.yml

+5
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,11 @@ Rails/HelperInstanceVariable:
287287
- app/helpers/**/*.rb
288288
- ee/app/helpers/**/*.rb
289289

290+
Rails/MailerName:
291+
Exclude:
292+
# See for the context on why it's excluded https://gitlab.com/gitlab-org/gitlab/-/issues/239356#note_956419227
293+
- 'app/mailers/notify.rb'
294+
290295
# GitLab ###################################################################
291296

292297
Gitlab/ModuleWithInstanceVariables:

.rubocop_todo/rails/mailer_name.yml

-5
This file was deleted.

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8eb17de6edf6b4044d90498e008035a8c980305f
1+
9f87cdc737619e33cddc3ceddc2103dc11dd2577

app/assets/javascripts/groups/components/group_name_and_path.vue

+49-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<script>
2-
import { GlFormGroup, GlFormInput, GlFormInputGroup, GlInputGroupText } from '@gitlab/ui';
2+
import {
3+
GlFormGroup,
4+
GlFormInput,
5+
GlFormInputGroup,
6+
GlInputGroupText,
7+
GlLink,
8+
GlAlert,
9+
} from '@gitlab/ui';
310
import { debounce } from 'lodash';
411
512
import { s__, __ } from '~/locale';
@@ -33,23 +40,36 @@ export default {
3340
),
3441
validFeedback: s__('Groups|Group path is available.'),
3542
},
43+
groupId: {
44+
label: s__('Groups|Group ID'),
45+
},
3646
},
3747
apiLoadingMessage: s__('Groups|Checking group URL availability...'),
3848
apiErrorMessage: __(
3949
'An error occurred while checking group path. Please refresh and try again.',
4050
),
51+
changingUrlWarningMessage: s__('Groups|Changing group URL can have unintended side effects.'),
52+
learnMore: s__('Groups|Learn more'),
4153
},
4254
nameInputSize: { md: 'lg' },
4355
changingGroupPathHelpPagePath: helpPagePath('user/group/index', {
4456
anchor: 'change-a-groups-path',
4557
}),
4658
mattermostDataBindName: 'create_chat_team',
47-
components: { GlFormGroup, GlFormInput, GlFormInputGroup, GlInputGroupText },
59+
components: {
60+
GlFormGroup,
61+
GlFormInput,
62+
GlFormInputGroup,
63+
GlInputGroupText,
64+
GlLink,
65+
GlAlert,
66+
},
4867
inject: ['fields', 'basePath', 'mattermostEnabled'],
4968
data() {
5069
return {
5170
name: this.fields.name.value,
5271
path: this.fields.path.value,
72+
hasPathBeenManuallySet: false,
5373
apiSuggestedPath: '',
5474
apiLoading: false,
5575
nameFeedbackState: null,
@@ -65,16 +85,23 @@ export default {
6585
pathDescription() {
6686
return this.apiLoading ? this.$options.i18n.apiLoadingMessage : '';
6787
},
88+
isEditingGroup() {
89+
return this.fields.groupId.value !== '';
90+
},
6891
},
6992
watch: {
7093
name: [
7194
function updatePath(newName) {
95+
if (this.isEditingGroup || this.hasPathBeenManuallySet) return;
96+
7297
this.nameFeedbackState = null;
7398
this.pathFeedbackState = null;
7499
this.apiSuggestedPath = '';
75100
this.path = slugify(newName);
76101
},
77102
debounce(async function updatePathWithSuggestions() {
103+
if (this.isEditingGroup || this.hasPathBeenManuallySet) return;
104+
78105
try {
79106
const { suggests } = await this.checkPathAvailability();
80107
@@ -134,10 +161,13 @@ export default {
134161
handlePathInput(value) {
135162
this.pathFeedbackState = null;
136163
this.apiSuggestedPath = '';
164+
this.hasPathBeenManuallySet = true;
137165
this.path = value;
138166
this.debouncedValidatePath();
139167
},
140168
debouncedValidatePath: debounce(async function validatePath() {
169+
if (this.isEditingGroup && this.path === this.fields.path.value) return;
170+
141171
try {
142172
const {
143173
exists,
@@ -228,5 +258,22 @@ export default {
228258
/>
229259
</gl-form-input-group>
230260
</gl-form-group>
261+
<template v-if="isEditingGroup">
262+
<gl-alert class="gl-mb-5" :dismissible="false" variant="warning">
263+
{{ $options.i18n.changingUrlWarningMessage }}
264+
<gl-link :href="$options.changingGroupPathHelpPagePath"
265+
>{{ $options.i18n.learnMore }}
266+
</gl-link>
267+
</gl-alert>
268+
<gl-form-group :label="$options.i18n.inputs.groupId.label" :label-for="fields.groupId.id">
269+
<gl-form-input
270+
:id="fields.groupId.id"
271+
:value="fields.groupId.value"
272+
:name="fields.groupId.name"
273+
size="sm"
274+
readonly
275+
/>
276+
</gl-form-group>
277+
</template>
231278
</div>
232279
</template>

app/assets/javascripts/jira_connect/subscriptions/components/sign_in_oauth_button.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default {
112112
</script>
113113
<template>
114114
<gl-button
115-
category="primary"
115+
v-bind="$attrs"
116116
variant="info"
117117
:loading="loading"
118118
:disabled="!canUseCrypto"

app/assets/javascripts/jira_connect/subscriptions/components/user_link.vue

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
<script>
22
import { GlLink, GlSprintf } from '@gitlab/ui';
3+
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
34
import { __ } from '~/locale';
45
import { getGitlabSignInURL } from '~/jira_connect/subscriptions/utils';
56
67
export default {
78
components: {
89
GlLink,
910
GlSprintf,
11+
SignInOauthButton: () => import('./sign_in_oauth_button.vue'),
1012
},
13+
mixins: [glFeatureFlagMixin()],
1114
inject: {
1215
usersPath: {
1316
default: '',
@@ -51,6 +54,9 @@ export default {
5154
? this.$options.i18n.signedInAsUserText
5255
: this.$options.i18n.signedInText;
5356
},
57+
isOauthEnabled() {
58+
return this.glFeatures.jiraConnectOauth;
59+
},
5460
},
5561
async created() {
5662
this.signInURL = await getGitlabSignInURL(this.usersPath);
@@ -72,13 +78,14 @@ export default {
7278
</template>
7379
</gl-sprintf>
7480
75-
<gl-link
76-
v-else-if="hasSubscriptions"
77-
data-testid="sign-in-link"
78-
:href="signInURL"
79-
target="_blank"
80-
>
81-
{{ $options.i18n.signInText }}
82-
</gl-link>
81+
<template v-else-if="hasSubscriptions">
82+
<sign-in-oauth-button v-if="isOauthEnabled" category="tertiary">
83+
{{ $options.i18n.signInText }}
84+
</sign-in-oauth-button>
85+
86+
<gl-link v-else data-testid="sign-in-link" :href="signInURL" target="_blank">
87+
{{ $options.i18n.signInText }}
88+
</gl-link>
89+
</template>
8390
</div>
8491
</template>

app/assets/javascripts/runner/components/runner_list_empty_state.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default {
3535
},
3636
},
3737
modalId: 'runners-empty-state-instructions-modal',
38+
svgHeight: 145,
3839
};
3940
</script>
4041

@@ -43,9 +44,15 @@ export default {
4344
v-if="isSearchFiltered"
4445
:title="s__('Runners|No results found')"
4546
:svg-path="filteredSvgPath"
47+
:svg-height="$options.svgHeight"
4648
:description="s__('Runners|Edit your search and try again')"
4749
/>
48-
<gl-empty-state v-else :title="s__('Runners|Get started with runners')" :svg-path="svgPath">
50+
<gl-empty-state
51+
v-else
52+
:title="s__('Runners|Get started with runners')"
53+
:svg-path="svgPath"
54+
:svg-height="$options.svgHeight"
55+
>
4956
<template #description>
5057
<gl-sprintf
5158
:message="

app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { stateKey } from './state_maps';
33
export default function deviseState() {
44
if (!this.commitsCount) {
55
return stateKey.nothingToMerge;
6-
} else if (this.hasMergeChecksFailed && !this.autoMergeEnabled) {
7-
return stateKey.mergeChecksFailed;
86
} else if (this.projectArchived) {
97
return stateKey.archived;
108
} else if (this.branchMissing) {
@@ -15,6 +13,8 @@ export default function deviseState() {
1513
return stateKey.conflicts;
1614
} else if (this.shouldBeRebased) {
1715
return stateKey.rebase;
16+
} else if (this.hasMergeChecksFailed && !this.autoMergeEnabled) {
17+
return stateKey.mergeChecksFailed;
1818
} else if (this.onlyAllowMergeIfPipelineSucceeds && this.isPipelineFailed) {
1919
return stateKey.pipelineFailed;
2020
} else if (this.draft) {

app/assets/stylesheets/framework/diffs.scss

+2-14
Original file line numberDiff line numberDiff line change
@@ -822,18 +822,6 @@ table.code {
822822
}
823823
}
824824

825-
.commits-container {
826-
.diff-files-changed {
827-
@include media-breakpoint-up(sm) {
828-
top: $header-height;
829-
830-
.with-performance-bar & {
831-
top: calc(#{$header-height} + #{$performance-bar-height});
832-
}
833-
}
834-
}
835-
}
836-
837825
.diff-files-changed {
838826
background-color: $body-bg;
839827

@@ -844,11 +832,11 @@ table.code {
844832

845833
@include media-breakpoint-up(sm) {
846834
@include gl-sticky;
847-
top: calc(#{$header-height} + #{$mr-tabs-height});
835+
top: $header-height;
848836
z-index: 200;
849837

850838
.with-performance-bar & {
851-
top: calc(#{$header-height} + #{$mr-tabs-height} + #{$performance-bar-height});
839+
top: calc(#{$header-height} + #{$performance-bar-height});
852840
}
853841

854842
&.is-stuck {

app/assets/stylesheets/pages/commits.scss

+4
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@
9595
}
9696
}
9797

98+
.commits-row + .commits-row {
99+
border-top: 1px solid $white-normal;
100+
}
101+
98102
.text-expander {
99103
display: inline-flex;
100104
background: $white;

app/models/concerns/analytics/cycle_analytics/stage_event_model.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ module StageEventModel
3333
)
3434
duration_in_seconds = Arel::Nodes::Extract.new(duration, :epoch)
3535

36+
# start_event_timestamp and end_event_timestamp do not really influence the order,
37+
# but are included so that they are part of the returned result, for example when
38+
# using Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher
3639
keyset_order(
3740
:total_time => { order_expression: arel_order(duration_in_seconds, direction), distinct: false, sql_type: 'double precision' },
38-
issuable_id_column => { order_expression: arel_order(arel_table[issuable_id_column], direction), distinct: true }
41+
issuable_id_column => { order_expression: arel_order(arel_table[issuable_id_column], direction), distinct: true },
42+
:end_event_timestamp => { order_expression: arel_order(arel_table[:end_event_timestamp], direction), distinct: true },
43+
:start_event_timestamp => { order_expression: arel_order(arel_table[:start_event_timestamp], direction), distinct: true }
3944
)
4045
end
4146
end

app/views/projects/commit/show.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
- page_description @commit.description
1010
- add_page_specific_style 'page_bundles/pipelines'
1111

12-
.container-fluid.commits-container{ class: [limited_container_width, container_class] }
12+
.container-fluid{ class: [limited_container_width, container_class] }
1313
= render "commit_box"
1414
= render "ci_menu"
1515
= render "projects/diffs/diffs",

app/views/projects/merge_requests/show.html.haml

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
4343
= gl_badge_tag @diffs_count, { size: :sm }
4444
- if Feature.enabled?(:moved_mr_sidebar, @project)
4545
.gl-ml-auto.gl-align-items-center.gl-display-none.gl-md-display-flex.js-expand-sidebar{ class: "gl-lg-display-none!" }
46-
%button.btn.btn-default.gl-button.btn-sm.js-sidebar-toggle{ type: 'button' }
47-
= sprite_icon('angle-double-left', size: 12, css_class: 'gl-mr-2')
46+
= render Pajamas::ButtonComponent.new(size: 'small',
47+
icon: 'angle-double-left',
48+
button_options: { class: 'js-sidebar-toggle' }) do
4849
= _('Expand')
4950
.d-flex.flex-wrap.align-items-center.justify-content-lg-end
5051
#js-vue-discussion-counter{ data: { blocks_merge: @project.only_allow_merge_if_all_discussions_are_resolved?.to_s } }

app/views/shared/groups/_group_name_and_path_fields.html.haml

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
= f.hidden_field :name, data: { js_name: 'name' }
33
= f.hidden_field :path, maxlength: ::Namespace::URL_MAX_LENGTH, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, data: { js_name: 'path' }
44
= f.hidden_field :parent_id, data: { js_name: 'parentId' }
5+
= f.hidden_field :id, data: { js_name: 'groupId' }

app/views/shared/milestones/_milestone.html.haml

+1-8
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,7 @@
4848
.milestone-actions.d-flex.justify-content-sm-start.justify-content-md-end
4949
- if @project # if in milestones list on project level
5050
- if can_admin_group_milestones?
51-
%button.js-promote-project-milestone-button.btn.gl-button.btn-icon.btn-default-tertiary.btn-sm.has-tooltip{ title: s_('Milestones|Promote to Group Milestone'),
52-
disabled: true,
53-
type: 'button',
54-
data: { url: promote_project_milestone_path(milestone.project, milestone),
55-
milestone_title: milestone.title,
56-
group_name: @project.group.name } }
57-
= sprite_icon('level-up', size: 14, css_class: 'gl-button-icon gl-icon')
58-
51+
= render Pajamas::ButtonComponent.new(icon: 'level-up', category: :tertiary, size: :small, button_options: { class: 'js-promote-project-milestone-button', title: s_('Milestones|Promote to Group Milestone'), disabled: true, data: { toggle: 'tooltip', container: 'body', url: promote_project_milestone_path(milestone.project, milestone), milestone_title: milestone.title, group_name: @project.group.name } })
5952
- if can?(current_user, :admin_milestone, milestone)
6053
- if milestone.closed?
6154
= link_to s_('Milestones|Reopen Milestone'), milestone_path(milestone, milestone: { state_event: :activate }), method: :put, class: "btn gl-button btn-sm gl-ml-3"

babel.config.js

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const coreJSVersion = require('./node_modules/core-js/package.json').version;
22

3-
const BABEL_ENV = process.env.BABEL_ENV || process.env.NODE_ENV || null;
4-
53
let presets = [
64
[
75
'@babel/preset-env',
@@ -15,7 +13,6 @@ let presets = [
1513

1614
// include stage 3 proposals
1715
const plugins = [
18-
'@babel/plugin-syntax-import-meta',
1916
'@babel/plugin-proposal-class-properties',
2017
'@babel/plugin-proposal-json-strings',
2118
'@babel/plugin-proposal-private-methods',
@@ -28,26 +25,9 @@ const plugins = [
2825
'lodash',
2926
];
3027

31-
// add code coverage tooling if necessary
32-
if (BABEL_ENV === 'coverage') {
33-
plugins.push([
34-
'babel-plugin-istanbul',
35-
{
36-
exclude: ['app/assets/javascripts/locale/**/app.js'],
37-
},
38-
]);
39-
}
40-
41-
// Jest is running in node environment, so we need additional plugins
28+
// Jest is running in node environment
4229
const isJest = Boolean(process.env.JEST_WORKER_ID);
4330
if (isJest) {
44-
plugins.push('@babel/plugin-transform-modules-commonjs');
45-
/*
46-
without the following, babel-plugin-istanbul throws an error:
47-
https://gitlab.com/gitlab-org/gitlab-foss/issues/58390
48-
*/
49-
plugins.push('babel-plugin-dynamic-import-node');
50-
5131
presets = [
5232
[
5333
'@babel/preset-env',

0 commit comments

Comments
 (0)