Skip to content

Commit 8f93079

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 3cda3d4 commit 8f93079

File tree

97 files changed

+1189
-368
lines changed

Some content is hidden

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

97 files changed

+1189
-368
lines changed

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ac201ee33b2c7b2974945fb15ba9b1aec4794017
1+
57e11eb9431c93a6349ffc0222cf447705c0fada

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ gem 'ssh_data', '~> 1.3'
512512
gem 'spamcheck', '~> 1.0.0'
513513

514514
# Gitaly GRPC protocol definitions
515-
gem 'gitaly', '~> 15.8.0-rc1'
515+
gem 'gitaly', '~> 15.9.0-rc1'
516516

517517
# KAS GRPC protocol definitions
518518
gem 'kas-grpc', '~> 0.0.2'

Gemfile.checksum

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
{"name":"gettext_i18n_rails","version":"1.8.0","platform":"ruby","checksum":"95e5cf8440b1e08705b27f2bccb56143272c5a7a0dabcf54ea1bd701140a496f"},
198198
{"name":"gettext_i18n_rails_js","version":"1.3.0","platform":"ruby","checksum":"5d10afe4be3639bff78c50a56768c20f39aecdabc580c08aa45573911c2bd687"},
199199
{"name":"git","version":"1.11.0","platform":"ruby","checksum":"7e95ba4da8298a0373ef1a6862aa22007d761f3c8274b675aa787966fecea0f1"},
200-
{"name":"gitaly","version":"15.8.0.pre.rc1","platform":"ruby","checksum":"9244245b602c6c903eb0e3b3629b51e888af179cbbe339269095a1ab9113dbb5"},
200+
{"name":"gitaly","version":"15.9.0.pre.rc1","platform":"ruby","checksum":"c5ebbe6b1f2770020b0857a6a03bf1f52cd0be9ae05dbbb296316b3e7d75b42b"},
201201
{"name":"gitlab","version":"4.19.0","platform":"ruby","checksum":"3f645e3e195dbc24f0834fbf83e8ccfb2056d8e9712b01a640aad418a6949679"},
202202
{"name":"gitlab-chronic","version":"0.10.5","platform":"ruby","checksum":"f80f18dc699b708870a80685243331290bc10cfeedb6b99c92219722f729c875"},
203203
{"name":"gitlab-dangerfiles","version":"3.6.6","platform":"ruby","checksum":"cabfe23490120188a653c827a32121bdd4abf4e9e91d1754bf170dd7e93781f1"},

Gemfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ GEM
563563
rails (>= 3.2.0)
564564
git (1.11.0)
565565
rchardet (~> 1.8)
566-
gitaly (15.8.0.pre.rc1)
566+
gitaly (15.9.0.pre.rc1)
567567
grpc (~> 1.0)
568568
gitlab (4.19.0)
569569
httparty (~> 0.20)
@@ -1677,7 +1677,7 @@ DEPENDENCIES
16771677
gettext (~> 3.3)
16781678
gettext_i18n_rails (~> 1.8.0)
16791679
gettext_i18n_rails_js (~> 1.3)
1680-
gitaly (~> 15.8.0.pre.rc1)
1680+
gitaly (~> 15.9.0.pre.rc1)
16811681
gitlab-chronic (~> 0.10.5)
16821682
gitlab-dangerfiles (~> 3.6.6)
16831683
gitlab-experiment (~> 0.7.1)

app/assets/javascripts/api/groups_api.js

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { buildApiUrl } from './api_utils';
44

55
const GROUP_PATH = '/api/:version/groups/:id';
66
const GROUPS_PATH = '/api/:version/groups.json';
7+
const GROUP_MEMBERS_PATH = '/api/:version/groups/:id/members';
8+
const GROUP_ALL_MEMBERS_PATH = '/api/:version/groups/:id/members/all';
79
const DESCENDANT_GROUPS_PATH = '/api/:version/groups/:id/descendant_groups';
810
const GROUP_TRANSFER_LOCATIONS_PATH = 'api/:version/groups/:id/transfer_locations';
911

