Skip to content

Commit 9beaa68

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 524a21e commit 9beaa68

File tree

87 files changed

+1406
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1406
-290
lines changed

.gitlab/ci/rules.gitlab-ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
.if-merge-request-labels-run-all-jest: &if-merge-request-labels-run-all-jest
7777
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-all-jest/'
7878

79+
.if-merge-request-labels-run-all-e2e: &if-merge-request-labels-run-all-e2e
80+
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-all-e2e/'
81+
7982
.if-merge-request-labels-run-single-db: &if-merge-request-labels-run-single-db
8083
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-single-db/'
8184

@@ -297,6 +300,9 @@
297300
- "vendor/assets/**/*"
298301
- "{app/assets,app/components,app/helpers,app/presenters,app/views,locale,public,spec/frontend,storybook,symbol}/**/*"
299302

303+
.initializers-patterns: &initializers-patterns
304+
- "{,ee/,jh/}config/initializers/**/*"
305+
300306
.controllers-patterns: &controllers-patterns
301307
- "{,ee/,jh/}{app/controllers}/**/*"
302308

@@ -1141,13 +1147,18 @@
11411147
allow_failure: true
11421148
- <<: *if-ruby2-branch
11431149
allow_failure: true
1150+
- <<: *if-merge-request-labels-run-all-e2e
1151+
allow_failure: true
11441152
- <<: *if-dot-com-gitlab-org-and-security-merge-request-manual-ff-package-and-e2e
11451153
changes: *feature-flag-development-config-patterns
11461154
when: manual
11471155
allow_failure: true
11481156
- <<: *if-dot-com-gitlab-org-and-security-merge-request
11491157
changes: *feature-flag-development-config-patterns
11501158
allow_failure: true
1159+
- <<: *if-dot-com-gitlab-org-and-security-merge-request
1160+
changes: *initializers-patterns
1161+
allow_failure: true
11511162
- <<: *if-dot-com-gitlab-org-and-security-merge-request
11521163
changes: *nodejs-patterns
11531164
allow_failure: true

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b1841c6d79f62066335ad4d44efa21f3c5f77c03
1+
ddcce8f5e7878c997a9863f5c3ed532d7126256b

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ gem 'default_value_for', '~> 3.4.0'
3939
# Supported DBs
4040
gem 'pg', '~> 1.4.5'
4141

42-
gem 'rugged', '~> 1.2'
42+
gem 'rugged', '~> 1.5'
4343
gem 'grape-path-helpers', '~> 1.7.1'
4444

4545
gem 'faraday', '~> 1.0'

Gemfile.checksum

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@
519519
{"name":"rubyntlm","version":"0.6.3","platform":"ruby","checksum":"5b321456dba3130351f7451f8669f1afa83a0d26fd63cdec285b7b88e667102d"},
520520
{"name":"rubypants","version":"0.2.0","platform":"ruby","checksum":"f07e38eac793655a0323fe91946081052341b9e69807026fcf102346589eedee"},
521521
{"name":"rubyzip","version":"2.3.2","platform":"ruby","checksum":"3f57e3935dc2255c414484fbf8d673b4909d8a6a57007ed754dde39342d2373f"},
522-
{"name":"rugged","version":"1.2.0","platform":"ruby","checksum":"111979962e75378209673ae262a8f43bd1971b5b5f96f4dfb77ca82b343604ed"},
522+
{"name":"rugged","version":"1.5.1","platform":"ruby","checksum":"a83493d050652d9e65eb6844a32f2c3da59e385e875214f7e502db547a7fce72"},
523523
{"name":"safe_yaml","version":"1.0.4","platform":"ruby","checksum":"248193992ef1730a0c9ec579999ef2256a2b3a32a9bd9d708a1e12544a489ec2"},
524524
{"name":"safety_net_attestation","version":"0.4.0","platform":"ruby","checksum":"96be2d74e7ed26453a51894913449bea0e072f44490021545ac2d1c38b0718ce"},
525525
{"name":"sanitize","version":"6.0.0","platform":"ruby","checksum":"81795f985873f3bacee2eaaededeaafc3a29aafeaa9aff51e04b85a66bbf08ff"},
@@ -618,7 +618,7 @@
618618
{"name":"tzinfo","version":"2.0.5","platform":"ruby","checksum":"c5352fd901544d396745d013f46a04ae2ed081ce806d942099825b7c2b09a167"},
619619
{"name":"u2f","version":"0.2.1","platform":"ruby","checksum":"7907b163c00682ce94d82178154af2ec3930e50f342c3502d64929c6370c5553"},
620620
{"name":"uber","version":"0.1.0","platform":"ruby","checksum":"5beeb407ff807b5db994f82fa9ee07cfceaa561dad8af20be880bc67eba935dc"},
621-
{"name":"undercover","version":"0.4.4","platform":"ruby","checksum":"61c4cbe03a9de0764b07cceef82a63f9d8dbf4d8680ec017cee307927561f6a5"},
621+
{"name":"undercover","version":"0.4.5","platform":"ruby","checksum":"27bb5d708e253e2c1a3f3edd3668a30728f0e59a1e18004b623d5e7b1e86f3b9"},
622622
{"name":"unf","version":"0.1.4","platform":"java","checksum":"49a5972ec0b3d091d3b0b2e00113f2f342b9b212f0db855eb30a629637f6d302"},
623623
{"name":"unf","version":"0.1.4","platform":"ruby","checksum":"4999517a531f2a955750f8831941891f6158498ec9b6cb1c81ce89388e63022e"},
624624
{"name":"unf_ext","version":"0.0.8.2","platform":"ruby","checksum":"90b9623ee359cc4878461c5d2eab7d3d3ce5801a680a9e7ac83b8040c5b742fa"},

Gemfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ GEM
13041304
rubyntlm (0.6.3)
13051305
rubypants (0.2.0)
13061306
rubyzip (2.3.2)
1307-
rugged (1.2.0)
1307+
rugged (1.5.1)
13081308
safe_yaml (1.0.4)
13091309
safety_net_attestation (0.4.0)
13101310
jwt (~> 2.0)
@@ -1501,10 +1501,10 @@ GEM
15011501
concurrent-ruby (~> 1.0)
15021502
u2f (0.2.1)
15031503
uber (0.1.0)
1504-
undercover (0.4.4)
1504+
undercover (0.4.5)
15051505
imagen (>= 0.1.8)
15061506
rainbow (>= 2.1, < 4.0)
1507-
rugged (>= 0.27, < 1.3)
1507+
rugged (>= 0.27, < 1.6)
15081508
unf (0.1.4)
15091509
unf_ext
15101510
unf_ext (0.0.8.2)
@@ -1820,7 +1820,7 @@ DEPENDENCIES
18201820
ruby-saml (~> 1.13.0)
18211821
ruby_parser (~> 3.19)
18221822
rubyzip (~> 2.3.2)
1823-
rugged (~> 1.2)
1823+
rugged (~> 1.5)
18241824
sanitize (~> 6.0)
18251825
sassc-rails (~> 2.1.0)
18261826
sd_notify (~> 0.1.0)

app/assets/javascripts/api/projects_api.js

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export function getProjects(query, options, callback = () => {}) {
1919
defaults.membership = true;
2020
}
2121

22+
if (gon.features.fullPathProjectSearch && query?.includes('/')) {
23+
defaults.search_namespaces = true;
24+
}
25+
2226
return axios
2327
.get(url, {
2428
params: Object.assign(defaults, options),

app/assets/javascripts/graphql_shared/issuable_client.js

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export const config = {
7474
},
7575
};
7676
}
77+
7778
return incomingWidget || existingWidget;
7879
});
7980
},

app/assets/javascripts/header_search/constants.js

+2
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ export const DROPDOWN_ORDER = [
7777
];
7878

7979
export const FETCH_TYPES = ['generic', 'search'];
80+
81+
export const SEARCH_INPUT_FIELD_MAX_WIDTH = '640px';

app/assets/javascripts/header_search/index.js

+16-8
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,44 @@
11
import Vue from 'vue';
2+
import * as Sentry from '@sentry/browser';
23
import Translate from '~/vue_shared/translate';
34
import HeaderSearchApp from './components/app.vue';
45
import createStore from './store';
6+
import { SEARCH_INPUT_FIELD_MAX_WIDTH } from './constants';
57

68
Vue.use(Translate);
79

