Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
a502ee3578
commit
1079a0ed1e
|
|
@ -1 +1 @@
|
|||
5d7a0fd6f78a76237a58206b56b9311e0d5b1b4f
|
||||
53fcf7e6288e41ff05ddc04b354e24d9ebc25498
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
bf993d121acd0533791e294a678a06180933ea89
|
||||
c467a18d6d952c904fa033df2ea5b92aba98e8dc
|
||||
|
|
|
|||
2
Gemfile
2
Gemfile
|
|
@ -253,7 +253,7 @@ gem 'gitlab-active-context', path: 'gems/gitlab-active-context', require: 'activ
|
|||
# Markdown and HTML processing
|
||||
gem 'html-pipeline', '~> 2.14.3', feature_category: :markdown
|
||||
gem 'deckar01-task_list', '2.3.4', feature_category: :markdown
|
||||
gem 'gitlab-markup', '~> 1.9.0', require: 'github/markup', feature_category: :markdown
|
||||
gem 'gitlab-markup', '~> 1.10.0', require: 'github/markup', feature_category: :markdown
|
||||
gem 'commonmarker', '~> 0.23.10', feature_category: :markdown
|
||||
gem 'kramdown', '~> 2.5.0', feature_category: :markdown
|
||||
gem 'RedCloth', '~> 4.3.3', feature_category: :markdown
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@
|
|||
{"name":"gitlab-labkit","version":"0.37.0","platform":"ruby","checksum":"d2dd0a60db2149a9a8eebf2975dc23f54ac3ceb01bdba732eb1b26b86dfffa70"},
|
||||
{"name":"gitlab-license","version":"2.6.0","platform":"ruby","checksum":"2c1f8ae73835640ec77bf758c1d0c9730635043c01cf77902f7976e826d7d016"},
|
||||
{"name":"gitlab-mail_room","version":"0.0.25","platform":"ruby","checksum":"223ce7c3c0797b6015eaa37147884e6ddc7be9a7ee90a424358c96bc18613b1a"},
|
||||
{"name":"gitlab-markup","version":"1.9.0","platform":"ruby","checksum":"7eda045a08ec2d110084252fa13a8c9eac8bdac0e302035ca7db4b82bcbd7ed4"},
|
||||
{"name":"gitlab-markup","version":"1.10.0","platform":"ruby","checksum":"668c8058b80cbfecda10a8e6e123de0336df7f16e34662dc8eae69f597cd468d"},
|
||||
{"name":"gitlab-net-dns","version":"0.10.0","platform":"ruby","checksum":"73b4613d8c851480b7b4e631f117bce4bbb4b6b8073ecf4eb167407e46097c6e"},
|
||||
{"name":"gitlab-sdk","version":"0.3.1","platform":"ruby","checksum":"48ba49084f4ab92df7c7ef9f347020d9dfdf6ed9c1e782b67264e98ffe6ea710"},
|
||||
{"name":"gitlab-secret_detection","version":"0.19.0","platform":"ruby","checksum":"995d87ef652dec742de8af5015018f975a01c8961a7c71892e9be19417215613"},
|
||||
|
|
|
|||
|
|
@ -769,7 +769,7 @@ GEM
|
|||
oauth2 (>= 1.4.4, < 3)
|
||||
redis (>= 5, < 6)
|
||||
redis-namespace (>= 1.8.2)
|
||||
gitlab-markup (1.9.0)
|
||||
gitlab-markup (1.10.0)
|
||||
gitlab-net-dns (0.10.0)
|
||||
gitlab-sdk (0.3.1)
|
||||
activesupport (>= 5.2.0)
|
||||
|
|
@ -2111,7 +2111,7 @@ DEPENDENCIES
|
|||
gitlab-labkit (~> 0.37.0)
|
||||
gitlab-license (~> 2.6)
|
||||
gitlab-mail_room (~> 0.0.24)
|
||||
gitlab-markup (~> 1.9.0)
|
||||
gitlab-markup (~> 1.10.0)
|
||||
gitlab-net-dns (~> 0.10.0)
|
||||
gitlab-rspec!
|
||||
gitlab-rspec_flaky!
|
||||
|
|
@ -2366,4 +2366,4 @@ DEPENDENCIES
|
|||
yajl-ruby (~> 1.4.3)
|
||||
|
||||
BUNDLED WITH
|
||||
2.5.11
|
||||
2.6.5
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@
|
|||
{"name":"gitlab-labkit","version":"0.37.0","platform":"ruby","checksum":"d2dd0a60db2149a9a8eebf2975dc23f54ac3ceb01bdba732eb1b26b86dfffa70"},
|
||||
{"name":"gitlab-license","version":"2.6.0","platform":"ruby","checksum":"2c1f8ae73835640ec77bf758c1d0c9730635043c01cf77902f7976e826d7d016"},
|
||||
{"name":"gitlab-mail_room","version":"0.0.25","platform":"ruby","checksum":"223ce7c3c0797b6015eaa37147884e6ddc7be9a7ee90a424358c96bc18613b1a"},
|
||||
{"name":"gitlab-markup","version":"1.9.0","platform":"ruby","checksum":"7eda045a08ec2d110084252fa13a8c9eac8bdac0e302035ca7db4b82bcbd7ed4"},
|
||||
{"name":"gitlab-markup","version":"1.10.0","platform":"ruby","checksum":"668c8058b80cbfecda10a8e6e123de0336df7f16e34662dc8eae69f597cd468d"},
|
||||
{"name":"gitlab-net-dns","version":"0.10.0","platform":"ruby","checksum":"73b4613d8c851480b7b4e631f117bce4bbb4b6b8073ecf4eb167407e46097c6e"},
|
||||
{"name":"gitlab-sdk","version":"0.3.1","platform":"ruby","checksum":"48ba49084f4ab92df7c7ef9f347020d9dfdf6ed9c1e782b67264e98ffe6ea710"},
|
||||
{"name":"gitlab-secret_detection","version":"0.19.0","platform":"ruby","checksum":"995d87ef652dec742de8af5015018f975a01c8961a7c71892e9be19417215613"},
|
||||
|
|
@ -802,8 +802,8 @@
|
|||
{"name":"webmock","version":"3.25.0","platform":"ruby","checksum":"573c23fc4887008c830f22da588db339ca38b6d59856fd57f5a068959474198e"},
|
||||
{"name":"webrick","version":"1.8.2","platform":"ruby","checksum":"431746a349199546ff9dd272cae10849c865f938216e41c402a6489248f12f21"},
|
||||
{"name":"websocket","version":"1.2.10","platform":"ruby","checksum":"2cc1a4a79b6e63637b326b4273e46adcddf7871caa5dc5711f2ca4061a629fa8"},
|
||||
{"name":"websocket-driver","version":"0.7.7","platform":"java","checksum":"e2520a6049feb88691e042d631063fa96d50620fb7f53b30180ae6fb2cf75eb1"},
|
||||
{"name":"websocket-driver","version":"0.7.7","platform":"ruby","checksum":"056d99f2cd545712cfb1291650fde7478e4f2661dc1db6a0fa3b966231a146b4"},
|
||||
{"name":"websocket-driver","version":"0.7.6","platform":"java","checksum":"bc894b9e9d5aee55ac04b61003e1957c4ef411a5a048199587d0499785b505c3"},
|
||||
{"name":"websocket-driver","version":"0.7.6","platform":"ruby","checksum":"f69400be7bc197879726ad8e6f5869a61823147372fd8928836a53c2c741d0db"},
|
||||
{"name":"websocket-extensions","version":"0.1.5","platform":"ruby","checksum":"1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241"},
|
||||
{"name":"wikicloth","version":"0.8.1","platform":"ruby","checksum":"7ac8a9ca0a948cf472851e521afc6c2a6b04a8f91ef1d824ba6a61ffbd60e6ca"},
|
||||
{"name":"wisper","version":"2.0.1","platform":"ruby","checksum":"ce17bc5c3a166f241a2e6613848b025c8146fce2defba505920c1d1f3f88fae6"},
|
||||
|
|
|
|||
|
|
@ -781,7 +781,7 @@ GEM
|
|||
oauth2 (>= 1.4.4, < 3)
|
||||
redis (>= 5, < 6)
|
||||
redis-namespace (>= 1.8.2)
|
||||
gitlab-markup (1.9.0)
|
||||
gitlab-markup (1.10.0)
|
||||
gitlab-net-dns (0.10.0)
|
||||
gitlab-sdk (0.3.1)
|
||||
activesupport (>= 5.2.0)
|
||||
|
|
@ -2010,8 +2010,7 @@ GEM
|
|||
hashdiff (>= 0.4.0, < 2.0.0)
|
||||
webrick (1.8.2)
|
||||
websocket (1.2.10)
|
||||
websocket-driver (0.7.7)
|
||||
base64
|
||||
websocket-driver (0.7.6)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.5)
|
||||
wikicloth (0.8.1)
|
||||
|
|
@ -2146,7 +2145,7 @@ DEPENDENCIES
|
|||
gitlab-labkit (~> 0.37.0)
|
||||
gitlab-license (~> 2.6)
|
||||
gitlab-mail_room (~> 0.0.24)
|
||||
gitlab-markup (~> 1.9.0)
|
||||
gitlab-markup (~> 1.10.0)
|
||||
gitlab-net-dns (~> 0.10.0)
|
||||
gitlab-rspec!
|
||||
gitlab-rspec_flaky!
|
||||
|
|
@ -2401,4 +2400,4 @@ DEPENDENCIES
|
|||
yajl-ruby (~> 1.4.3)
|
||||
|
||||
BUNDLED WITH
|
||||
2.5.11
|
||||
2.6.5
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { ExpandLinesAdapter } from '~/rapid_diffs/expand_lines/adapter';
|
||||
import { OptionsMenuAdapter } from '~/rapid_diffs/options_menu/adapter';
|
||||
import { ToggleFileAdapter } from '~/rapid_diffs/toggle_file/adapter';
|
||||
|
||||
const RAPID_DIFFS_VIEWERS = {
|
||||
|
|
@ -6,7 +7,7 @@ const RAPID_DIFFS_VIEWERS = {
|
|||
text_parallel: 'text_parallel',
|
||||
};
|
||||
|
||||
const COMMON_ADAPTERS = [ExpandLinesAdapter, ToggleFileAdapter];
|
||||
const COMMON_ADAPTERS = [ExpandLinesAdapter, OptionsMenuAdapter, ToggleFileAdapter];
|
||||
|
||||
export const VIEWER_ADAPTERS = {
|
||||
[RAPID_DIFFS_VIEWERS.text_inline]: COMMON_ADAPTERS,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
import Vue from 'vue';
|
||||
import { GlDisclosureDropdown } from '@gitlab/ui';
|
||||
|
||||
export const OptionsMenuAdapter = {
|
||||
clicks: {
|
||||
toggleOptionsMenu(event) {
|
||||
const button = event.target.closest('.js-options-button');
|
||||
|
||||
if (!this.sink.optionsMenu) {
|
||||
this.sink.optionsMenu = new Vue({
|
||||
el: Vue.version.startsWith('2') ? button : button.parentElement,
|
||||
name: 'GlDisclosureDropdown',
|
||||
render: (createElement = Vue.h) =>
|
||||
createElement(GlDisclosureDropdown, {
|
||||
props: {
|
||||
icon: 'ellipsis_v',
|
||||
startOpened: true,
|
||||
noCaret: true,
|
||||
category: 'tertiary',
|
||||
size: 'small',
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -133,6 +133,9 @@ export default {
|
|||
:list-item-class="listItemClass"
|
||||
:timestamp-type="timestampType"
|
||||
>
|
||||
<template #children-toggle>
|
||||
<slot name="children-toggle"></slot>
|
||||
</template>
|
||||
<template #avatar-meta>
|
||||
<gl-icon
|
||||
v-if="visibility"
|
||||
|
|
@ -187,8 +190,8 @@ export default {
|
|||
/>
|
||||
</template>
|
||||
|
||||
<template #nested-items>
|
||||
<slot name="nested-items"></slot>
|
||||
<template #children>
|
||||
<slot name="children"></slot>
|
||||
</template>
|
||||
</list-item>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,62 @@
|
|||
import NestedGroupsProjectsList from './nested_groups_projects_list.vue';
|
||||
import { items } from './mock_data';
|
||||
import { items as mockItems } from './mock_data';
|
||||
import { LIST_ITEM_TYPE_GROUP } from './constants';
|
||||
|
||||
export default {
|
||||
component: NestedGroupsProjectsList,
|
||||
title: 'vue_shared/nested_groups_projects_list',
|
||||
};
|
||||
|
||||
const Template = (args, { argTypes }) => ({
|
||||
const Template = () => ({
|
||||
components: { NestedGroupsProjectsList },
|
||||
props: Object.keys(argTypes),
|
||||
template: `<nested-groups-projects-list :items="items" />`,
|
||||
data() {
|
||||
return {
|
||||
items: mockItems,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
findItemById(items, id) {
|
||||
if (!items?.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (let i = 0; i < items.length; i += 1) {
|
||||
const item = items[i];
|
||||
|
||||
// Check if current item has the ID we're looking for
|
||||
if (item.id === id) {
|
||||
return item;
|
||||
}
|
||||
|
||||
// If this is a group, recursively search its children
|
||||
if (item.type === LIST_ITEM_TYPE_GROUP && item.children?.length) {
|
||||
return this.findItemById(item.children, id);
|
||||
}
|
||||
}
|
||||
|
||||
// Item not found at any level
|
||||
return null;
|
||||
},
|
||||
async onLoadChildren(id) {
|
||||
const item = this.findItemById(this.items, id);
|
||||
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
item.childrenLoading = true;
|
||||
|
||||
// Pretend we are waiting for an API request
|
||||
await new Promise((resolve) => {
|
||||
setTimeout(resolve, 1000);
|
||||
});
|
||||
|
||||
item.childrenLoading = false;
|
||||
item.children = item.childrenToLoad;
|
||||
},
|
||||
},
|
||||
template: `<nested-groups-projects-list :items="items" @load-children="onLoadChildren" />`,
|
||||
});
|
||||
|
||||
export const Default = Template.bind({});
|
||||
Default.args = {
|
||||
items,
|
||||
};
|
||||
Default.args = {};
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { ACTION_EDIT, ACTION_DELETE } from '~/vue_shared/components/list_actions
|
|||
import { slugify } from '~/lib/utils/text_utility';
|
||||
import { LIST_ITEM_TYPE_PROJECT, LIST_ITEM_TYPE_GROUP } from './constants';
|
||||
|
||||
const makeGroup = ({ name, fullName, children = [] }) => {
|
||||
const makeGroup = ({ name, fullName, childrenToLoad = [] }) => {
|
||||
const fullPath = slugify(fullName);
|
||||
|
||||
return {
|
||||
|
|
@ -32,7 +32,10 @@ const makeGroup = ({ name, fullName, children = [] }) => {
|
|||
editPath: `/${fullPath}/edit`,
|
||||
availableActions: [ACTION_EDIT, ACTION_DELETE],
|
||||
actionLoadingStates: { [ACTION_DELETE]: false },
|
||||
children,
|
||||
children: [],
|
||||
childrenToLoad,
|
||||
hasChildren: childrenToLoad.length,
|
||||
childrenLoading: false,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -100,13 +103,13 @@ export const projectB = makeProject({
|
|||
export const nestedSubgroup = makeGroup({
|
||||
name: 'Nested subgroup',
|
||||
fullName: 'Subgroup A / Nested subgroup',
|
||||
children: [projectA],
|
||||
childrenToLoad: [projectA],
|
||||
});
|
||||
|
||||
export const subgroupA = makeGroup({
|
||||
name: 'Subgroup A',
|
||||
fullName: 'Subgroup A',
|
||||
children: [nestedSubgroup, projectB],
|
||||
childrenToLoad: [nestedSubgroup, projectB],
|
||||
});
|
||||
|
||||
export const subgroupB = makeGroup({
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export default {
|
|||
v-for="item in items"
|
||||
:key="`${item.type}-${item.id}`"
|
||||
:item="item"
|
||||
@load-children="$emit('load-children', $event)"
|
||||
/>
|
||||
</ul>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
<script>
|
||||
import { GlButton } from '@gitlab/ui';
|
||||
import { sprintf, s__ } from '~/locale';
|
||||
import ProjectsListItem from '../projects_list/projects_list_item.vue';
|
||||
import GroupsListItem from '../groups_list/groups_list_item.vue';
|
||||
import NestedGroupsProjectsList from './nested_groups_projects_list.vue';
|
||||
|
|
@ -6,6 +8,7 @@ import { LIST_ITEM_TYPE_PROJECT } from './constants';
|
|||
|
||||
export default {
|
||||
components: {
|
||||
GlButton,
|
||||
NestedGroupsProjectsList,
|
||||
},
|
||||
props: {
|
||||
|
|
@ -14,17 +17,65 @@ export default {
|
|||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isExpanded: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
itemComponent() {
|
||||
return this.item.type === LIST_ITEM_TYPE_PROJECT ? ProjectsListItem : GroupsListItem;
|
||||
},
|
||||
itemProps() {
|
||||
return this.item.type === LIST_ITEM_TYPE_PROJECT
|
||||
? { project: this.item, showProjectIcon: true }
|
||||
: { group: this.item, showGroupIcon: true };
|
||||
nestedItemsContainerId() {
|
||||
return `nested-items-container-${this.item.id}`;
|
||||
},
|
||||
hasChildren() {
|
||||
return this.item.children?.length;
|
||||
itemProps() {
|
||||
const sharedProps = {
|
||||
listItemClass: this.item.hasChildren ? null : 'gl-pl-7',
|
||||
};
|
||||
|
||||
return this.item.type === LIST_ITEM_TYPE_PROJECT
|
||||
? {
|
||||
...sharedProps,
|
||||
project: this.item,
|
||||
showProjectIcon: true,
|
||||
}
|
||||
: {
|
||||
...sharedProps,
|
||||
group: this.item,
|
||||
showGroupIcon: true,
|
||||
};
|
||||
},
|
||||
showChildren() {
|
||||
return this.isExpanded && this.item.children?.length;
|
||||
},
|
||||
expandButtonProps() {
|
||||
return {
|
||||
'aria-label': sprintf(s__('Groups|Show children of %{avatarLabel}'), {
|
||||
avatarLabel: this.item.avatarLabel,
|
||||
}),
|
||||
category: 'tertiary',
|
||||
icon: this.showChildren ? 'chevron-down' : 'chevron-right',
|
||||
loading: this.item.childrenLoading,
|
||||
'aria-expanded': this.showChildren ? 'true' : 'false',
|
||||
'aria-controls': this.nestedItemsContainerId,
|
||||
};
|
||||
},
|
||||
nestedGroupsProjectsListItems() {
|
||||
if (this.showChildren) {
|
||||
return this.item.children;
|
||||
}
|
||||
|
||||
return [];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onNestedItemsToggleClick() {
|
||||
this.isExpanded = !this.isExpanded;
|
||||
|
||||
if (!this.item.children?.length) {
|
||||
this.$emit('load-children', this.item.id);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -32,8 +83,16 @@ export default {
|
|||
|
||||
<template>
|
||||
<component :is="itemComponent" v-bind="itemProps">
|
||||
<template v-if="hasChildren" #nested-items>
|
||||
<nested-groups-projects-list :items="item.children" class="gl-pl-4" />
|
||||
<template v-if="item.hasChildren" #children-toggle>
|
||||
<gl-button v-bind="expandButtonProps" @click="onNestedItemsToggleClick" />
|
||||
</template>
|
||||
<template v-if="item.hasChildren" #children>
|
||||
<nested-groups-projects-list
|
||||
:id="nestedItemsContainerId"
|
||||
:items="nestedGroupsProjectsListItems"
|
||||
class="gl-pl-6"
|
||||
@load-children="$emit('load-children', $event)"
|
||||
/>
|
||||
</template>
|
||||
</component>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ export default {
|
|||
<template>
|
||||
<li>
|
||||
<div class="gl-border-b gl-flex gl-items-start gl-py-4" :class="listItemClass">
|
||||
<slot name="children-toggle"></slot>
|
||||
<div class="gl-grow gl-items-start md:gl-flex">
|
||||
<div class="gl-flex gl-grow" :data-testid="contentTestid">
|
||||
<div v-if="showIcon" class="gl-mr-3 gl-flex gl-h-7 gl-shrink-0 gl-items-center">
|
||||
|
|
@ -153,6 +154,6 @@ export default {
|
|||
</div>
|
||||
|
||||
<slot name="footer"></slot>
|
||||
<slot name="nested-items"></slot>
|
||||
<slot name="children"></slot>
|
||||
</li>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -357,11 +357,7 @@ export default {
|
|||
return WORK_ITEM_TYPE_VALUE_MAP[this.workItemType];
|
||||
},
|
||||
showMoveButton() {
|
||||
return (
|
||||
this.workItemType === WORK_ITEM_TYPE_VALUE_ISSUE &&
|
||||
this.canMove &&
|
||||
this.glFeatures.workItemsAlpha
|
||||
);
|
||||
return this.workItemType === WORK_ITEM_TYPE_VALUE_ISSUE && this.canMove;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -48,3 +48,6 @@
|
|||
%span.rd-lines-removed
|
||||
%span>= "−".html_safe
|
||||
%span{ "data-testid" => "js-file-deletion-line" }= @diff_file.removed_lines
|
||||
.rd-diff-file-options-menu.gl-ml-2
|
||||
.js-options-menu
|
||||
= render Pajamas::ButtonComponent.new(category: :tertiary, size: :small, icon: 'ellipsis_v', button_options: { class: 'js-options-button', data: { click: 'toggleOptionsMenu' }, aria: { label: _('Options') } })
|
||||
|
|
|
|||
|
|
@ -49,6 +49,23 @@ module WorkItems
|
|||
|
||||
@callbacks
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# In legacy Issues::MoveService and Issues::CloneService, system notes are created within the
|
||||
# work item move transaction, so we replicate the behaviour for now.
|
||||
# This is to be changed in MVC2: https://gitlab.com/groups/gitlab-org/-/epics/15476
|
||||
def transaction_create(new_work_item)
|
||||
super.tap do |save_result|
|
||||
break save_result unless save_result
|
||||
|
||||
if operation == :move
|
||||
::WorkItems::DataSync::MoveService.transaction_callback(new_work_item, original_work_item, current_user)
|
||||
else
|
||||
::WorkItems::DataSync::CloneService.transaction_callback(new_work_item, original_work_item, current_user)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,6 +3,33 @@
|
|||
module WorkItems
|
||||
module DataSync
|
||||
class CloneService < ::WorkItems::DataSync::BaseService
|
||||
class << self
|
||||
def transaction_callback(new_work_item, work_item, current_user)
|
||||
clone_system_notes(current_user, new_work_item, work_item)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def clone_system_notes(current_user, new_work_item, work_item)
|
||||
SystemNoteService.noteable_cloned(
|
||||
new_work_item,
|
||||
new_work_item.project,
|
||||
work_item,
|
||||
current_user,
|
||||
direction: :from,
|
||||
created_at: new_work_item.created_at
|
||||
)
|
||||
|
||||
SystemNoteService.noteable_cloned(
|
||||
work_item,
|
||||
work_item.project,
|
||||
new_work_item,
|
||||
current_user,
|
||||
direction: :to
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def verify_work_item_action_permission
|
||||
|
|
@ -10,15 +37,7 @@ module WorkItems
|
|||
end
|
||||
|
||||
def data_sync_action
|
||||
service_response = clone_work_item
|
||||
new_work_item = service_response[:work_item]
|
||||
|
||||
# this may need to be moved inside `BaseCopyDataService` so that this would be the first system note after
|
||||
# clone action started, followed by some other system notes related to data that was not copied over for
|
||||
# various reasons, e.g. labels or milestone not being copied/set due to not being found in the target namespace
|
||||
clone_system_notes(new_work_item) if service_response.success? && new_work_item.present?
|
||||
|
||||
service_response
|
||||
clone_work_item
|
||||
end
|
||||
|
||||
def verify_can_clone_work_item(work_item, target_namespace)
|
||||
|
|
@ -69,25 +88,6 @@ module WorkItems
|
|||
}
|
||||
).execute
|
||||
end
|
||||
|
||||
def clone_system_notes(new_work_item)
|
||||
SystemNoteService.noteable_cloned(
|
||||
new_work_item,
|
||||
new_work_item.project,
|
||||
work_item,
|
||||
current_user,
|
||||
direction: :from,
|
||||
created_at: new_work_item.created_at
|
||||
)
|
||||
|
||||
SystemNoteService.noteable_cloned(
|
||||
work_item,
|
||||
work_item.project,
|
||||
new_work_item,
|
||||
current_user,
|
||||
direction: :to
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -57,10 +57,8 @@ module WorkItems
|
|||
end
|
||||
end
|
||||
|
||||
def cleanup_work_item
|
||||
close_service = Issues::CloseService.new(container: work_item.namespace, current_user: current_user)
|
||||
close_service.execute(work_item, notifications: false, system_note: true)
|
||||
end
|
||||
# this will handle work item deletion
|
||||
def cleanup_work_item; end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,6 +3,49 @@
|
|||
module WorkItems
|
||||
module DataSync
|
||||
class MoveService < ::WorkItems::DataSync::BaseService
|
||||
class << self
|
||||
def transaction_callback(new_work_item, original_work_item, current_user)
|
||||
original_work_item.update(moved_to: new_work_item)
|
||||
|
||||
close_original_work_item(current_user, new_work_item, original_work_item)
|
||||
move_system_notes(current_user, new_work_item, original_work_item)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def move_system_notes(current_user, new_work_item, original_work_item)
|
||||
SystemNoteService.noteable_moved(
|
||||
new_work_item,
|
||||
new_work_item.project,
|
||||
original_work_item,
|
||||
current_user,
|
||||
direction: :from
|
||||
)
|
||||
|
||||
SystemNoteService.noteable_moved(
|
||||
original_work_item,
|
||||
original_work_item.project,
|
||||
new_work_item,
|
||||
current_user,
|
||||
direction: :to
|
||||
)
|
||||
end
|
||||
|
||||
def close_original_work_item(current_user, new_work_item, original_work_item)
|
||||
context = { original: original_work_item, user: current_user }
|
||||
|
||||
# We need this because move work item is supposed to work with epics and for EpicWorkItem
|
||||
# Issues::CloseService also enqueues a job for ::WorkItems::ValidateEpicWorkItemSyncWorker and because
|
||||
# this is being run within a transaction, we are delaying the close operation until after commit.
|
||||
new_work_item.run_after_commit_or_now do
|
||||
close_service = ::Issues::CloseService.new(
|
||||
container: context[:original].namespace, current_user: context[:user]
|
||||
)
|
||||
close_service.execute(context[:original], notifications: false, system_note: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def verify_work_item_action_permission
|
||||
|
|
@ -67,9 +110,6 @@ module WorkItems
|
|||
|
||||
return create_response unless create_response.success? && create_response[:work_item].present?
|
||||
|
||||
new_work_item = create_response[:work_item]
|
||||
work_item.update(moved_to: new_work_item)
|
||||
|
||||
# this service is based on Issues::CloseService#execute, which does not provide a clear return, so we'll skip
|
||||
# handling it for now. This will be moved to a cleanup service that would be more result oriented where we can
|
||||
# handle the service response status
|
||||
|
|
@ -77,32 +117,9 @@ module WorkItems
|
|||
work_item: work_item, current_user: current_user, params: params
|
||||
).execute
|
||||
|
||||
# this may need to be moved inside `BaseCopyDataService` so that this would be the first system note after
|
||||
# move action started, followed by some other system notes related to which data is removed, replaced, changed
|
||||
# etc during the move operation.
|
||||
move_system_notes(new_work_item)
|
||||
|
||||
create_response
|
||||
end
|
||||
|
||||
def move_system_notes(new_work_item)
|
||||
SystemNoteService.noteable_moved(
|
||||
new_work_item,
|
||||
new_work_item.project,
|
||||
work_item,
|
||||
current_user,
|
||||
direction: :from
|
||||
)
|
||||
|
||||
SystemNoteService.noteable_moved(
|
||||
work_item,
|
||||
work_item.project,
|
||||
new_work_item,
|
||||
current_user,
|
||||
direction: :to
|
||||
)
|
||||
end
|
||||
|
||||
def move_any_work_item_type
|
||||
@execution_arguments.present? && !!@execution_arguments[:skip_work_item_type_check]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
name: summarize_code_review_claude_3_7_sonnet
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/521383
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/183213
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/522987
|
||||
milestone: '17.10'
|
||||
group: group::code review
|
||||
type: beta
|
||||
default_enabled: false
|
||||
|
|
@ -129,9 +129,17 @@ Audit event types belong to the following product categories.
|
|||
| [`merge_request_invalid_approver_rules`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/100496) | An invalid rule when merge request is approved | {{< icon name="check-circle" >}} Yes | GitLab [15.5](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/100496) | Project |
|
||||
| [`merge_request_merged_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/120927) | A merge request is merged using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`merge_request_reopened_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/120927) | A merge request is reopened using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`project_merge_method_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83922) | A project's merge request method is updated | {{< icon name="check-circle" >}} Yes | GitLab [14.10](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) | Project |
|
||||
| [`project_merge_requests_author_approval_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's MR author approval setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_merge_requests_disable_committers_approval_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's setting for disabling committers approval on merge requests is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369277) | Project |
|
||||
| [`project_merge_requests_template_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84624) | A merge request template for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/355805) | Project |
|
||||
| [`project_only_allow_merge_if_all_discussions_are_resolved_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's setting for allowing merge only when all discussions are resolved is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369286) | Project |
|
||||
| [`project_only_allow_merge_if_pipeline_succeeds_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's only allow merge if pipeline succeeds setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_remove_source_branch_after_merge_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83922) | A project has its setting to remove branches after merges updated | {{< icon name="check-circle" >}} Yes | GitLab [14.10](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) | Project |
|
||||
| [`project_require_password_to_approve_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's setting for requiring a user's password for approval of merge request is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369280) | Project |
|
||||
| [`project_reset_approvals_on_push_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66234) | A project has its setting on whether approvals are reset on a push is updated | {{< icon name="check-circle" >}} Yes | GitLab [14.2](https://gitlab.com/gitlab-org/gitlab/-/issues/336211) | Project |
|
||||
| [`project_resolve_outdated_diff_discussions_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's resolve outdated diff discussions setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`show_diff_preview_in_email_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Email notification to include diff preview is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group, Project |
|
||||
| [`selective_code_owner_removals_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/148743) | Selective code owner removal is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.0](https://gitlab.com/gitlab-org/gitlab/-/issues/327562) | Project |
|
||||
|
||||
### Code suggestions
|
||||
|
|
@ -182,13 +190,12 @@ Audit event types belong to the following product categories.
|
|||
| [`project_deletion_marked`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117546) | A project is marked for deletion | {{< icon name="check-circle" >}} Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`project_destroyed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117546) | A project is destroyed | {{< icon name="check-circle" >}} Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Group |
|
||||
| [`project_export_file_download_started`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117528) | A download of a project export file is started | {{< icon name="check-circle" >}} Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`project_feature_security_and_compliance_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's security and compliance access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369302) | Project |
|
||||
| [`project_group_link_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108918) | A group is invited to a project | {{< icon name="check-circle" >}} Yes | GitLab [15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/374114) | Group |
|
||||
| [`project_group_link_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108918) | A project group link is deleted | {{< icon name="check-circle" >}} Yes | GitLab [15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/374114) | Group |
|
||||
| [`project_group_link_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108918) | A project group link is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/374114) | Project |
|
||||
| [`project_imported`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117528) | A project is imported | {{< icon name="check-circle" >}} Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Group |
|
||||
| [`project_restored`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117528) | A project is restored | {{< icon name="check-circle" >}} Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`project_topics_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154158) | A project's topics assignments are changed | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/343204) | Project |
|
||||
| [`project_unarchived`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117528) | A project is unarchived | {{< icon name="check-circle" >}} Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`protected_branch_allow_force_push_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68869) | A protected branch has its ability to allow force pushes is updated | {{< icon name="check-circle" >}} Yes | GitLab [14.3](https://gitlab.com/gitlab-org/gitlab/-/issues/338873) | Project |
|
||||
| [`public_repository_download_operation`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149842) | A Git repository for a public project is downloaded | {{< icon name="dotted-circle" >}} No | GitLab [17.0](https://gitlab.com/gitlab-org/gitlab/-/issues/383218) | Project |
|
||||
| [`registration_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123080) | A user registers for instance access | {{< icon name="check-circle" >}} Yes | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/374107) | User |
|
||||
|
|
@ -219,6 +226,7 @@ Audit event types belong to the following product categories.
|
|||
| [`container_repository_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152967) | A project's container registry is deleted | {{< icon name="check-circle" >}} Yes | GitLab [17.2](https://gitlab.com/gitlab-org/gitlab/-/issues/362290) | Project |
|
||||
| [`container_repository_deletion_marked`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152967) | A project's container repository is marked for deletion | {{< icon name="check-circle" >}} Yes | GitLab [17.2](https://gitlab.com/gitlab-org/gitlab/-/issues/362290) | Project |
|
||||
| [`container_repository_tags_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156066) | A project's container repository tag is deleted | {{< icon name="check-circle" >}} Yes | GitLab [17.2](https://gitlab.com/gitlab-org/gitlab/-/issues/362290) | Project |
|
||||
| [`project_feature_container_registry_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's container registry access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369303) | Project |
|
||||
|
||||
### Continuous-integration
|
||||
|
||||
|
|
@ -259,6 +267,13 @@ Audit event types belong to the following product categories.
|
|||
| [`ci_variable_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91983) | A CI/CD variable is deleted for a project | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363090) | Project |
|
||||
| [`ci_variable_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/91983) | A CI/CD variable is updated for a project | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363090) | Project |
|
||||
| [`destroy_pipeline`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/135255) | A pipeline is deleted | {{< icon name="check-circle" >}} Yes | GitLab [16.6](https://gitlab.com/gitlab-org/gitlab/-/issues/339041) | Project |
|
||||
| [`project_cicd_merge_pipelines_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107428) | The CI/CD merge pipelines setting for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369317) | Project |
|
||||
|
||||
### Delivery
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_releases_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's releases access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369308) | Project |
|
||||
|
||||
### Deployment management
|
||||
|
||||
|
|
@ -271,6 +286,12 @@ Audit event types belong to the following product categories.
|
|||
| [`cluster_agent_token_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112036) | A user creates a cluster agent token | {{< icon name="check-circle" >}} Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/382133) | Project |
|
||||
| [`cluster_agent_token_revoked`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112036) | A user revokes a cluster agent token | {{< icon name="check-circle" >}} Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/382133) | Project |
|
||||
|
||||
### Dora metrics
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_metrics_dashboard_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's metrics dashboard access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369289) | Project |
|
||||
|
||||
### GitLab Duo Workflow
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|
|
@ -299,6 +320,7 @@ Audit event types belong to the following product categories.
|
|||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`environment_protected`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108247) | A protected environment is created | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/216164) | Group, Project |
|
||||
| [`environment_unprotected`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108247) | A protected environment is unprotected | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/216164) | Group, Project |
|
||||
| [`project_feature_environments_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's environments access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369307) | Project |
|
||||
| [`protected_environment_approval_rule_added`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | An approval rule is added to a protected environment | {{< icon name="check-circle" >}} Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Group, Project |
|
||||
| [`protected_environment_approval_rule_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | An approval rule is removed from a protected environment | {{< icon name="check-circle" >}} Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Project, Group |
|
||||
| [`protected_environment_approval_rule_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | An approval rule of a protected environment is updated | {{< icon name="check-circle" >}} Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Project, Group |
|
||||
|
|
@ -311,6 +333,7 @@ Audit event types belong to the following product categories.
|
|||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_feature_flags_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's feature flags access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369306) | Project |
|
||||
| [`feature_flag_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113453) | A feature flag is created | {{< icon name="check-circle" >}} Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/374109) | Project |
|
||||
| [`feature_flag_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113453) | A feature flag is deleted | {{< icon name="check-circle" >}} Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/374109) | Project |
|
||||
| [`feature_flag_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113453) | A feature flag is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/374109) | Project |
|
||||
|
|
@ -355,58 +378,19 @@ Audit event types belong to the following product categories.
|
|||
| [`group_share_with_group_link_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112719) | You update a group's access settings to another group by using the group's membership page | {{< icon name="check-circle" >}} Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/327909) | Group |
|
||||
| [`group_shared_with_group_lock_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973/) | Group can be shared with other group setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`group_visibility_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106079) | A group's visibility level is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369322) | Group |
|
||||
| [`merge_commit_template_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107533) | Merge commit template is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369314) | Project |
|
||||
| [`new_user_signups_cap_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Number of users for user cap is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`prevent_forking_outside_group_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting for Prevent forking outside current group is changed | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`prevent_sharing_groups_outside_hierarchy_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | A group's setting to Members cannot invite groups outside of group and its subgroup updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`project_cicd_merge_pipelines_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107428) | The CI/CD merge pipelines setting for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369317) | Project |
|
||||
| [`project_cicd_merge_trains_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107428) | The CI/CD merge trains settings for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369317) | Project |
|
||||
| [`project_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117543) | A project is created | {{< icon name="check-circle" >}} Yes | GitLab [16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`project_default_branch_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117543) | Default branch of a project's repository is updated | {{< icon name="check-circle" >}} Yes | GitLab [16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`project_description_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128978) | A project's description is updated | {{< icon name="dotted-circle" >}} No | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/377769) | Project |
|
||||
| [`project_disable_overriding_approvers_per_merge_request_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | The disable overriding approvers per MR setting for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_feature_analytics_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's analytics access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369299) | Project |
|
||||
| [`project_feature_builds_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's builds access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369294) | Project |
|
||||
| [`project_feature_container_registry_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's container registry access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369303) | Project |
|
||||
| [`project_feature_environments_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's environments access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369307) | Project |
|
||||
| [`project_feature_feature_flags_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's feature flags access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369306) | Project |
|
||||
| [`project_feature_forking_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's feature forking access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369290) | Project |
|
||||
| [`project_feature_infrastructure_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's infrastructure access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369305) | Project |
|
||||
| [`project_feature_issues_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's issues access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369289) | Project |
|
||||
| [`project_feature_merge_requests_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's merge request access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369289) | Project |
|
||||
| [`project_feature_metrics_dashboard_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's metrics dashboard access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369289) | Project |
|
||||
| [`project_feature_monitor_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's monitor access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369304) | Project |
|
||||
| [`project_feature_operations_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's operation access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369300) | Project |
|
||||
| [`project_feature_package_registry_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's package registry access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369296) | Project |
|
||||
| [`project_feature_pages_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's page access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369297) | Project |
|
||||
| [`project_feature_releases_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's releases access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369308) | Project |
|
||||
| [`project_feature_repository_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's repository access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369295) | Project |
|
||||
| [`project_feature_requirements_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's requirements access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369301) | Project |
|
||||
| [`project_feature_security_and_compliance_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's security and compliance access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369302) | Project |
|
||||
| [`project_feature_snippets_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's snippet access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369293) | Project |
|
||||
| [`project_feature_wiki_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's wiki access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369292) | Project |
|
||||
| [`project_merge_method_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83922) | A project's merge request method is updated | {{< icon name="check-circle" >}} Yes | GitLab [14.10](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) | Project |
|
||||
| [`project_merge_requests_author_approval_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's MR author approval setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_merge_requests_disable_committers_approval_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's setting for disabling committers approval on merge requests is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369277) | Project |
|
||||
| [`project_name_updated`](https://gitlab.com/gitlab-org/gitlab/-/commit/8c0b52247e717cf84bc7b248d817f8baa55b18a4) | A project has its name updated | {{< icon name="check-circle" >}} Yes | GitLab [10.2](https://gitlab.com/gitlab-org/gitlab/-/commit/8c0b52247e717cf84bc7b248d817f8baa55b18a4) | Project |
|
||||
| [`project_namespace_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's namespace is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_only_allow_merge_if_all_discussions_are_resolved_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's setting for allowing merge only when all discussions are resolved is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369286) | Project |
|
||||
| [`project_only_allow_merge_if_pipeline_succeeds_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's only allow merge if pipeline succeeds setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_packages_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7962) | The setting that controls packages for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [11.5](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_path_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/100770) | A project's path is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.5](https://gitlab.com/gitlab-org/gitlab/-/issues/369271) | Project |
|
||||
| [`project_printing_merge_request_link_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | The setting for projects for enabling printing merge request link is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369283) | Project |
|
||||
| [`project_repository_size_limit_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | The repository size limit of a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369274) | Project |
|
||||
| [`project_require_password_to_approve_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's setting for requiring a user's password for approval of merge request is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369280) | Project |
|
||||
| [`project_resolve_outdated_diff_discussions_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's resolve outdated diff discussions setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_security_setting_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150767) | A project's security setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.0](https://gitlab.com/gitlab-org/gitlab/-/issues/457024) | Project |
|
||||
| [`project_topics_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154158) | A project's topics assignments are changed | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/343204) | Project |
|
||||
| [`project_unarchived`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117528) | A project is unarchived | {{< icon name="check-circle" >}} Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`project_visibility_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | A project's visibility level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`remove_dormant_members_period_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Days of inactivity before removal is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`remove_dormant_members_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Dormant members is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`seat_control_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Seat control is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`service_access_tokens_expiration_enforced_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Service account token expiration is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`show_diff_preview_in_email_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Email notification to include diff preview is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group, Project |
|
||||
| [`squash_commit_template_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107533) | The merge request squash commit template for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369314) | Project |
|
||||
| [`squash_option_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84624) | Squash option setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) | Project |
|
||||
|
||||
### Importers
|
||||
|
||||
|
|
@ -423,6 +407,12 @@ Audit event types belong to the following product categories.
|
|||
| [`incident_created_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | An incident is created using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`incident_reopened_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | An incident is reopened using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
|
||||
### Merge trains
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_cicd_merge_trains_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107428) | The CI/CD merge trains settings for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369317) | Project |
|
||||
|
||||
### MLOps
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|
|
@ -440,12 +430,26 @@ Audit event types belong to the following product categories.
|
|||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`experiment_features_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118222) | Enabling experiment AI features setting is toggled | {{< icon name="check-circle" >}} Yes | GitLab [16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/404856/) | Group |
|
||||
|
||||
### Observability
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_monitor_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's monitor access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369304) | Project |
|
||||
|
||||
### Package registry
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`package_registry_package_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/178181) | A package was deleted from GitLab package registry. Available only when the feature flag `package_registry_audit_events` is enabled and the namespace's package setting `audit_events_enabled` is true. | {{< icon name="check-circle" >}} Yes | GitLab [17.10](https://gitlab.com/gitlab-org/gitlab/-/issues/329588) | Project, Group |
|
||||
| [`package_registry_package_published`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/178181) | A package was published to GitLab package registry. Available only when the feature flag `package_registry_audit_events` is enabled and the namespace's package setting `audit_events_enabled` is true. | {{< icon name="check-circle" >}} Yes | GitLab [17.9](https://gitlab.com/gitlab-org/gitlab/-/issues/329588) | Project, Group |
|
||||
| [`project_feature_package_registry_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's package registry access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369296) | Project |
|
||||
| [`project_packages_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/7962) | The setting that controls packages for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [11.5](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
|
||||
### Pages
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_pages_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's page access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369297) | Project |
|
||||
|
||||
### Permissions
|
||||
|
||||
|
|
@ -492,6 +496,12 @@ Audit event types belong to the following product categories.
|
|||
| [`runner_registration_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Runner registration is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`set_runner_associated_projects`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/97666) | Associated projects are successfully assigned to a CI/CD runner | {{< icon name="check-circle" >}} Yes | GitLab [15.4](https://gitlab.com/gitlab-org/gitlab/-/issues/359958) | Project |
|
||||
|
||||
### Seat cost management
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`seat_control_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Seat control is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
|
||||
### Secret detection
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|
|
@ -501,6 +511,7 @@ Audit event types belong to the following product categories.
|
|||
| [`project_security_exclusion_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166511) | A project security exclusion is created | {{< icon name="check-circle" >}} Yes | GitLab [17.5](https://gitlab.com/gitlab-org/gitlab/-/issues/492464) | Project |
|
||||
| [`project_security_exclusion_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166511) | A project security exclusion is deleted | {{< icon name="check-circle" >}} Yes | GitLab [17.5](https://gitlab.com/gitlab-org/gitlab/-/issues/492464) | Project |
|
||||
| [`project_security_exclusion_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166511) | A project security exclusion is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.5](https://gitlab.com/gitlab-org/gitlab/-/issues/492464) | Project |
|
||||
| [`project_security_setting_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150767) | A project's security setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.0](https://gitlab.com/gitlab-org/gitlab/-/issues/457024) | Project |
|
||||
| [`skip_secret_push_protection`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/147855) | Secret push protection is skipped by the user | {{< icon name="check-circle" >}} Yes | GitLab [16.11](https://gitlab.com/gitlab-org/gitlab/-/issues/441185) | Project |
|
||||
|
||||
### Secrets management
|
||||
|
|
@ -545,17 +556,30 @@ Audit event types belong to the following product categories.
|
|||
| [`group_push_rules_reject_non_dco_commits_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86046) | A group's push rule setting is updated for reject non DCO certified commits | {{< icon name="check-circle" >}} Yes | GitLab [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/227629) | Group |
|
||||
| [`group_push_rules_reject_unsigned_commits_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86046) | A group push's rule setting is updated for reject unsigned commits | {{< icon name="check-circle" >}} Yes | GitLab [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/227629) | Group |
|
||||
| [`group_repository_size_limit_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106079) | A group's repository size limit is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369322) | Group |
|
||||
| [`merge_commit_template_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107533) | Merge commit template is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369314) | Project |
|
||||
| [`merged_merge_request_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118793) | A merged merge request is deleted | {{< icon name="dotted-circle" >}} No | GitLab [16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/408288) | Project |
|
||||
| [`merged_merge_request_deletion_started`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118793) | A merged merge request's deletion is started | {{< icon name="dotted-circle" >}} No | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/408288) | Project |
|
||||
| [`prevent_forking_outside_group_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting for Prevent forking outside current group is changed | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`project_default_branch_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117543) | Default branch of a project's repository is updated | {{< icon name="check-circle" >}} Yes | GitLab [16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
|
||||
| [`project_disable_overriding_approvers_per_merge_request_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | The disable overriding approvers per MR setting for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369288) | Project |
|
||||
| [`project_feature_builds_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's builds access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369294) | Project |
|
||||
| [`project_feature_forking_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's feature forking access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369290) | Project |
|
||||
| [`project_feature_merge_requests_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's merge request access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369289) | Project |
|
||||
| [`project_feature_repository_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's repository access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369295) | Project |
|
||||
| [`project_feature_snippets_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's snippet access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369293) | Project |
|
||||
| [`project_fork_operation`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90916) | A project is forked | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90916) | Project |
|
||||
| [`project_fork_relationship_removed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101017) | A project's fork relationship is successfully removed | {{< icon name="check-circle" >}} Yes | GitLab [15.6](https://gitlab.com/gitlab-org/gitlab/-/issues/272532) | Project |
|
||||
| [`project_printing_merge_request_link_enabled_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | The setting for projects for enabling printing merge request link is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369283) | Project |
|
||||
| [`project_push_rules_commit_committer_check_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132157) | A project's push rule setting for reject unverified users is updated | {{< icon name="check-circle" >}} Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/268116) | Project |
|
||||
| [`project_repository_size_limit_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106652) | The repository size limit of a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369274) | Project |
|
||||
| [`protected_branch_code_owner_approval_required_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107530) | The protected branch code owner approval required setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369318) | Project |
|
||||
| [`protected_branch_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92074) | A protected branch is created | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363091) | Project |
|
||||
| [`protected_branch_removed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92074) | A protected branch is removed | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363091) | Project |
|
||||
| [`protected_branch_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107530) | The setting for protected branches is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369318) | Project |
|
||||
| [`repository_git_operation`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76719) | Authenticated users push, pull, or clone a project using SSH, HTTP(S), or the UI | {{< icon name="dotted-circle" >}} No | GitLab [14.9](https://gitlab.com/gitlab-org/gitlab/-/issues/373950) | Project |
|
||||
| [`require_reauthentication_to_approve_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150710) | The setting for requiring reauthentication for merge request approvals is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.1](https://gitlab.com/gitlab-org/gitlab/-/issues/431346) | Group, Project |
|
||||
| [`squash_commit_template_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/107533) | The merge request squash commit template for a project is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.8](https://gitlab.com/gitlab-org/gitlab/-/issues/369314) | Project |
|
||||
| [`squash_option_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84624) | Squash option setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/301124) | Project |
|
||||
| [`manually_trigger_housekeeping`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112095) | Manually triggering housekeeping via API or admin UI | {{< icon name="check-circle" >}} Yes | GitLab [15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/390761) | Project |
|
||||
| [`project_blobs_removal`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152522) | Removing blobs by using the GraphQL API or project settings UI | {{< icon name="check-circle" >}} Yes | GitLab [17.0](https://gitlab.com/gitlab-org/gitlab/-/issues/450701) | Project |
|
||||
| [`project_text_replacement`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152522) | Replacing text by using the GraphQL API or project settings UI | {{< icon name="check-circle" >}} Yes | GitLab [17.1](https://gitlab.com/gitlab-org/gitlab/-/issues/450701) | Project |
|
||||
|
|
@ -580,11 +604,13 @@ Audit event types belong to the following product categories.
|
|||
| [`login_failed_with_otp_authentication`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129595) | Sign-in fails because of an incorrect OTP | {{< icon name="check-circle" >}} Yes | GitLab [16.4](https://gitlab.com/gitlab-org/gitlab/-/issues/377758) | User |
|
||||
| [`login_failed_with_standard_authentication`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129595) | Sign-in to GitLab fails with standard authentication, such as password | {{< icon name="check-circle" >}} Yes | GitLab [16.4](https://gitlab.com/gitlab-org/gitlab/-/issues/377758) | Instance |
|
||||
| [`login_failed_with_webauthn_authentication`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129595) | Sign-in fails when using a WebAuthn device | {{< icon name="check-circle" >}} Yes | GitLab [16.4](https://gitlab.com/gitlab-org/gitlab/-/issues/377758) | User |
|
||||
| [`new_user_signups_cap_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Number of users for user cap is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`project_access_token_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92225) | A project access token is created | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363087) | Project |
|
||||
| [`project_access_token_creation_failed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92225) | Creating a project access token fails | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363087) | Project |
|
||||
| [`project_access_token_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92225) | A project access token is deleted | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363087) | Project |
|
||||
| [`project_access_token_deletion_failed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92225) | Deleting a project access token fails | {{< icon name="check-circle" >}} Yes | GitLab [15.2](https://gitlab.com/gitlab-org/gitlab/-/issues/363087) | Project |
|
||||
| [`resource_access_token_creation_allowed_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting for Users can create project access tokens and group access tokens in this group is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group, Project |
|
||||
| [`service_access_tokens_expiration_enforced_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/164973) | Setting Service account token expiration is updated | {{< icon name="check-circle" >}} Yes | GitLab [17.4](https://gitlab.com/gitlab-org/gitlab/-/issues/486532) | Group |
|
||||
| [`update_mismatched_group_saml_extern_uid`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104791) | The external UID is changed on a SAML identity | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/382256) | User |
|
||||
| [`user_access_locked`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124169) | User access to the instance is locked | {{< icon name="check-circle" >}} Yes | GitLab [16.2](https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/244) | User |
|
||||
| [`user_access_unlocked`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124973) | User access to the instance is unlocked | {{< icon name="check-circle" >}} Yes | GitLab [16.2](https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/244) | User |
|
||||
|
|
@ -601,6 +627,7 @@ Audit event types belong to the following product categories.
|
|||
| [`issue_closed_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | An issue is closed using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`issue_created_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | An issue is created using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`issue_reopened_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | An issue is reopened using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`project_feature_issues_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's issues access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369289) | Project |
|
||||
| [`task_closed_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | A task is closed using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`task_created_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | A task is created using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
| [`task_reopened_by_project_bot`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121485) | A task is reopened using a project access token | {{< icon name="check-circle" >}} Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/323299) | Project |
|
||||
|
|
@ -641,6 +668,12 @@ Audit event types belong to the following product categories.
|
|||
| [`user_profile_visiblity_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129149) | User toggles private profile user setting | {{< icon name="dotted-circle" >}} No | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/129149) | User |
|
||||
| [`user_username_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106086) | A user's username is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369329) | User |
|
||||
|
||||
### Value stream management
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_analytics_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's analytics access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369299) | Project |
|
||||
|
||||
### Verify security
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|
|
@ -652,9 +685,21 @@ Audit event types belong to the following product categories.
|
|||
| [`secure_ci_job_token_project_added`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115350) | Project added to inbound CI_JOB_TOKEN scope | {{< icon name="check-circle" >}} Yes | GitLab [16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/338255) | Project |
|
||||
| [`secure_ci_job_token_project_removed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115350) | Project removed from inbound CI_JOB_TOKEN scope | {{< icon name="check-circle" >}} Yes | GitLab [16.0](https://gitlab.com/gitlab-org/gitlab/-/issues/338255) | Project |
|
||||
|
||||
### Vulnerability management
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_infrastructure_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's infrastructure access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369305) | Project |
|
||||
|
||||
### Webhooks
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`webhook_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154046) | A webhook is created | {{< icon name="check-circle" >}} Yes | GitLab [17.1](https://gitlab.com/gitlab-org/gitlab/-/issues/8068) | Project, Group, Instance |
|
||||
| [`webhook_destroyed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102342) | A webhook is destroyed | {{< icon name="check-circle" >}} Yes | GitLab [17.0](https://gitlab.com/gitlab-org/gitlab/-/issues/458817) | Project, Group, Instance |
|
||||
|
||||
### Wiki
|
||||
|
||||
| Type name | Event triggered when | Saved to database | Introduced in | Scope |
|
||||
|:----------|:---------------------|:------------------|:--------------|:------|
|
||||
| [`project_feature_wiki_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/106919) | A project's wiki access level setting is updated | {{< icon name="check-circle" >}} Yes | GitLab [15.7](https://gitlab.com/gitlab-org/gitlab/-/issues/369292) | Project |
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
variables:
|
||||
DAST_AUTO_DEPLOY_IMAGE_VERSION: 'v2.118.0'
|
||||
DAST_AUTO_DEPLOY_IMAGE_VERSION: 'v2.124.0'
|
||||
|
||||
.dast-auto-deploy:
|
||||
image: "${CI_TEMPLATE_REGISTRY_HOST}/gitlab-org/cluster-integration/auto-deploy-image:${DAST_AUTO_DEPLOY_IMAGE_VERSION}"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
variables:
|
||||
AUTO_DEPLOY_IMAGE_VERSION: 'v2.118.0'
|
||||
AUTO_DEPLOY_IMAGE_VERSION: 'v2.124.0'
|
||||
|
||||
.auto-deploy:
|
||||
image: "${CI_TEMPLATE_REGISTRY_HOST}/gitlab-org/cluster-integration/auto-deploy-image:${AUTO_DEPLOY_IMAGE_VERSION}"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
variables:
|
||||
AUTO_DEPLOY_IMAGE_VERSION: 'v2.118.0'
|
||||
AUTO_DEPLOY_IMAGE_VERSION: 'v2.124.0'
|
||||
|
||||
.auto-deploy:
|
||||
image: "${CI_TEMPLATE_REGISTRY_HOST}/gitlab-org/cluster-integration/auto-deploy-image:${AUTO_DEPLOY_IMAGE_VERSION}"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ module Gitlab
|
|||
class Blame
|
||||
include Gitlab::EncodingHelper
|
||||
|
||||
IgnoreRevsFormatError = Class.new(StandardError)
|
||||
IgnoreRevsFileError = Class.new(StandardError)
|
||||
|
||||
attr_reader :lines, :blames, :range
|
||||
|
||||
def initialize(repository, sha, path, range: nil)
|
||||
|
|
|
|||
|
|
@ -420,6 +420,10 @@ module Gitlab
|
|||
case detailed_error.try(:error)
|
||||
when :out_of_range, :path_not_found
|
||||
raise ArgumentError, e.details
|
||||
when :invalid_ignore_revs_format
|
||||
raise Gitlab::Git::Blame::IgnoreRevsFormatError, e.details
|
||||
when :resolve_ignore_revs
|
||||
raise Gitlab::Git::Blame::IgnoreRevsFileError, e.details
|
||||
else
|
||||
raise e
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28835,6 +28835,9 @@ msgstr ""
|
|||
msgid "Groups|Save changes"
|
||||
msgstr ""
|
||||
|
||||
msgid "Groups|Show children of %{avatarLabel}"
|
||||
msgstr ""
|
||||
|
||||
msgid "Groups|Subgroup URL"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
import { DiffFile } from '~/rapid_diffs/diff_file';
|
||||
import { OptionsMenuAdapter } from '~/rapid_diffs/options_menu/adapter';
|
||||
|
||||
describe('Diff File Options Menu', () => {
|
||||
const html = `
|
||||
<diff-file data-viewer="any">
|
||||
<div class="rd-diff-file">
|
||||
<div class="rd-diff-file-header" data-testid="rd-diff-file-header">
|
||||
<div class="rd-diff-file-options-menu gl-ml-2">
|
||||
<div class="js-options-menu">
|
||||
<button class="js-options-button" data-click="toggleOptionsMenu" type="button"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div data-file-body=""><!-- body content --></div>
|
||||
<diff-file-mounted></diff-file-mounted>
|
||||
</diff-file>
|
||||
`;
|
||||
|
||||
function get(element) {
|
||||
const elements = {
|
||||
file: () => document.querySelector('diff-file'),
|
||||
container: () => get('file').querySelector('.js-options-menu'),
|
||||
serverButton: () => get('container').querySelector('.js-options-button'),
|
||||
vueButton: () => get('container').querySelector('[data-testid="base-dropdown-toggle"]'),
|
||||
};
|
||||
|
||||
return elements[element]?.();
|
||||
}
|
||||
|
||||
function assignAdapter(customAdapter) {
|
||||
get('file').adapterConfig = { any: [customAdapter] };
|
||||
}
|
||||
|
||||
beforeAll(() => {
|
||||
customElements.define('diff-file', DiffFile);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
document.body.innerHTML = html;
|
||||
assignAdapter(OptionsMenuAdapter);
|
||||
get('file').mount();
|
||||
});
|
||||
|
||||
it('starts with the server-rendered button', () => {
|
||||
expect(get('serverButton')).not.toBeNull();
|
||||
});
|
||||
|
||||
it('replaces the server-rendered button with a Vue GlDisclosureDropdown when the button is clicked', () => {
|
||||
const button = get('serverButton');
|
||||
|
||||
expect(get('vueButton')).toBeNull();
|
||||
expect(button).not.toBeNull();
|
||||
|
||||
button.click();
|
||||
|
||||
expect(get('vueButton')).not.toBeNull();
|
||||
/*
|
||||
* This button being replaced also means this replacement can only
|
||||
* happen once (desireable!), so testing that it's no longer present is good
|
||||
*/
|
||||
expect(get('serverButton')).toBeNull();
|
||||
});
|
||||
});
|
||||
|
|
@ -33,7 +33,8 @@ describe('GroupsListItem', () => {
|
|||
GlTooltip: createMockDirective('gl-tooltip'),
|
||||
},
|
||||
scopedSlots: {
|
||||
'nested-items': '<div data-testid="nested-items"></div>',
|
||||
'children-toggle': '<div data-testid="children-toggle"></div>',
|
||||
children: '<div data-testid="children"></div>',
|
||||
},
|
||||
});
|
||||
};
|
||||
|
|
@ -391,9 +392,15 @@ describe('GroupsListItem', () => {
|
|||
expect(wrapper.element.firstChild.classList).toContain('foo');
|
||||
});
|
||||
|
||||
it('renders nested-items slot', () => {
|
||||
it('renders children-toggle slot', () => {
|
||||
createComponent();
|
||||
|
||||
expect(wrapper.findByTestId('nested-items').exists()).toBe(true);
|
||||
expect(wrapper.findByTestId('children-toggle').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('renders children slot', () => {
|
||||
createComponent();
|
||||
|
||||
expect(wrapper.findByTestId('children').exists()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { GlButton } from '@gitlab/ui';
|
||||
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
|
||||
import NestedGroupsProjectsList from '~/vue_shared/components/nested_groups_projects_list/nested_groups_projects_list.vue';
|
||||
import NestedGroupsProjectsListItem from '~/vue_shared/components/nested_groups_projects_list/nested_groups_projects_list_item.vue';
|
||||
|
|
@ -22,6 +23,9 @@ describe('NestedGroupsProjectsListItem', () => {
|
|||
});
|
||||
};
|
||||
|
||||
const findNestedGroupsProjectsList = () => wrapper.findComponent(NestedGroupsProjectsList);
|
||||
const findToggleButton = () => wrapper.findComponent(GlButton);
|
||||
|
||||
describe('when item type is group', () => {
|
||||
it('renders GroupsListItem component with correct props', () => {
|
||||
createComponent();
|
||||
|
|
@ -29,6 +33,7 @@ describe('NestedGroupsProjectsListItem', () => {
|
|||
expect(wrapper.findComponent(GroupsListItem).props()).toMatchObject({
|
||||
showGroupIcon: true,
|
||||
group: subgroupA,
|
||||
listItemClass: null,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -37,9 +42,15 @@ describe('NestedGroupsProjectsListItem', () => {
|
|||
createComponent();
|
||||
});
|
||||
|
||||
it('renders NestedGroupsProjectsList component with correct props', () => {
|
||||
expect(wrapper.findComponent(NestedGroupsProjectsList).props()).toEqual({
|
||||
items: subgroupA.children,
|
||||
it('renders NestedGroupsProjectsList component', () => {
|
||||
expect(findNestedGroupsProjectsList().exists()).toBe(true);
|
||||
});
|
||||
|
||||
describe('when NestedGroupsProjectsList emits load-children event', () => {
|
||||
it('emits load-children event', () => {
|
||||
findNestedGroupsProjectsList().vm.$emit('load-children', 1);
|
||||
|
||||
expect(wrapper.emitted('load-children')).toEqual([[1]]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -54,7 +65,7 @@ describe('NestedGroupsProjectsListItem', () => {
|
|||
});
|
||||
|
||||
it('does not render NestedGroupsProjectsList component', () => {
|
||||
expect(wrapper.findComponent(NestedGroupsProjectsList).exists()).toBe(false);
|
||||
expect(findNestedGroupsProjectsList().exists()).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -68,6 +79,74 @@ describe('NestedGroupsProjectsListItem', () => {
|
|||
expect(wrapper.findComponent(ProjectsListItem).props()).toMatchObject({
|
||||
showProjectIcon: true,
|
||||
project: projectA,
|
||||
listItemClass: 'gl-pl-7',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when toggle is expanded', () => {
|
||||
describe('when children have not yet been loaded', () => {
|
||||
beforeEach(() => {
|
||||
createComponent();
|
||||
findToggleButton().vm.$emit('click');
|
||||
});
|
||||
|
||||
it('emits load-children event', () => {
|
||||
expect(wrapper.emitted('load-children')).toEqual([[subgroupA.id]]);
|
||||
});
|
||||
|
||||
describe('when children are loading', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
item: {
|
||||
...subgroupA,
|
||||
childrenLoading: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('sets loading prop to true', () => {
|
||||
expect(findToggleButton().props('loading')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('when children are loaded', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
item: {
|
||||
...subgroupA,
|
||||
children: subgroupA.childrenToLoad,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('passes children to NestedGroupsProjectsList component', () => {
|
||||
expect(findNestedGroupsProjectsList().props()).toEqual({
|
||||
items: subgroupA.childrenToLoad,
|
||||
});
|
||||
});
|
||||
|
||||
it('updates button icon to chevron-down', () => {
|
||||
expect(findToggleButton().props('icon')).toBe('chevron-down');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('when children have already been loaded', () => {
|
||||
beforeEach(() => {
|
||||
createComponent({
|
||||
propsData: {
|
||||
item: {
|
||||
...subgroupA,
|
||||
children: subgroupA.childrenToLoad,
|
||||
},
|
||||
},
|
||||
});
|
||||
findToggleButton().vm.$emit('click');
|
||||
});
|
||||
|
||||
it('does not emit load-children event', () => {
|
||||
expect(wrapper.emitted('load-children')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -28,4 +28,14 @@ describe('NestedGroupsProjectsList', () => {
|
|||
})),
|
||||
);
|
||||
});
|
||||
|
||||
describe('when `NestedGroupsProjectsListItem emits load-children event', () => {
|
||||
it('emits load-children event', () => {
|
||||
createComponent();
|
||||
|
||||
wrapper.findComponent(NestedGroupsProjectsListItem).vm.$emit('load-children', 1);
|
||||
|
||||
expect(wrapper.emitted('load-children')).toEqual([[1]]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ describe('ListItem', () => {
|
|||
'avatar-meta': '<div data-testid="avatar-meta"></div>',
|
||||
stats: '<div data-testid="stats"></div>',
|
||||
footer: '<div data-testid="footer"></div>',
|
||||
'nested-items': '<div data-testid="nested-items"></div>',
|
||||
'children-toggle': '<div data-testid="children-toggle"></div>',
|
||||
children: '<div data-testid="children"></div>',
|
||||
...scopedSlots,
|
||||
},
|
||||
stubs,
|
||||
|
|
@ -84,10 +85,16 @@ describe('ListItem', () => {
|
|||
expect(wrapper.findByTestId('footer').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('renders nested-items slot', () => {
|
||||
it('renders children-toggle slot', () => {
|
||||
createComponent();
|
||||
|
||||
expect(wrapper.findByTestId('nested-items').exists()).toBe(true);
|
||||
expect(wrapper.findByTestId('children-toggle').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('renders children slot', () => {
|
||||
createComponent();
|
||||
|
||||
expect(wrapper.findByTestId('children').exists()).toBe(true);
|
||||
});
|
||||
|
||||
describe('when avatar-default slot is provided', () => {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,6 @@ describe('WorkItemActions component', () => {
|
|||
canCreateRelatedItem = true,
|
||||
workItemsBeta = true,
|
||||
parentId = null,
|
||||
workItemsAlpha = true,
|
||||
} = {}) => {
|
||||
wrapper = shallowMountExtended(WorkItemActions, {
|
||||
isLoggedIn: isLoggedIn(),
|
||||
|
|
@ -178,7 +177,6 @@ describe('WorkItemActions component', () => {
|
|||
glFeatures: {
|
||||
okrsMvc,
|
||||
workItemsBeta,
|
||||
workItemsAlpha,
|
||||
},
|
||||
hasOkrsFeature,
|
||||
},
|
||||
|
|
@ -716,7 +714,7 @@ describe('WorkItemActions component', () => {
|
|||
});
|
||||
|
||||
describe('move issue button', () => {
|
||||
it('shows move button when workItemType is issue and `moveWorkItem` is true', async () => {
|
||||
it('shows move button when workItemType is issue and `canMove` is true', async () => {
|
||||
createComponent({
|
||||
workItemType: WORK_ITEM_TYPE_VALUE_ISSUE,
|
||||
});
|
||||
|
|
@ -745,17 +743,6 @@ describe('WorkItemActions component', () => {
|
|||
expect(findMoveButton().exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('hides move button when `workItemsAlpha` is disabled', async () => {
|
||||
createComponent({
|
||||
workItemType: WORK_ITEM_TYPE_VALUE_ISSUE,
|
||||
workItemsAlpha: false,
|
||||
});
|
||||
|
||||
await waitForPromises();
|
||||
|
||||
expect(findMoveButton().exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('hides move button when workItemType is not issue', async () => {
|
||||
createComponent({
|
||||
workItemType: WORK_ITEM_TYPE_VALUE_TASK,
|
||||
|
|
|
|||
|
|
@ -1157,7 +1157,7 @@ RSpec.describe Gitlab::GitalyClient::CommitService, feature_category: :gitaly do
|
|||
shared_examples 'raises error with message' do |error_class, message|
|
||||
it "raises #{error_class} with correct message" do
|
||||
expect { blame }.to raise_error(error_class) do |error|
|
||||
expect(error.details).to eq(message)
|
||||
expect(error.message).to eq(message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1188,7 +1188,7 @@ RSpec.describe Gitlab::GitalyClient::CommitService, feature_category: :gitaly do
|
|||
let(:file_content) { 'invalid_content' }
|
||||
|
||||
include_examples 'raises error with message',
|
||||
GRPC::NotFound,
|
||||
Gitlab::Git::Blame::IgnoreRevsFormatError,
|
||||
'invalid object name'
|
||||
end
|
||||
end
|
||||
|
|
@ -1197,7 +1197,7 @@ RSpec.describe Gitlab::GitalyClient::CommitService, feature_category: :gitaly do
|
|||
let(:ignore_revisions_blob) { "refs/heads/invalid" }
|
||||
|
||||
include_examples 'raises error with message',
|
||||
GRPC::NotFound,
|
||||
Gitlab::Git::Blame::IgnoreRevsFileError,
|
||||
'cannot resolve ignore-revs blob'
|
||||
end
|
||||
|
||||
|
|
@ -1205,7 +1205,7 @@ RSpec.describe Gitlab::GitalyClient::CommitService, feature_category: :gitaly do
|
|||
let(:ignore_revisions_blob) { "refs/heads/#{revision}:files" }
|
||||
|
||||
include_examples 'raises error with message',
|
||||
GRPC::InvalidArgument,
|
||||
Gitlab::Git::Blame::IgnoreRevsFileError,
|
||||
'ignore revision is not a blob'
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -21,6 +21,13 @@ RSpec.describe WorkItems::DataSync::CloneService, feature_category: :team_planni
|
|||
)
|
||||
end
|
||||
|
||||
before_all do
|
||||
# Ensure support bot user is created so creation doesn't count towards query limit
|
||||
# and we don't try to obtain an exclusive lease within a transaction.
|
||||
# See https://gitlab.com/gitlab-org/gitlab/-/issues/509629
|
||||
Users::Internal.support_bot_id
|
||||
end
|
||||
|
||||
context 'when user does not have permissions' do
|
||||
context 'when user cannot read original work item' do
|
||||
let_it_be(:current_user) { target_project_member }
|
||||
|
|
|
|||
|
|
@ -21,6 +21,13 @@ RSpec.describe WorkItems::DataSync::MoveService, feature_category: :team_plannin
|
|||
)
|
||||
end
|
||||
|
||||
before_all do
|
||||
# Ensure support bot user is created so creation doesn't count towards query limit
|
||||
# and we don't try to obtain an exclusive lease within a transaction.
|
||||
# See https://gitlab.com/gitlab-org/gitlab/-/issues/509629
|
||||
Users::Internal.support_bot_id
|
||||
end
|
||||
|
||||
context 'when user does not have permissions' do
|
||||
context 'when user cannot read original work item' do
|
||||
let_it_be(:current_user) { target_project_member }
|
||||
|
|
@ -85,16 +92,48 @@ RSpec.describe WorkItems::DataSync::MoveService, feature_category: :team_plannin
|
|||
it_behaves_like 'fails to transfer work item', 'Cannot move work items of \'Task\' type'
|
||||
end
|
||||
|
||||
context 'when moving work item raises an error' do
|
||||
context 'when moving work item raises an error', :aggregate_failures do
|
||||
let(:error_message) { 'Something went wrong' }
|
||||
|
||||
before do
|
||||
allow_next_instance_of(::WorkItems::DataSync::BaseCreateService) do |create_service|
|
||||
allow(create_service).to receive(:execute).and_return(ServiceResponse.error(message: error_message))
|
||||
context 'when create service raises error' do
|
||||
before do
|
||||
allow_next_instance_of(::WorkItems::DataSync::BaseCreateService) do |create_service|
|
||||
allow(create_service).to receive(:execute).and_return(ServiceResponse.error(message: error_message))
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'fails to transfer work item', 'Something went wrong'
|
||||
end
|
||||
|
||||
context 'when a widget that is handled within transaction raises error' do
|
||||
before do
|
||||
allow_next_instance_of(::WorkItems::DataSync::Widgets::Notes) do |create_service|
|
||||
allow(create_service).to receive(:after_create).and_raise(error_message)
|
||||
end
|
||||
end
|
||||
|
||||
it 'raises error and does not move work item' do
|
||||
expect { service.execute }.to raise_error('Something went wrong').and(not_change { WorkItem.count }).and(
|
||||
not_change { Note.where(system: true).count })
|
||||
expect(original_work_item.state).to eq('opened')
|
||||
expect(original_work_item.moved_to).to be_nil
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'fails to transfer work item', 'Something went wrong'
|
||||
context 'when a widget that is handled outside transaction raises error' do
|
||||
before do
|
||||
allow_next_instance_of(::WorkItems::DataSync::Widgets::Designs) do |create_service|
|
||||
allow(create_service).to receive(:after_save_commit).and_raise(error_message)
|
||||
end
|
||||
end
|
||||
|
||||
it 'raises error and does not move work item' do
|
||||
expect { service.execute }.to raise_error('Something went wrong').and(
|
||||
change { WorkItem.count }.from(1).to(2)).and(change { Note.where(system: true).count }.by(2))
|
||||
expect(original_work_item.state).to eq('closed')
|
||||
expect(original_work_item.moved_to).not_to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when moving work item with success', :freeze_time do
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe WorkItems::DataSync::Widgets::Hierarchy, feature_category: :team_planning do
|
||||
let_it_be(:support_bot) { Users::Internal.support_bot }
|
||||
let_it_be(:current_user) { create(:user) }
|
||||
|
||||
let(:params) { { operation: :move } }
|
||||
|
|
|
|||
Loading…
Reference in New Issue