@@ -45,3 +47,10 @@ export const getGroupTransferLocations = (groupId, params = {}) => {
4547

4648
return axios.get(url, { params: { ...defaultParams, ...params } });
4749
};
50+
51+
export const getGroupMembers = (groupId, inherited = false) => {
52+
const path = inherited ? GROUP_ALL_MEMBERS_PATH : GROUP_MEMBERS_PATH;
53+
const url = buildApiUrl(path).replace(':id', groupId);
54+
55+
return axios.get(url);
56+
};

app/assets/javascripts/api/projects_api.js

+9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import axios from '../lib/utils/axios_utils';
33
import { buildApiUrl } from './api_utils';
44

55
const PROJECTS_PATH = '/api/:version/projects.json';
6+
const PROJECT_MEMBERS_PATH = '/api/:version/projects/:id/members';
7+
const PROJECT_ALL_MEMBERS_PATH = '/api/:version/projects/:id/members/all';
68
const PROJECT_IMPORT_MEMBERS_PATH = '/api/:version/projects/:id/import_project_members/:project_id';
79
const PROJECT_REPOSITORY_SIZE_PATH = '/api/:version/projects/:id/repository_size';
810
const PROJECT_TRANSFER_LOCATIONS_PATH = 'api/:version/projects/:id/transfer_locations';
@@ -54,3 +56,10 @@ export const getTransferLocations = (projectId, params = {}) => {
5456

5557
return axios.get(url, { params: { ...defaultParams, ...params } });
5658
};
59+
60+
export const getProjectMembers = (projectId, inherited = false) => {
61+
const path = inherited ? PROJECT_ALL_MEMBERS_PATH : PROJECT_MEMBERS_PATH;
62+
const url = buildApiUrl(path).replace(':id', projectId);
63+
64+
return axios.get(url);
65+
};

