Skip to content

Commit ef53b9b

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

File tree

92 files changed

+1302
-503
lines changed

Some content is hidden

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

92 files changed

+1302
-503
lines changed

.gitlab/ci/release-environments/security.gitlab-ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ release-environments-qa:
103103
- echo "$CI_REGISTRY_PASSWORD" | docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" --password-stdin
104104
retry:
105105
max: 2
106+
when: always
106107

107108
release-environments-notification-failure:
108109
stage: finish

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ entry.
13351335
- [Add UserStarredProjectsResolver sort argument](https://gitlab.com/gitlab-org/gitlab/-/commit/077ca496eaadc0a9383a552ed32294233de2f7e7) by @jzeng88 ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/153651))
13361336
- [Migrates gl-display-inline-flex to gl-inline-flex](https://gitlab.com/gitlab-org/gitlab/-/commit/3aa4f990bde82a9c6fb59d7c726a02bddc693cea) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154887))
13371337
- [Multiple frameworks labels](https://gitlab.com/gitlab-org/gitlab/-/commit/ca5a43e01aadde03cf32218f62f7e56eb5709f05) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156570)) **GitLab Enterprise Edition**
1338-
- [Add permissions checking to AI impact dashboard](https://gitlab.com/gitlab-org/gitlab/-/commit/23bf0938f52424ec382ba745b57375234b769949) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156555)) **GitLab Enterprise Edition**
1338+
- [Add permissions checking to AI Impact Dashboard](https://gitlab.com/gitlab-org/gitlab/-/commit/23bf0938f52424ec382ba745b57375234b769949) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156555)) **GitLab Enterprise Edition**
13391339
- [Admin settings: Migrate security settings to use SettingsBlock](https://gitlab.com/gitlab-org/gitlab/-/commit/467df2db45835010a9b4210982fe662f2f30e8b4) ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/157043))
13401340
- [Externalize strings on ldap_group_links](https://gitlab.com/gitlab-org/gitlab/-/commit/2fcc3e2fd12ea0c6813e7c88a1548c90cecf24e0) by @MAlvarez32 ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/155271))
13411341
- [Improve usability of environment folders](https://gitlab.com/gitlab-org/gitlab/-/commit/076d3d3a212c3a93ec60863090c3a0fa185ecd05) by @antonkalmykov ([merge request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/157104))
@@ -2246,7 +2246,7 @@ entry.
22462246
- [Rate limit project / group notifications per user](gitlab-org/gitlab@ea40bb22bfd028d687faeaaa6cf9734777decde0) ([merge request](gitlab-org/gitlab!153786))
22472247
- [Allow redirecting wiki directories on rename](gitlab-org/gitlab@8b9d3640355e73b9ed6196aeeafb923d3cb8f3be) ([merge request](gitlab-org/gitlab!153289))
22482248
- [Add NOT NULL constraint to "path_locks.project_id"](gitlab-org/gitlab@8630330b599fcd0e15cc28680fac9b0c31c0ebea) ([merge request](gitlab-org/gitlab!153090))
2249-
- [Add metric start date tooltip to AI impact dashboard](gitlab-org/gitlab@8999b334c8612b21a553c2b14d7ef342700854f4) ([merge request](gitlab-org/gitlab!153141)) **GitLab Enterprise Edition**
2249+
- [Add metric start date tooltip to AI Impact Dashboard](gitlab-org/gitlab@8999b334c8612b21a553c2b14d7ef342700854f4) ([merge request](gitlab-org/gitlab!153141)) **GitLab Enterprise Edition**
22502250
- [Create parent links for imported epics](gitlab-org/gitlab@d6132daae948ef8daada9fbbb37e0d98f7337040) ([merge request](gitlab-org/gitlab!154445))
22512251
- [Migrate d-inline-block to gl-inline-block](gitlab-org/gitlab@cb06f5c91a046b7b86dda6793d4c3a6ceff3b6d7) ([merge request](gitlab-org/gitlab!152739))
22522252
- [Docs(Epic Header): add entry to describe counts](gitlab-org/gitlab@494803b1a5ba348ce7ea43c0d94960e8ca6f68f1) ([merge request](gitlab-org/gitlab!154391)) **GitLab Enterprise Edition**
@@ -3175,7 +3175,7 @@ entry.
31753175
- [Include template in deprecated flafinder-sast job](gitlab-org/gitlab@7bce91fd3639660b11b7669831f9ddc0d13bbe50) ([merge request](gitlab-org/gitlab!151298))
31763176
- [Add AzureRM support to orphan artifacts cleanup](gitlab-org/gitlab@627eb5411af6f76a03c067131c7846c5c8d9129d) ([merge request](gitlab-org/gitlab!140497))
31773177
- [Fix work item child status icon color](gitlab-org/gitlab@e5770bc16824362e06c73d56957255c5500f60c7) ([merge request](gitlab-org/gitlab!151094))
3178-
- [Use locale-specific formatting for numbers in the AI Impact dashboard](gitlab-org/gitlab@07a2c3c576b7d0574c0d649ac7931d14606b5305) ([merge request](gitlab-org/gitlab!150882)) **GitLab Enterprise Edition**
3178+
- [Use locale-specific formatting for numbers in the AI Impact Dashboard](gitlab-org/gitlab@07a2c3c576b7d0574c0d649ac7931d14606b5305) ([merge request](gitlab-org/gitlab!150882)) **GitLab Enterprise Edition**
31793179
- [Allows ml_model pending destruction](gitlab-org/gitlab@4b3d7a7eaf03cb799fdd91781347bcafdd9fa040) ([merge request](gitlab-org/gitlab!150808))
31803180
- [Fixes issue with registry search query params when removed](gitlab-org/gitlab@2f13fba9b1c405de37dc7b618f5472f129859989) ([merge request](gitlab-org/gitlab!150934))
31813181
- [MR list: Fix overlapping search icon](gitlab-org/gitlab@7421cb36c6481acafb30435cb81695ff97bf6a3c) ([merge request](gitlab-org/gitlab!151045))

app/assets/javascripts/merge_request_dashboard/components/merge_request.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
},
3434
computed: {
3535
statsAriaLabel() {
36-
const comments = n__('%d comment', '%d comments', this.mergeRequest.userDiscussionsCount);
36+
const comments = n__('%d comment', '%d comments', this.mergeRequest.userNotesCount);
3737
const fileAdditions = n__(
3838
'%d file addition',
3939
'%d file additions',
@@ -109,7 +109,7 @@ export default {
109109
<div class="gl-flex gl-justify-end" :aria-label="statsAriaLabel">
110110
<div class="gl-whitespace-nowrap">
111111
<gl-icon name="comments" class="!gl-align-middle" />
112-
{{ mergeRequest.userDiscussionsCount }}
112+
{{ mergeRequest.userNotesCount }}
113113
</div>
114114
<div class="gl-ml-5 gl-whitespace-nowrap">
115115
<gl-icon name="doc-code" />

app/assets/javascripts/merge_request_dashboard/queries/merge_request.fragment.graphql

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fragment MergeRequestDashboardFragment on MergeRequest {
3838
...CiIcon
3939
}
4040
}
41-
userDiscussionsCount
41+
userNotesCount
4242
createdAt
4343
updatedAt
4444
...MergeRequestApprovalFragment

app/assets/javascripts/search/index.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const sidebarInitState = () => {
1313
const el = document.getElementById('js-search-sidebar');
1414
if (!el) return {};
1515

16-
const { navigationJson, searchType, searchLevel, groupInitialJson, projectInitialJson } =
16+
const { navigationJson, searchType, searchLevel, groupInitialJson, projectInitialJson, ref } =
1717
el.dataset;
1818

1919
const navigationJsonParsed = JSON.parse(navigationJson);
@@ -26,6 +26,7 @@ const sidebarInitState = () => {
2626
searchLevel,
2727
groupInitialJsonParsed,
2828
projectInitialJsonParsed,
29+
ref,
2930
};
3031
};
3132

@@ -49,6 +50,7 @@ export const initSearchApp = () => {
4950
searchLevel,
5051
groupInitialJsonParsed: groupInitialJson,
5152
projectInitialJsonParsed: projectInitialJson,
53+
ref,
5254
} = sidebarInitState() || {};
5355

5456
const { defaultBranchName } = topBarInitState() || {};
@@ -61,6 +63,7 @@ export const initSearchApp = () => {
6163
groupInitialJson,
6264
projectInitialJson,
6365
defaultBranchName,
66+
repositoryRef: ref,
6467
});
6568

6669
initTopbar(store);
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,99 @@
11
<script>
2+
import { GlAlert } from '@gitlab/ui';
23
// eslint-disable-next-line no-restricted-imports
34
import { mapState, mapGetters } from 'vuex';
4-
import { __ } from '~/locale';
5+
import { __, s__ } from '~/locale';
6+
import getBlobSearchQuery from '~/search/graphql/blob_search_zoekt.query.graphql';
57
import { SCOPE_BLOB, SEARCH_TYPE_ZOEKT } from '~/search/sidebar/constants/index';
6-
import ZoektBlobResults from '~/search/results/components/zoekt_blob_results.vue';
8+
import { DEFAULT_FETCH_CHUNKS } from '../constants';
9+
import StatusBar from './status_bar.vue';
10+
11+
import ZoektBlobResults from './zoekt_blob_results.vue';
712
813
export default {
914
name: 'GlobalSearchResultsApp',
1015
i18n: {
1116
headerText: __('Search results'),
17+
blobDataFetchError: s__(
18+
'GlobalSearch|Could not load search results. Refresh the page to try again.',
19+
),
1220
},
1321
components: {
1422
ZoektBlobResults,
23+
StatusBar,
24+
GlAlert,
25+
},
26+
data() {
27+
return {
28+
hasError: false,
29+
blobSearch: {},
30+
hasResults: true,
31+
};
32+
},
33+
apollo: {
34+
blobSearch: {
35+
query() {
36+
return getBlobSearchQuery;
37+
},
38+
errorPolicy: 'none',
39+
variables() {
40+
return {
41+
search: this.query.search,
42+
groupId: this.query.group_id && `gid://gitlab/Group/${this.query.group_id}`,
43+
projectId: this.query.project_id && `gid://gitlab/Project/${this.query.project_id}`,
44+
page: this.currentPage,
45+
chunkCount: DEFAULT_FETCH_CHUNKS,
46+
regex: this.query.regex ? JSON.parse(this.query.regex) : false,
47+
};
48+
},
49+
result({ data }) {
50+
this.hasError = false;
51+
this.blobSearch = data?.blobSearch;
52+
this.hasResults = data?.blobSearch?.files?.length > 0;
53+
},
54+
debounce: 500,
55+
error() {
56+
this.hasError = true;
57+
this.hasResults = false;
58+
},
59+
},
1560
},
1661
computed: {
17-
...mapState(['searchType']),
62+
...mapState(['searchType', 'query']),
1863
...mapGetters(['currentScope']),
64+
currentPage() {
65+
return this.query?.page ? parseInt(this.query?.page, 10) : 1;
66+
},
1967
isBlobScope() {
2068
return this.currentScope === SCOPE_BLOB;
2169
},
2270
isZoektSearch() {
2371
return this.searchType === SEARCH_TYPE_ZOEKT;
2472
},
73+
isLoading() {
74+
return this.$apollo.queries.blobSearch.loading;
75+
},
76+
},
77+
methods: {
78+
clearErrors() {
79+
this.hasError = false;
80+
},
2581
},
2682
};
2783
</script>
2884
2985
<template>
30-
<section>
31-
<zoekt-blob-results v-if="isBlobScope && isZoektSearch" />
32-
</section>
86+
<div>
87+
<gl-alert v-if="hasError" variant="danger" @dismiss="clearErrors">
88+
{{ $options.i18n.blobDataFetchError }}
89+
</gl-alert>
90+
<section v-else-if="isBlobScope && isZoektSearch">
91+
<status-bar :blob-search="blobSearch" :has-results="hasResults" :is-loading="isLoading" />
92+
<zoekt-blob-results
93+
:blob-search="blobSearch"
94+
:has-results="hasResults"
95+
:is-loading="isLoading"
96+
/>
97+
</section>
98+
</div>
3399
</template>

app/assets/javascripts/search/results/components/blob_body.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default {
5151
<div
5252
v-for="(chunk, index) in chunksToShow(file)"
5353
:key="`chunk${index}`"
54-
class="chunks-block gl-border-slate-400 gl-border-b last:gl-border-0"
54+
class="chunks-block gl-border-b gl-border-subtle last:gl-border-0"
5555
>
5656
<blob-chunks :chunk="chunk" :blame-link="file.blameUrl" :file-url="file.fileUrl" />
5757
</div>

app/assets/javascripts/search/results/components/blob_chunks.vue

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script>
22
import { GlTooltipDirective, GlIcon, GlLink } from '@gitlab/ui';
33
import GlSafeHtmlDirective from '~/vue_shared/directives/safe_html';
4+
import { s__ } from '~/locale';
45
56
export default {
67
name: 'BlobChunks',
@@ -12,6 +13,10 @@ export default {
1213
GlTooltip: GlTooltipDirective,
1314
SafeHtml: GlSafeHtmlDirective,
1415
},
16+
i18n: {
17+
viewBlame: s__('GlobalSearch|View blame'),
18+
viewLine: s__('GlobalSearch|View line in repository'),
19+
},
1520
props: {
1621
chunk: {
1722
type: Object,
@@ -56,24 +61,26 @@ export default {
5661
<gl-link
5762
v-gl-tooltip
5863
:href="`${blameLink}#L${line.lineNumber}`"
59-
:title="__('View blame')"
64+
:title="$options.i18n.viewBlame"
6065
class="js-navigation-open"
6166
><gl-icon name="git"
6267
/></gl-link>
6368
</span>
64-
<span class="diff-line-num flex-grow-1 gl-pr-3">
69+
<span class="diff-line-num gl-grow gl-pr-3">
6570
<gl-link
6671
v-gl-tooltip
6772
:href="`${fileUrl}#L${line.lineNumber}`"
68-
:title="__('View Line in repository')"
73+
:title="$options.i18n.viewLine"
6974
class="!gl-flex gl-items-center gl-justify-end"
7075
>{{ line.lineNumber }}</gl-link
7176
>
7277
</span>
7378
</div>
7479
</div>
75-
<pre class="code highlight flex-grow-1" data-testid="search-blob-line-code">
76-
<span v-safe-html="highlightedRichText(line.richText)"></span>
80+
<pre class="code highlight gl-grow" data-testid="search-blob-line-code">
81+
<code class="!gl-inline">
82+
<span v-safe-html="highlightedRichText(line.richText)" class="line"></span>
83+
</code>
7784
</pre>
7885
</div>
7986
</div>

app/assets/javascripts/search/results/components/blob_header.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script>
2+
import { GlLink } from '@gitlab/ui';
23
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
34
import FileIcon from '~/vue_shared/components/file_icon.vue';
45
import { s__ } from '~/locale';
@@ -8,6 +9,7 @@ export default {
89
components: {
910
FileIcon,
1011
ClipboardButton,
12+
GlLink,
1113
},
1214
props: {
1315
filePath: {
@@ -39,15 +41,15 @@ export default {
3941
<div class="file-header-content gl-flex gl-items-center gl-leading-1">
4042
<file-icon :file-name="filePath" :size="16" aria-hidden="true" css-classes="gl-mr-3" />
4143

42-
<a :href="fileUrl" :title="$options.i18n.fileLink">
44+
<gl-link :href="fileUrl" :title="$options.i18n.fileLink">
4345
<template v-if="projectPath">
4446
<strong class="project-path-content" data-testid="project-path-content"
4547
>{{ projectPath }}:
4648
</strong>
4749
</template>
4850

4951
<strong class="file-name-content" data-testid="file-name-content">{{ filePath }}</strong>
50-
</a>
52+
</gl-link>
5153
<clipboard-button
5254
:text="filePath"
5355
:gfm="gfmCopyText"

0 commit comments

Comments
 (0)