Skip to content

Commit f52c460

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent df4287f commit f52c460

File tree

115 files changed

+1606
-392
lines changed

Some content is hidden

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

115 files changed

+1606
-392
lines changed

.gitlab/ci/test-on-omnibus/main.gitlab-ci.yml

+14
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,20 @@ update-patch:
422422
- !reference [.rules:test:omnibus-base, rules]
423423
- !reference [.rules:test:update-patch, rules]
424424

425+
# Job tests upgrade from previous internal release to latest if available
426+
# Requires GITLAB_QA_DEV_ACCESS_TOKEN to pull internal release
427+
update-patch-from-internal-to-internal:
428+
extends:
429+
- .omnibus-e2e
430+
- .update-script
431+
variables:
432+
UPDATE_TYPE: internal_patch
433+
QA_RSPEC_TAGS: --tag health_check
434+
rules:
435+
- !reference [.rules:test:update-jobs-never, rules]
436+
- !reference [.rules:test:omnibus-base, rules]
437+
- !reference [.rules:test:update-patch, rules]
438+
425439
update-from-patch-to-stable:
426440
extends:
427441
- .omnibus-e2e

app/assets/javascripts/api/groups_api.js

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { buildApiUrl } from './api_utils';
55
const GROUP_PATH = '/api/:version/groups/:id';
66
const GROUPS_PATH = '/api/:version/groups.json';
77
const GROUP_MEMBERS_PATH = '/api/:version/groups/:id/members';
8+
const GROUP_MEMBER_PATH = '/api/:version/groups/:id/members/:user_id';
89
const GROUP_ALL_MEMBERS_PATH = '/api/:version/groups/:id/members/all';
910
const DESCENDANT_GROUPS_PATH = '/api/:version/groups/:id/descendant_groups';
1011
const GROUP_TRANSFER_LOCATIONS_PATH = 'api/:version/groups/:id/transfer_locations';
@@ -72,6 +73,12 @@ export const getGroupMembers = (groupId, inherited = false, params = {}) => {
7273
return axios.get(url, { params });
7374
};
7475