app/assets/javascripts/issuable/popover/components/issue_popover.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import query from 'ee_else_ce/issuable/popover/queries/issue.query.graphql';
44
import IssueDueDate from '~/boards/components/issue_due_date.vue';
55
import IssueMilestone from '~/issuable/components/issue_milestone.vue';
66
import StatusBox from '~/issuable/components/status_box.vue';
7-
import { IssuableStatus } from '~/issues/constants';
7+
import { STATUS_CLOSED } from '~/issues/constants';
88
import timeagoMixin from '~/vue_shared/mixins/timeago';
99
import WorkItemTypeIcon from '~/work_items/components/work_item_type_icon.vue';
1010
@@ -57,7 +57,7 @@ export default {
5757
return Object.keys(this.issue).length > 0;
5858
},
5959
isIssueClosed() {
60-
return this.issue?.state === IssuableStatus.Closed;
60+
return this.issue?.state === STATUS_CLOSED;
6161
},
6262
},
6363
apollo: {

app/assets/javascripts/issues/constants.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import { __ } from '~/locale';
22

3-
export const IssuableStatus = {
4-
Closed: 'closed',
5-
Open: 'opened',
6-
Reopened: 'reopened',
7-
};
3+
export const STATUS_CLOSED = 'closed';
4+
export const STATUS_OPEN = 'opened';
5+
export const STATUS_REOPENED = 'reopened';
86

97
export const IssuableStatusText = {
10-
[IssuableStatus.Closed]: __('Closed'),
11-
[IssuableStatus.Open]: __('Open'),
12-
[IssuableStatus.Reopened]: __('Open'),
8+
[STATUS_CLOSED]: __('Closed'),
9+
[STATUS_OPEN]: __('Open'),
10+
[STATUS_REOPENED]: __('Open'),
1311
};
1412

1513
export const IssuableType = {

app/assets/javascripts/issues/dashboard/components/issues_dashboard_app.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as Sentry from '@sentry/browser';
44
import getIssuesQuery from 'ee_else_ce/issues/dashboard/queries/get_issues.query.graphql';
55
import IssueCardStatistics from 'ee_else_ce/issues/list/components/issue_card_statistics.vue';
66
import IssueCardTimeInfo from 'ee_else_ce/issues/list/components/issue_card_time_info.vue';
7-
import { IssuableStatus } from '~/issues/constants';
7+
import { STATUS_CLOSED } from '~/issues/constants';
88
import {
99
CREATED_DESC,
1010
defaultTypeTokenOptions,
@@ -363,10 +363,10 @@ export default {
363363
return axios.get('/-/autocomplete/users.json', { params: { active: true, search } });
364364
},
365365
getStatus(issue) {
366-
if (issue.state === IssuableStatus.Closed && issue.moved) {
366+
if (issue.state === STATUS_CLOSED && issue.moved) {
367367
return this.$options.i18n.closedMoved;
368368
}
369-
if (issue.state === IssuableStatus.Closed) {
369+
if (issue.state === STATUS_CLOSED) {
370370
return this.$options.i18n.closed;
371371
}
372372
return undefined;

app/assets/javascripts/issues/list/components/issue_card_time_info.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { GlLink, GlIcon, GlTooltipDirective } from '@gitlab/ui';
3-
import { IssuableStatus } from '~/issues/constants';
3+
import { STATUS_CLOSED } from '~/issues/constants';
44
import {
55
dateInWords,
66
getTimeRemainingInWords,
@@ -43,8 +43,7 @@ export default {
4343
},
4444
showDueDateInRed() {
4545
return (
46-
isInPast(newDateAsLocaleTime(this.issue.dueDate)) &&
47-
this.issue.state !== IssuableStatus.Closed
46+
isInPast(newDateAsLocaleTime(this.issue.dueDate)) && this.issue.state !== STATUS_CLOSED
4847
);
4948
},
5049
timeEstimate() {

app/assets/javascripts/issues/list/components/issues_list_app.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { convertToGraphQLId, getIdFromGraphQLId } from '~/graphql_shared/utils';
1212
import { ITEM_TYPE } from '~/groups/constants';
1313
import CsvImportExportButtons from '~/issuable/components/csv_import_export_buttons.vue';
1414
import IssuableByEmail from '~/issuable/components/issuable_by_email.vue';
15-
import { IssuableStatus } from '~/issues/constants';
15+
import { STATUS_CLOSED } from '~/issues/constants';
1616
import axios from '~/lib/utils/axios_utils';
1717
import { fetchPolicies } from '~/lib/graphql';
1818
import { isPositiveInteger } from '~/lib/utils/number_utils';
@@ -572,10 +572,10 @@ export default {
572572
return `${this.exportCsvPath}${window.location.search}`;
573573
},
574574
getStatus(issue) {
575-
if (issue.state === IssuableStatus.Closed && issue.moved) {
575+
if (issue.state === STATUS_CLOSED && issue.moved) {
576576
return this.$options.i18n.closedMoved;
577577
}
578-
if (issue.state === IssuableStatus.Closed) {
578+
if (issue.state === STATUS_CLOSED) {
579579
return this.$options.i18n.closed;
580580
}
581581
return undefined;

app/assets/javascripts/issues/show/components/app.vue

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22
import { GlIcon, GlBadge, GlIntersectionObserver, GlTooltipDirective } from '@gitlab/ui';
33
import Visibility from 'visibilityjs';
44
import { createAlert } from '~/flash';
5-
import {
6-
IssuableStatus,
7-
IssuableStatusText,
8-
WorkspaceType,
9-
IssuableType,
10-
} from '~/issues/constants';
5+
import { IssuableStatusText, WorkspaceType, IssuableType, STATUS_CLOSED } from '~/issues/constants';
116
import Poll from '~/lib/utils/poll';
127
import { visitUrl } from '~/lib/utils/url_utility';
138
import { __, sprintf } from '~/locale';
@@ -251,7 +246,7 @@ export default {
251246
return sprintf(__('Error updating %{issuableType}'), { issuableType: this.issuableType });
252247
},
253248
isClosed() {
254-
return this.issuableStatus === IssuableStatus.Closed;
249+
return this.issuableStatus === STATUS_CLOSED;
255250
},
256251
pinnedLinkClasses() {
257252
return this.showTitleBorder

app/assets/javascripts/issues/show/components/header_actions.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { mapActions, mapGetters, mapState } from 'vuex';
1313
import { createAlert, VARIANT_SUCCESS } from '~/flash';
1414
import { EVENT_ISSUABLE_VUE_APP_CHANGE } from '~/issuable/constants';
15-
import { IssuableStatus, IssueType } from '~/issues/constants';
15+
import { IssueType, STATUS_CLOSED } from '~/issues/constants';
1616
import { ISSUE_STATE_EVENT_CLOSE, ISSUE_STATE_EVENT_REOPEN } from '~/issues/show/constants';
1717
import { capitalizeFirstCharacter } from '~/lib/utils/text_utility';
1818
import { visitUrl } from '~/lib/utils/url_utility';
@@ -114,7 +114,7 @@ export default {
114114
...mapState(['isToggleStateButtonLoading']),
115115
...mapGetters(['openState', 'getBlockedByIssues']),
116116
isClosed() {
117-
return this.openState === IssuableStatus.Closed;
117+
return this.openState === STATUS_CLOSED;
118118
},
119119
issueTypeText() {
120120
const issueTypeTexts = {

app/assets/javascripts/issues/show/components/incidents/constants.js

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ export const timelineItemI18n = Object.freeze({
4747

4848
export const timelineEventTagsI18n = Object.freeze({
4949
startTime: __('Start time'),
50+
impactDetected: __('Impact detected'),
51+
responseInitiated: __('Response initiated'),
52+
impactMitigated: __('Impact mitigated'),
53+
causeIdentified: __('Cause identified'),
5054
endTime: __('End time'),
5155
});
5256

app/assets/javascripts/pipelines/components/parsing_utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export const generateColumnsFromLayersListMemoized = memoize(generateColumnsFrom
175175
// See https://gitlab.com/gitlab-org/gitlab/-/issues/367547
176176
export const keepLatestDownstreamPipelines = (downstreamPipelines = []) => {
177177
// handles GraphQL
178-
return downstreamPipelines.filter((job) => {
179-
return !job.sourceJob.retried;
178+
return downstreamPipelines.filter((pipeline) => {
179+
return !pipeline?.sourceJob?.retried || false;
180180
});
181181
};

app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_mini_graph.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
getQueryHeaders,
77
toggleQueryPollingByVisibility,
88
} from '~/pipelines/components/graph/utils';
9+
import { keepLatestDownstreamPipelines } from '~/pipelines/components/parsing_utils';
910
import PipelineMiniGraph from '~/pipelines/components/pipeline_mini_graph/pipeline_mini_graph.vue';
1011
import { formatStages } from '../utils';
1112
import getLinkedPipelinesQuery from '../graphql/queries/get_linked_pipelines.query.graphql';
@@ -91,7 +92,8 @@ export default {
9192
},
9293
computed: {
9394
downstreamPipelines() {
94-
return this.pipeline?.downstream?.nodes;
95+
const downstream = this.pipeline?.downstream?.nodes;
96+
return keepLatestDownstreamPipelines(downstream);
9597
},
9698
pipelinePath() {
9799
return this.pipeline?.path ?? '';
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
11
<script>
22
import { mapState } from 'vuex';
33
import ScopeNavigation from '~/search/sidebar/components/scope_navigation.vue';
4-
import { SCOPE_ISSUES, SCOPE_MERGE_REQUESTS } from '../constants';
4+
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
5+
import { SCOPE_ISSUES, SCOPE_MERGE_REQUESTS, SCOPE_BLOB } from '../constants';
56
import ResultsFilters from './results_filters.vue';
7+
import LanguageFilter from './language_filter.vue';
68
79
export default {
810
name: 'GlobalSearchSidebar',
911
components: {
1012
ResultsFilters,
1113
ScopeNavigation,
14+
LanguageFilter,
1215
},
16+
mixins: [glFeatureFlagsMixin()],
1317
computed: {
1418
...mapState(['urlQuery']),
15-
showFilters() {
19+
showIssueAndMergeFilters() {
1620
return this.urlQuery.scope === SCOPE_ISSUES || this.urlQuery.scope === SCOPE_MERGE_REQUESTS;
1721
},
22+
showBlobFilter() {
23+
return this.urlQuery.scope === SCOPE_BLOB && this.glFeatures.searchBlobsLanguageAggregation;
24+
},
1825
},
1926
};
2027
</script>
2128

2229
<template>
2330
<section class="search-sidebar gl-display-flex gl-flex-direction-column gl-mr-4 gl-mb-6 gl-mt-5">
2431
<scope-navigation />
25-
<results-filters v-if="showFilters" />
32+
<results-filters v-if="showIssueAndMergeFilters" />
33+
<language-filter v-if="showBlobFilter" />
2634
</section>
2735
</template>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<script>
2+
import { GlFormCheckboxGroup, GlFormCheckbox } from '@gitlab/ui';
3+
import { mapState, mapActions } from 'vuex';
4+
import { intersection } from 'lodash';
5+
import { NAV_LINK_COUNT_DEFAULT_CLASSES, LABEL_DEFAULT_CLASSES } from '../constants';
6+
import { formatSearchResultCount } from '../../store/utils';
7+
8+
export default {
9+
name: 'CheckboxFilter',
10+
components: {
11+
GlFormCheckboxGroup,
12+
GlFormCheckbox,
13+
},
14+
props: {
15+
filterData: {
16+
type: Object,
17+
required: true,
18+
},
19+
},
20+
computed: {
21+
...mapState(['query']),
22+
scope() {
23+
return this.query.scope;
24+
},
25+
queryFilters() {
26+
return this.query[this.filterData?.filterParam] || [];
27+
},
28+
dataFilters() {
29+
return Object.values(this.filterData?.filters || []);
30+
},
31+
flatDataFilterValues() {
32+
return this.dataFilters.map(({ value }) => value);
33+
},
34+
selectedFilter: {
35+
get() {
36+
return intersection(this.flatDataFilterValues, this.queryFilters);
37+
},
38+
set(value) {
39+
this.setQuery({ key: this.filterData?.filterParam, value });
40+
},
41+
},
42+
labelCountClasses() {
43+
return [...NAV_LINK_COUNT_DEFAULT_CLASSES, 'gl-text-gray-500'];
44+
},
45+
},
46+
methods: {
47+
...mapActions(['setQuery']),
48+
getFormatedCount(count) {
49+
return formatSearchResultCount(count);
50+
},
51+
},
52+
NAV_LINK_COUNT_DEFAULT_CLASSES,
53+
LABEL_DEFAULT_CLASSES,
54+
};
55+
</script>
56+
57+
<template>
58+
<div class="gl-mx-5">
59+
<h5 class="gl-mt-0">{{ filterData.header }}</h5>
60+
<gl-form-checkbox-group v-model="selectedFilter">
61+
<gl-form-checkbox
62+
v-for="f in dataFilters"
63+
:key="f.label"
64+
:value="f.label"
65+
class="gl-flex-grow-1 gl-display-inline-flex gl-justify-content-space-between gl-w-full"
66+
:class="$options.LABEL_DEFAULT_CLASSES"
67+
>
68+
<span
69+
class="gl-flex-grow-1 gl-display-inline-flex gl-justify-content-space-between gl-w-full"
70+
>
71+
<span data-testid="label">
72+
{{ f.label }}
73+
</span>
74+
<span v-if="f.count" :class="labelCountClasses" data-testid="labelCount">
75+
{{ getFormatedCount(f.count) }}
76+
</span>
77+
</span>
78+
</gl-form-checkbox>
79+
</gl-form-checkbox-group>
80+
</div>
81+
</template>

0 commit comments

Comments
 (0)