810
export const initHeaderSearchApp = (search = '') => {
911
const el = document.getElementById('js-header-search');
10-
let navBarEl = null;
12+
const headerEl = document.querySelector('.header-content');
1113

12-
if (!el) {
14+
if (!el && !headerEl) {
1315
return false;
1416
}
1517

18+
const searchContainer = headerEl.querySelector('.global-search-container');
19+
const newHeader = headerEl.querySelector('.header-search-new');
20+
1621
const { searchPath, issuesPath, mrPath, autocompletePath } = el.dataset;
1722
let { searchContext } = el.dataset;
18-
searchContext = JSON.parse(searchContext);
23+
24+
try {
25+
searchContext = JSON.parse(searchContext);
26+
newHeader.style.maxWidth = SEARCH_INPUT_FIELD_MAX_WIDTH;
27+
} catch (error) {
28+
Sentry.captureException(error);
29+
}
1930

2031
return new Vue({
2132
el,
2233
store: createStore({ searchPath, issuesPath, mrPath, autocompletePath, searchContext, search }),
23-
mounted() {
24-
navBarEl = document.querySelector('.header-content');
25-
},
2634
render(createElement) {
2735
return createElement(HeaderSearchApp, {
2836
on: {
2937
expandSearchBar: () => {
30-
navBarEl?.classList.add('header-search-is-active');
38+
searchContainer.style.flexGrow = '1';
3139
},
3240
collapseSearchBar: () => {
33-
navBarEl?.classList.remove('header-search-is-active');
41+
searchContainer.style.flexGrow = '0';
3442
},
3543
},
3644
});

app/assets/javascripts/jira_connect/subscriptions/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const INTEGRATIONS_DOC_LINK = helpPagePath('integration/jira/development_
3838
anchor: 'use-the-integration',
3939
});
4040
export const OAUTH_SELF_MANAGED_DOC_LINK = helpPagePath('integration/jira/connect-app', {
41-
anchor: 'connect-the-gitlabcom-for-jira-cloud-app-for-self-managed-instances',
41+
anchor: 'connect-the-gitlab-for-jira-cloud-app-for-self-managed-instances',
4242
});
4343

4444
export const GITLAB_COM_BASE_PATH = 'https://gitlab.com';

app/assets/javascripts/lib/utils/text_markdown.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -522,15 +522,23 @@ function handleContinueList(e, textArea) {
522522
if (!(e.key === 'Enter')) return;
523523
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
524524
if (textArea.selectionStart !== textArea.selectionEnd) return;
525+
525526
// prevent unintended line breaks inserted using Japanese IME on MacOS
526527
if (compositioningNoteText) return;
527528

528-
const firstSelectedLine = linesFromSelection(textArea).lines[0];
529+
const selectedLines = linesFromSelection(textArea);
530+
const firstSelectedLine = selectedLines.lines[0];
529531
const listLineMatch = firstSelectedLine.match(LIST_LINE_HEAD_PATTERN);
530532

531533
if (listLineMatch) {
532534
const { leader, indent, content, isOl } = listLineMatch.groups;
533535
const emptyListItem = !content;
536+
const prefixLength = leader.length + indent.length;
537+
538+
if (selectedLines.selectionStart - selectedLines.startPos < prefixLength) {
539+
// cursor in the indent/leader area, allow the natural line feed to be added
540+
return;
541+
}
534542

535543
if (emptyListItem) {
536544
// erase empty list item - select the text and allow the
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { initHookTestDropdowns } from '~/webhooks';
2+
3+
initHookTestDropdowns();
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import initSearchSettings from '~/search_settings';
2-
import initWebhookForm from '~/webhooks';
2+
import initWebhookForm, { initHookTestDropdowns } from '~/webhooks';
33
import { initPushEventsEditForm } from '~/webhooks/webhook';
44

55
initSearchSettings();
66
initWebhookForm();
77
initPushEventsEditForm();
8+
initHookTestDropdowns();

app/assets/javascripts/tracking/get_standard_context.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function getStandardContext({ extra = {} } = {}) {
1010
...data,
1111
source: SNOWPLOW_JS_SOURCE,
1212
google_analytics_id: getCookie(GOOGLE_ANALYTICS_ID_COOKIE_NAME) ?? '',
13-
extra: extra || data.extra,
13+
extra: { ...data.extra, ...extra },
1414
},
1515
};
1616
}

app/assets/javascripts/vue_shared/components/header_ci_component.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import SafeHtml from '~/vue_shared/directives/safe_html';
44
import { isGid, getIdFromGraphQLId } from '~/graphql_shared/utils';
55
import { glEmojiTag } from '~/emoji';
66
import { __, sprintf } from '~/locale';
7-
import CiIconBadge from './ci_badge_link.vue';
7+
import CiBadgeLink from './ci_badge_link.vue';
88
import TimeagoTooltip from './time_ago_tooltip.vue';
99
1010
/**
@@ -16,7 +16,7 @@ import TimeagoTooltip from './time_ago_tooltip.vue';
1616
*/
1717
export default {
1818
components: {
19-
CiIconBadge,
19+
CiBadgeLink,
2020
TimeagoTooltip,
2121
GlButton,
2222
GlAvatarLink,
@@ -120,7 +120,7 @@ export default {
120120
data-testid="ci-header-content"
121121
>
122122
<section class="header-main-content gl-mr-3">
123-
<ci-icon-badge :status="status" />
123+
<ci-badge-link :status="status" />
124124
125125
<strong data-testid="ci-header-item-text">{{ item }}</strong>
126126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<script>
2+
import { GlDisclosureDropdown } from '@gitlab/ui';
3+
import { __ } from '~/locale';
4+
5+
export default {
6+
name: 'HookTestDropdown',
7+
components: {
8+
GlDisclosureDropdown,
9+
},
10+
props: {
11+
items: {
12+
type: Array,
13+
required: true,
14+
},
15+
size: {
16+
type: String,
17+
required: false,
18+
default: undefined,
19+
},
20+
},
21+
computed: {
22+
itemsWithAction() {
23+
return this.items.map((item) => ({
24+
text: item.text,
25+
action: () => this.testHook(item.href),
26+
}));
27+
},
28+
},
29+
methods: {
30+
testHook(href) {
31+
// HACK: Trigger @rails/ujs's data-method handling.
32+
//
33+
// The more obvious approaches of (1) declaratively rendering the
34+
// links using GlDisclosureDropdown's list-item slot and (2) using
35+
// item.extraAttrs to set the data-method attributes on the links
36+
// do not work for reasons laid out in
37+
// https://gitlab.com/gitlab-org/gitlab-ui/-/issues/2134.
38+
//
39+
// Sending the POST with axios also doesn't work, since the
40+
// endpoints return 302 redirects. Since axios uses XMLHTTPRequest,
41+
// it transparently follows redirects, meaning the Location header
42+
// of the first response cannot be inspected/acted upon by JS. We
43+
// could manually trigger a reload afterwards, but that would mean
44+
// a duplicate fetch of the current page: one by the XHR, and one
45+
// by the explicit reload. It would also mean losing the flash
46+
// alert set by the backend, making the feature useless for the
47+
// user.
48+
//
49+
// The ideal fix here would be to refactor the test endpoint to
50+
// return a JSON response, removing the need for a redirect/page
51+
// reload to show the result.
52+
const a = document.createElement('a');
53+
a.setAttribute('hidden', '');
54+
a.href = href;
55+
a.dataset.method = 'post';
56+
document.body.appendChild(a);
57+
a.click();
58+
a.remove();
59+
},
60+
},
61+
i18n: {
62+
test: __('Test'),
63+
},
64+
};
65+
</script>
66+
67+
<template>
68+
<gl-disclosure-dropdown :toggle-text="$options.i18n.test" :items="itemsWithAction" :size="size" />
69+
</template>

app/assets/javascripts/webhooks/index.js

+20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Vue from 'vue';
22
import FormUrlApp from './components/form_url_app.vue';
3+
import TestDropdown from './components/test_dropdown.vue';
34

45
export default () => {
56
const el = document.querySelector('.js-vue-webhook-form');
@@ -23,3 +24,22 @@ export default () => {
2324
},
2425
});
2526
};
27+
28+
const initHookTestDropdown = (el) => {
29+
const { items, size } = el.dataset;
30+
31+
return new Vue({
32+
el,
33+
render(h) {
34+
return h(TestDropdown, {
35+
props: {
36+
items: JSON.parse(items),
37+
size,
38+
},
39+
});
40+
},
41+
});
42+
};
43+
44+
export const initHookTestDropdowns = (selector = '.js-webhook-test-dropdown') =>
45+
document.querySelectorAll(selector).forEach(initHookTestDropdown);

app/assets/javascripts/work_items/components/work_item_detail_modal.vue

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export default {
156156
modal-id="work-item-detail-modal"
157157
header-class="gl-p-0 gl-pb-2!"
158158
scrollable
159+
data-testid="work-item-detail-modal"
159160
@hide="closeModal"
160161
>
161162
<gl-alert v-if="error" variant="danger" @dismiss="error = false">

app/assets/javascripts/work_items/graphql/work_item_metadata_widgets.fragment.graphql

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
#import "~/work_items/graphql/milestone.fragment.graphql"
44

55
fragment WorkItemMetadataWidgets on WorkItemWidget {
6+
... on WorkItemWidgetDescription {
7+
type
8+
}
9+
... on WorkItemWidgetStartAndDueDate {
10+
type
11+
}
12+
... on WorkItemWidgetNotes {
13+
type
14+
}
615
... on WorkItemWidgetMilestone {
716
type
817
milestone {
@@ -11,6 +20,8 @@ fragment WorkItemMetadataWidgets on WorkItemWidget {
1120
}
1221
... on WorkItemWidgetAssignees {
1322
type
23+
allowsMultipleAssignees
24+
canInviteMembers
1425
assignees {
1526
nodes {
1627
...User

0 commit comments

Comments
 (0)