76+
export const deleteGroupMember = (groupId, userId) => {
77+
const url = buildApiUrl(GROUP_MEMBER_PATH).replace(':id', groupId).replace(':user_id', userId);
78+
79+
return axios.delete(url);
80+
};
81+
7582
export const createGroup = (params) => {
7683
const url = buildApiUrl(GROUPS_PATH);
7784
return axios.post(url, params);

app/assets/javascripts/ci/runner/components/cells/runner_actions_cell.vue

+15-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ export default {
2222
default: null,
2323
required: false,
2424
},
25+
size: {
26+
type: String,
27+
default: 'medium',
28+
required: false,
29+
},
2530
},
2631
emits: ['toggledPaused', 'deleted'],
2732
computed: {
@@ -45,13 +50,21 @@ export default {
4550
4651
<template>
4752
<gl-button-group>
48-
<runner-edit-button v-if="canUpdate && editUrl" :href="editUrl" />
53+
<slot><!-- space for other actions --></slot>
54+
<runner-edit-button v-if="canUpdate && editUrl" :size="size" :href="editUrl" />
4955
<runner-pause-button
5056
v-if="canUpdate"
5157
:runner="runner"
5258
:compact="true"
59+
:size="size"
5360
@toggledPaused="onToggledPaused"
5461
/>
55-
<runner-delete-button v-if="canDelete" :runner="runner" :compact="true" @deleted="onDeleted" />
62+
<runner-delete-button
63+
v-if="canDelete"
64+
:runner="runner"
65+
:compact="true"
66+
:size="size"
67+
@deleted="onDeleted"
68+
/>
5669
</gl-button-group>
5770
</template>

app/assets/javascripts/ci/runner/components/runner_delete_button.vue

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ export default {
2222
required: false,
2323
default: false,
2424
},
25+
size: {
26+
type: String,
27+
default: 'medium',
28+
required: false,
29+
},
2530
},
2631
emits: ['deleted'],
2732
computed: {
@@ -73,6 +78,7 @@ export default {
7378
v-gl-tooltip="loading ? '' : tooltip"
7479
:aria-label="ariaLabel"
7580
:icon="loading ? '' : icon"
81+
:size="size"
7682
:class="buttonClass"
7783
:loading="loading"
7884
variant="danger"

app/assets/javascripts/ci/runner/components/runner_edit_button.vue

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export default {
1515
required: false,
1616
default: null,
1717
},
18+
size: {
19+
type: String,
20+
default: 'medium',
21+
required: false,
22+
},
1823
},
1924
I18N_EDIT,
2025
};
@@ -26,6 +31,7 @@ export default {
2631
v-gl-tooltip="$options.I18N_EDIT"
2732
:aria-label="$options.I18N_EDIT"
2833
:href="href"
34+
:size="size"
2935
icon="pencil"
3036
v-on="$listeners"
3137
/>

app/assets/javascripts/ci/runner/components/runner_list.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ export default {
5050
required: false,
5151
default: false,
5252
},
53+
fixed: {
54+
type: Boolean,
55+
required: false,
56+
default: true,
57+
},
5358
loading: {
5459
type: Boolean,
5560
required: false,
@@ -124,10 +129,10 @@ export default {
124129
:items="runners"
125130
:fields="fields"
126131
:tbody-tr-attr="runnerTrAttr"
132+
:fixed="fixed"
127133
data-testid="runner-list"
128134
stacked="md"
129135
primary-key="id"
130-
fixed
131136
>
132137
<template #head(checkbox)>
133138
<runner-bulk-delete-checkbox :runners="runners" />

app/assets/javascripts/ci/runner/components/runner_pause_button.vue

+6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ export default {
2323
required: false,
2424
default: false,
2525
},
26+
size: {
27+
type: String,
28+
default: 'medium',
29+
required: false,
30+
},
2631
},
2732
emits: ['toggledPaused'],
2833
computed: {
@@ -60,6 +65,7 @@ export default {
6065
<gl-button
6166
v-gl-tooltip="loading ? '' : tooltip"
6267
:icon="icon"
68+
:size="size"
6369
:aria-label="ariaLabel"
6470
:loading="loading"
6571
@click="onClick"

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

+16-4
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ export default {
5353
text: __('Cancel'),
5454
};
5555
},
56-
groupLeaveConfirmationMessage() {
56+
groupLeaveConfirmationTitle() {
5757
if (!this.targetGroup) {
5858
return '';
5959
}
60-
return sprintf(s__('GroupsTree|Are you sure you want to leave the "%{fullName}" group?'), {
60+
61+
return sprintf(s__('GroupsTree|Are you sure you want to leave "%{fullName}"?'), {
6162
fullName: this.targetGroup.fullName,
6263
});
6364
},
@@ -240,13 +241,24 @@ export default {
240241
<gl-modal
241242
modal-id="leave-group-modal"
242243
:visible="isModalVisible"
243-
:title="__('Are you sure?')"
244+
:title="groupLeaveConfirmationTitle"
244245
:action-primary="primaryProps"
245246
:action-cancel="cancelProps"
246247
@primary="leaveGroup"
247248
@hide="hideModal"
248249
>
249-
{{ groupLeaveConfirmationMessage }}
250+
<p>{{ s__('GroupsTree|When you leave this group:') }}</p>
251+
<ul>
252+
<li>{{ s__('GroupsTree|You lose access to all projects within this group') }}</li>
253+
<li>
254+
{{
255+
s__(
256+
'GroupsTree|Your assigned issues and merge requests remain, but you cannot view or modify them',
257+
)
258+
}}
259+
</li>
260+
<li>{{ s__('GroupsTree|You need an invitation to rejoin') }}</li>
261+
</ul>
250262
</gl-modal>
251263
</div>
252264
</template>

app/assets/javascripts/groups/your_work/graphql/utils.js

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const formatGroup = (group) => ({
1414
updatedAt: group.updated_at,
1515
avatarUrl: group.avatar_url,
1616
userPermissions: {
17+
canLeave: group.can_leave,
1718
removeGroup: group.can_remove,
1819
viewEditPage: group.can_edit,
1920
},

app/assets/javascripts/merge_requests/components/sticky_header.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ export default {
261261
</ul>
262262
<div class="gl-ml-auto gl-hidden gl-items-center lg:gl-flex">
263263
<discussion-counter :blocks-merge="blocksMerge" hide-options />
264-
<submit-review-button v-if="glFeatures.improvedReviewExperience" class="gl-mr-3" />
265264
<div v-if="isSignedIn" :class="{ 'gl-flex gl-gap-3': isNotificationsTodosButtons }">
266265
<todo-widget
267266
:issuable-id="issuableId"
@@ -276,6 +275,7 @@ export default {
276275
issuable-type="merge_request"
277276
/>
278277
</div>
278+
<submit-review-button v-if="glFeatures.improvedReviewExperience" class="gl-ml-3" />
279279
</div>
280280
</div>
281281
</div>

app/assets/javascripts/organizations/shared/graphql/fragments/group.fragment.graphql

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ fragment Group on Group {
1616
createdAt
1717
updatedAt
1818
userPermissions {
19+
canLeave
1920
removeGroup
2021
viewEditPage
2122
}

app/assets/javascripts/organizations/shared/utils.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
2-
import { ACTION_EDIT, ACTION_DELETE } from '~/vue_shared/components/list_actions/constants';
2+
import {
3+
ACTION_EDIT,
4+
ACTION_DELETE,
5+
ACTION_LEAVE,
6+
} from '~/vue_shared/components/list_actions/constants';
37
import {
48
TIMESTAMP_TYPE_CREATED_AT,
59
TIMESTAMP_TYPE_UPDATED_AT,
@@ -14,6 +18,10 @@ const availableGroupActions = (userPermissions) => {
1418
baseActions.push(ACTION_EDIT);
1519
}
1620

21+
if (userPermissions.canLeave) {
22+
baseActions.push(ACTION_LEAVE);
23+
}
24+
1725
if (userPermissions.removeGroup) {
1826
baseActions.push(ACTION_DELETE);
1927
}

app/assets/javascripts/repository/components/header_area/open_mr_badge.vue

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export default {
140140
class="gl-h-full"
141141
:title="badgeTitle"
142142
:aria-label="badgeTitle"
143+
tag="a"
143144
>
144145
{{ openMRsCountText }}
145146
</gl-badge>

app/assets/javascripts/sidebar/mount_sidebar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function mountSubmitReviewButton(pinia) {
5858
el,
5959
pinia,
6060
render(h) {
61-
return h(SubmitReviewButton, { attrs: { class: 'gl-mr-3' } });
61+
return h(SubmitReviewButton, { attrs: { class: 'gl-ml-3' } });
6262
},
6363
});
6464
}

app/assets/javascripts/todos/components/todo_item_body.vue

+4-15
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import {
1919
TODO_ACTION_TYPE_UNMERGEABLE,
2020
TODO_ACTION_TYPE_SSH_KEY_EXPIRED,
2121
TODO_ACTION_TYPE_SSH_KEY_EXPIRING_SOON,
22-
TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED,
23-
TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED,
22+
DUO_ACCESS_GRANTED_ACTIONS,
2423
} from '../constants';
2524
2625
export default {
@@ -61,15 +60,11 @@ export default {
6160
this.todo.action !== TODO_ACTION_TYPE_UNMERGEABLE &&
6261
this.todo.action !== TODO_ACTION_TYPE_SSH_KEY_EXPIRED &&
6362
this.todo.action !== TODO_ACTION_TYPE_SSH_KEY_EXPIRING_SOON &&
64-
this.todo.action !== TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED &&
65-
this.todo.action !== TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED
63+
!DUO_ACCESS_GRANTED_ACTIONS.includes(this.todo.action)
6664
);
6765
},
6866
showAvatarOnNote() {
69-
return (
70-
this.todo.action !== TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED &&
71-
this.todo.action !== TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED
72-
);
67+
return !DUO_ACCESS_GRANTED_ACTIONS.includes(this.todo.action);
7368
},
7469
author() {
7570
if (this.isHiddenBySaml) {
@@ -162,13 +157,7 @@ export default {
162157
name = s__('Todos|Your SSH key is expiring soon');
163158
}
164159
165-
if (this.todo.action === TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED) {
166-
name = s__(
167-
'Todos|You now have access to AI-powered features. Learn how to set up Code Suggestions and Chat in your IDE',
168-
);
169-
}
170-
171-
if (this.todo.action === TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED) {
160+
if (DUO_ACCESS_GRANTED_ACTIONS.includes(this.todo.action)) {
172161
name = s__(
173162
'Todos|You now have access to AI-powered features. Learn how to set up Code Suggestions and Chat in your IDE',
174163
);

app/assets/javascripts/todos/components/todo_item_title.vue

+2-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import {
1212
TODO_TARGET_TYPE_MERGE_REQUEST,
1313
TODO_TARGET_TYPE_PIPELINE,
1414
TODO_TARGET_TYPE_SSH_KEY,
15-
TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED,
16-
TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED,
15+
DUO_ACCESS_GRANTED_ACTIONS,
1716
} from '../constants';
1817
1918
export default {
@@ -44,10 +43,7 @@ export default {
4443
return this.todo.action === TODO_ACTION_TYPE_MEMBER_ACCESS_REQUESTED;
4544
},
4645
isDuoActionType() {
47-
return (
48-
this.todo.action === TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED ||
49-
this.todo.action === TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED
50-
);
46+
return DUO_ACCESS_GRANTED_ACTIONS.includes(this.todo.action);
5147
},
5248
issuableType() {
5349
if (this.isMergeRequest) {

app/assets/javascripts/todos/constants.js

+7
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export const TODO_ACTION_TYPE_SSH_KEY_EXPIRED = 'ssh_key_expired';
2929
export const TODO_ACTION_TYPE_SSH_KEY_EXPIRING_SOON = 'ssh_key_expiring_soon';
3030
export const TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED = 'duo_pro_access_granted';
3131
export const TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED = 'duo_enterprise_access_granted';
32+
export const TODO_ACTION_TYPE_DUO_CORE_ACCESS_GRANTED = 'duo_core_access_granted';
33+
34+
export const DUO_ACCESS_GRANTED_ACTIONS = [
35+
TODO_ACTION_TYPE_DUO_PRO_ACCESS_GRANTED,
36+
TODO_ACTION_TYPE_DUO_ENTERPRISE_ACCESS_GRANTED,
37+
TODO_ACTION_TYPE_DUO_CORE_ACCESS_GRANTED,
38+
];
3239

3340
export const TODO_EMPTY_TITLE_POOL = [
3441
s__("Todos|Good job! Looks like you don't have anything left on your To-Do List"),

app/assets/javascripts/token_access/components/token_access_app.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default {
3333
<token-permissions v-if="glFeatures.allowPushRepositoryForJobToken" />
3434
<inbound-token-access />
3535
<auth-log />
36-
<outbound-token-access />
36+
<outbound-token-access v-if="!glFeatures.removeLimitCiJobTokenScope" />
3737
</template>
3838
</gl-intersection-observer>
3939
</template>

app/assets/javascripts/vue_shared/access_tokens/stores/access_tokens.js

+3
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ export const useAccessTokens = defineStore('accessTokens', {
167167
message: s__('AccessTokens|The token was revoked successfully.'),
168168
variant: 'success',
169169
});
170+
// Reset the token to avoid a situation where a token is created or rotated and then revoked,
171+
// but the `Your token` banner still displays the token.
172+
this.token = null;
170173
// Reset pagination to avoid situations like: page 2 contains only one token and after it
171174
// is revoked the page shows `No tokens access tokens` (but there are 20 tokens on page 1).
172175
this.page = 1;

0 commit comments

Comments
 (0)