Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
ca4942bdc4
commit
548e0932fd
|
|
@ -264,7 +264,7 @@ export default {
|
|||
</script>
|
||||
<template>
|
||||
<content-editor-provider :content-editor="contentEditor">
|
||||
<div class="md-area gl-relative gl-overflow-hidden">
|
||||
<div class="md-area gl-relative">
|
||||
<gl-loading-icon
|
||||
v-if="isLoading"
|
||||
size="lg"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { GlAlert, GlSkeletonLoader } from '@gitlab/ui';
|
|||
import * as Sentry from '~/sentry/sentry_browser_wrapper';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import SafeHtml from '~/vue_shared/directives/safe_html';
|
||||
import VisibilityChangeDetector from './visibility_change_detector.vue';
|
||||
|
||||
const MAX_EVENTS = 10;
|
||||
|
||||
|
|
@ -10,6 +11,7 @@ export default {
|
|||
components: {
|
||||
GlAlert,
|
||||
GlSkeletonLoader,
|
||||
VisibilityChangeDetector,
|
||||
},
|
||||
directives: {
|
||||
SafeHtml,
|
||||
|
|
@ -21,24 +23,31 @@ export default {
|
|||
hasError: false,
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
try {
|
||||
const { data } = await axios.get(
|
||||
`/users/${encodeURIComponent(gon.current_username)}/activity?limit=${MAX_EVENTS}`,
|
||||
);
|
||||
this.activityFeedHtml = data.html;
|
||||
} catch (e) {
|
||||
Sentry.captureException(e);
|
||||
this.hasError = true;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
}
|
||||
created() {
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload() {
|
||||
this.isLoading = true;
|
||||
|
||||
try {
|
||||
const { data } = await axios.get(
|
||||
`/users/${encodeURIComponent(gon.current_username)}/activity?limit=${MAX_EVENTS}`,
|
||||
);
|
||||
this.activityFeedHtml = data.html;
|
||||
} catch (e) {
|
||||
Sentry.captureException(e);
|
||||
this.hasError = true;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<visibility-change-detector @visible="reload">
|
||||
<h4>{{ __('Activity') }}</h4>
|
||||
<gl-skeleton-loader v-if="isLoading" :width="200">
|
||||
<rect width="5" height="3" rx="1" y="2" />
|
||||
|
|
@ -64,5 +73,5 @@ export default {
|
|||
data-testid="events-list"
|
||||
class="gl-list-none gl-p-0"
|
||||
></ul>
|
||||
</div>
|
||||
</visibility-change-detector>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -3,11 +3,12 @@ import { GlButton, GlIcon, GlSkeletonLoader } from '@gitlab/ui';
|
|||
import * as Sentry from '~/sentry/sentry_browser_wrapper';
|
||||
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
|
||||
import RecentlyViewedItemsQuery from '../graphql/queries/recently_viewed_items.query.graphql';
|
||||
import VisibilityChangeDetector from './visibility_change_detector.vue';
|
||||
|
||||
const MAX_ITEMS = 10;
|
||||
|
||||
export default {
|
||||
components: { GlButton, GlIcon, GlSkeletonLoader, TooltipOnTruncate },
|
||||
components: { GlButton, GlIcon, GlSkeletonLoader, VisibilityChangeDetector, TooltipOnTruncate },
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
|
|
@ -51,7 +52,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<visibility-change-detector @visible="reload">
|
||||
<h4>{{ __('Recently viewed') }}</h4>
|
||||
|
||||
<div v-if="error">
|
||||
|
|
@ -72,7 +73,7 @@ export default {
|
|||
<li v-for="item in items" :key="item.id">
|
||||
<a
|
||||
:href="item.webUrl"
|
||||
class="gl-flex gl-items-center gl-gap-2 gl-rounded-small gl-text-default hover:gl-bg-subtle hover:gl-text-default hover:gl-no-underline"
|
||||
class="gl-flex gl-items-center gl-gap-2 gl-rounded-small gl-p-1 gl-text-default hover:gl-bg-subtle hover:gl-text-default hover:gl-no-underline"
|
||||
>
|
||||
<gl-icon :name="item.icon" class="gl-shrink-0" />
|
||||
<tooltip-on-truncate
|
||||
|
|
@ -84,5 +85,5 @@ export default {
|
|||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</visibility-change-detector>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { computed } from 'vue';
|
||||
import { GlButton, GlCollapsibleListbox, GlTooltipDirective } from '@gitlab/ui';
|
||||
import { GlCollapsibleListbox, GlTooltipDirective, GlSkeletonLoader } from '@gitlab/ui';
|
||||
import emptyTodosAllDoneSvg from '@gitlab/svgs/dist/illustrations/status/status-success-sm.svg';
|
||||
import emptyTodosFilteredSvg from '@gitlab/svgs/dist/illustrations/search-sm.svg';
|
||||
import { s__ } from '~/locale';
|
||||
|
|
@ -16,6 +16,7 @@ import {
|
|||
import TodoItem from '~/todos/components/todo_item.vue';
|
||||
import getTodosQuery from '~/todos/components/queries/get_todos.query.graphql';
|
||||
import * as Sentry from '~/sentry/sentry_browser_wrapper';
|
||||
import VisibilityChangeDetector from './visibility_change_detector.vue';
|
||||
|
||||
const N_TODOS = 5;
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ const FILTER_OPTIONS = [
|
|||
];
|
||||
|
||||
export default {
|
||||
components: { TodoItem, GlButton, GlCollapsibleListbox },
|
||||
components: { TodoItem, GlCollapsibleListbox, GlSkeletonLoader, VisibilityChangeDetector },
|
||||
directives: {
|
||||
GlTooltip: GlTooltipDirective,
|
||||
},
|
||||
|
|
@ -63,6 +64,7 @@ export default {
|
|||
currentUserId: null,
|
||||
filter: null,
|
||||
todos: [],
|
||||
showLoading: true,
|
||||
};
|
||||
},
|
||||
apollo: {
|
||||
|
|
@ -77,14 +79,23 @@ export default {
|
|||
},
|
||||
update({ currentUser: { id, todos: { nodes = [] } } = {} }) {
|
||||
this.currentUserId = id;
|
||||
this.showLoading = false;
|
||||
|
||||
return nodes;
|
||||
},
|
||||
error(error) {
|
||||
Sentry.captureException(error);
|
||||
this.showLoading = false;
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
reload() {
|
||||
this.showLoading = true;
|
||||
this.$apollo.queries.todos.refetch();
|
||||
},
|
||||
},
|
||||
|
||||
emptyTodosAllDoneSvg,
|
||||
emptyTodosFilteredSvg,
|
||||
FILTER_OPTIONS,
|
||||
|
|
@ -92,26 +103,23 @@ export default {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="gl-flex gl-items-center gl-justify-between gl-gap-2">
|
||||
<visibility-change-detector class="gl-border gl-rounded-lg gl-bg-subtle" @visible="reload">
|
||||
<div class="gl-flex gl-items-center gl-justify-between gl-gap-2 gl-px-5">
|
||||
<h4 class="gl-grow">{{ __('To-do items') }}</h4>
|
||||
|
||||
<gl-button
|
||||
v-gl-tooltip.hover
|
||||
icon="retry"
|
||||
:aria-label="__('Refresh')"
|
||||
:title="__('Refresh')"
|
||||
:loading="$apollo.queries.todos.loading"
|
||||
category="tertiary"
|
||||
size="small"
|
||||
@click="$apollo.queries.todos.refetch()"
|
||||
/>
|
||||
|
||||
<gl-collapsible-listbox v-model="filter" :items="$options.FILTER_OPTIONS" />
|
||||
</div>
|
||||
|
||||
<div v-if="showLoading && $apollo.queries.todos.loading" class="gl-p-4">
|
||||
<gl-skeleton-loader v-for="i in 5" :key="i" :width="200" :height="10">
|
||||
<rect x="0" y="0" width="16" height="8" rx="2" ry="2" />
|
||||
<rect x="24" y="0" width="174" height="8" rx="2" ry="2" />
|
||||
<rect x="182" y="0" width="16" height="8" rx="2" ry="2" />
|
||||
</gl-skeleton-loader>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="!$apollo.queries.todos.loading && !todos.length && !filter"
|
||||
v-else-if="!$apollo.queries.todos.loading && !todos.length && !filter"
|
||||
class="gl-flex gl-items-center gl-gap-5 gl-bg-subtle gl-p-4"
|
||||
>
|
||||
<img class="gl-h-11" aria-hidden="true" :src="$options.emptyTodosAllDoneSvg" />
|
||||
|
|
@ -134,9 +142,10 @@ export default {
|
|||
:todo="todo"
|
||||
@change="$apollo.queries.todos.refetch()"
|
||||
/>
|
||||
<div class="gl-p-3">
|
||||
<a href="/dashboard/todos">{{ __('All to-do items') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gl-px-5 gl-py-3">
|
||||
<a href="/dashboard/todos">{{ __('All to-do items') }}</a>
|
||||
</div>
|
||||
</visibility-change-detector>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<script>
|
||||
export default {
|
||||
name: 'VisibilityChangeDetector',
|
||||
mounted() {
|
||||
document.addEventListener('visibilitychange', this.handleVisibilityChanged);
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.removeEventListener('visibilitychange', this.handleVisibilityChanged);
|
||||
},
|
||||
methods: {
|
||||
handleVisibilityChanged() {
|
||||
if (!document.hidden) {
|
||||
this.$emit('visible');
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -118,11 +118,8 @@ export default {
|
|||
},
|
||||
|
||||
jumpToFirstUnresolvedDiscussion() {
|
||||
this.setCurrentDiscussionId(null)
|
||||
.then(() => {
|
||||
this.jumpToNextDiscussion();
|
||||
})
|
||||
.catch(() => {});
|
||||
this.setCurrentDiscussionId(null);
|
||||
this.jumpToNextDiscussion();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<!-- eslint-disable vue/multi-word-component-names -->
|
||||
<script>
|
||||
import { GlPopover, GlButton, GlTooltipDirective, GlFormInput } from '@gitlab/ui';
|
||||
import { GL_COLOR_ORANGE_50, GL_COLOR_ORANGE_200 } from '@gitlab/ui/src/tokens/build/js/tokens';
|
||||
import $ from 'jquery';
|
||||
import { escapeRegExp } from 'lodash';
|
||||
import {
|
||||
|
|
@ -28,8 +29,8 @@ import HeaderDivider from './header_divider.vue';
|
|||
|
||||
export default {
|
||||
findAndReplace: {
|
||||
highlightColor: '#fdf1dd',
|
||||
highlightColorActive: '#e6e4f2',
|
||||
highlightColor: GL_COLOR_ORANGE_50,
|
||||
highlightColorActive: GL_COLOR_ORANGE_200,
|
||||
highlightClass: 'js-highlight',
|
||||
highlightClassActive: 'js-highlight-active',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
.gl-dark & {
|
||||
width: calc(100% - 6px);
|
||||
margin: 2px 3px;
|
||||
padding-left: calc(#{$gl-spacing-scale-5} - 3px);
|
||||
}
|
||||
|
||||
|
|
@ -335,6 +334,11 @@
|
|||
// style in typography.scss
|
||||
.md > .ProseMirror {
|
||||
margin: 2px;
|
||||
|
||||
// stylelint-disable-next-line gitlab/no-gl-class
|
||||
.gl-dark & {
|
||||
margin: 2px 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.table-creator-grid-item {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ module RequiresAllowlistedMonitoringClient
|
|||
end
|
||||
|
||||
def ip_allowlist
|
||||
@ip_allowlist ||= Settings.monitoring.ip_whitelist.map { |ip| IPAddr.new(ip) }
|
||||
@ip_allowlist ||= compat_ip_allowlist
|
||||
end
|
||||
|
||||
def valid_token?
|
||||
|
|
@ -37,4 +37,15 @@ module RequiresAllowlistedMonitoringClient
|
|||
def render_404
|
||||
render "errors/not_found", layout: "errors", status: :not_found
|
||||
end
|
||||
|
||||
def compat_ip_allowlist
|
||||
base = Settings.monitoring.ip_whitelist.map { |ip| IPAddr.new(ip) }
|
||||
|
||||
# Add compatible addresses to match IPv4 allow list entries against IPv4 request IPs
|
||||
# that were mapped to IPv6 addresses on the kernel level.
|
||||
# https://docs.kernel.org/networking/ip-sysctl.html#proc-sys-net-ipv6-variables
|
||||
compats = base.select(&:ipv4?).map(&:ipv4_mapped)
|
||||
|
||||
base + compats
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
module TrackingHelper
|
||||
def tracking_attrs(label, action, property)
|
||||
return {} unless ::Gitlab::Tracking.enabled?
|
||||
|
||||
{
|
||||
data: {
|
||||
track_label: label,
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
.nothing-here-block
|
||||
%h5= _('Enter at least three characters to search')
|
||||
- else
|
||||
= render 'shared/projects/list', projects: projects, user: current_user, explore_page: true, pipeline_status: Feature.enabled?(:explore_pipeline_status, type: :ops), event_tracking: 'use_pagination_projects_explore'
|
||||
= render 'shared/projects/list', projects: projects, user: current_user, explore_page: true, pipeline_status: false, event_tracking: 'use_pagination_projects_explore'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
= cache([ActionController::Base.asset_host, user_application_color_mode, user_color_scheme, Gitlab::Tracking.enabled?, Gitlab::Tracking.collector_hostname], expires_in: 1.minute) do
|
||||
= cache([ActionController::Base.asset_host, user_application_color_mode, user_color_scheme, Gitlab::Tracking.collector_hostname], expires_in: 1.minute) do
|
||||
- css_crossorigin = ActionController::Base.asset_host ? 'anonymous' : nil
|
||||
|
||||
- if ActionController::Base.asset_host
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
- return unless Gitlab::Tracking.enabled?
|
||||
|
||||
- namespace = @group || @project&.namespace || @namespace
|
||||
= webpack_bundle_tag 'tracker'
|
||||
- if Gitlab.com?
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
name: use_primary_and_secondary_stores_for_trace_chunks
|
||||
description:
|
||||
feature_issue_url: https://gitlab.com/gitlab-com/gl-infra/data-access/durability/team/-/issues/219
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/196289
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/553057
|
||||
milestone: '18.2'
|
||||
group: group::durability
|
||||
type: gitlab_com_derisk
|
||||
default_enabled: false
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
name: use_primary_store_as_default_for_trace_chunks
|
||||
description:
|
||||
feature_issue_url: https://gitlab.com/gitlab-com/gl-infra/data-access/durability/team/-/issues/219
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/196289
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/553060
|
||||
milestone: '18.2'
|
||||
group: group::durability
|
||||
type: gitlab_com_derisk
|
||||
default_enabled: false
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: explore_pipeline_status
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51621
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/506025
|
||||
milestone: '13.8'
|
||||
type: ops
|
||||
group: group::source code
|
||||
default_enabled: false
|
||||
|
|
@ -501,7 +501,7 @@ curl --request DELETE \
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see the [guide how to migrate your existing APIs](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ title: Epic Issues API
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see [migrate epic APIs to work items](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ title: Epic Links API
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see [migrate epic APIs to work items](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ title: Epics API (deprecated)
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see [migrate epic APIs to work items](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -400,5 +400,5 @@ You can filter the results to return events from a specific target type. Possibl
|
|||
|
||||
Footnotes:
|
||||
|
||||
1. You must enable the [new look for epics](../user/group/epics/epic_work_items.md). Some epic features like child items, linked items, start dates, due dates, and health statuses are not returned by the API.
|
||||
1. Some epic features like child items, linked items, start dates, due dates, and health statuses are not returned by the API.
|
||||
1. Some merge request notes may instead use the `DiscussionNote` type. This target type is [not supported by the API](discussions.md#understand-note-types-in-the-api).
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@ title: Migrate epic APIs to work items
|
|||
|
||||
{{< history >}}
|
||||
|
||||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/9290) in GitLab 17.2 [with a flag](../../administration/feature_flags/_index.md) named `work_item_epics`. Disabled by default. [The new look for epics](../../user/group/epics/epic_work_items.md) must be enabled. This feature is in [beta](../../policy/development_stages_support.md#beta).
|
||||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/9290) in GitLab 17.2 [with a flag](../../administration/feature_flags/_index.md) named `work_item_epics`. Disabled by default. [The new look for epics](../../user/group/epics/_index.md#epics-as-work-items) must be enabled. Introduced in [beta](../../policy/development_stages_support.md#beta).
|
||||
- Listing epics using the [GraphQL API](reference/_index.md) [introduced](https://gitlab.com/groups/gitlab-org/-/epics/12852) in GitLab 17.4.
|
||||
- [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/470685) in GitLab 17.6.
|
||||
- [Enabled by default on GitLab Self-Managed and GitLab Dedicated](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 17.7.
|
||||
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1.
|
||||
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1. Feature flag `work_item_epics` removed.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
In GitLab 17.2, we introduced [epics as work items](../../user/group/epics/epic_work_items.md).
|
||||
In GitLab 17.2, we introduced [epics as work items](../../user/group/epics/_index.md#epics-as-work-items).
|
||||
|
||||
To ensure that your integrations continue working:
|
||||
|
||||
|
|
|
|||
|
|
@ -12,13 +12,18 @@ title: Group service accounts API
|
|||
|
||||
{{< /details >}}
|
||||
|
||||
Use this API to interact with service accounts for your groups. For more information, see [Service accounts](../user/profile/service_accounts.md).
|
||||
Use this API to interact with group service accounts. Group service accounts are owned by
|
||||
a specific top-level group and can inherit membership to subgroups and projects like a human user.
|
||||
For more information, see [service accounts](../user/profile/service_accounts.md).
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have administrator access to the instance, or have the Owner role for the GitLab.com group.
|
||||
- On GitLab.com, you must have the Owner role for the group.
|
||||
- On GitLab Self-Managed or GitLab Dedicated you must either:
|
||||
- Be an administrator for the instance.
|
||||
- Have the Owner role in a top-level group and be [allowed to create service accounts](../administration/settings/account_and_limit_settings.md#allow-top-level-group-owners-to-create-service-accounts).
|
||||
|
||||
## List all service account users
|
||||
## List all group service accounts
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -26,7 +31,7 @@ Prerequisites:
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Lists all service account users in a specified top-level group.
|
||||
Lists all service accounts in a specified top-level group.
|
||||
|
||||
Use the `page` and `per_page` [pagination parameters](rest/_index.md#offset-based-pagination) to filter the results.
|
||||
|
||||
|
|
@ -36,11 +41,11 @@ GET /groups/:id/service_accounts
|
|||
|
||||
Parameters:
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
|:-------------|:---------|:-----------|:----------------------------------------------------------------|
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `order_by` | string | no | Orders list of users by `username` or `id`. Default is `id`. |
|
||||
| `sort` | string | no | Specifies sorting by `asc` or `desc`. Default is `desc`. |
|
||||
| Attribute | Type | Required | Description |
|
||||
| ---------- | -------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `order_by` | string | no | Orders list of users by `username` or `id`. Default is `id`. |
|
||||
| `sort` | string | no | Specifies sorting by `asc` or `desc`. Default is `desc`. |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
@ -68,18 +73,18 @@ Example response:
|
|||
]
|
||||
```
|
||||
|
||||
## Create a service account user
|
||||
## Create a group service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/407775) in GitLab 16.1.
|
||||
- Specify a service account user username or name was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144841) in GitLab 16.10.
|
||||
- Specify a service account user email address was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/181456) in GitLab 17.9 [with a flag](../administration/feature_flags/_index.md) named `group_service_account_custom_email`.
|
||||
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186476) in GitLab 17.11. Feature flag `group_service_account_custom_email` removed.
|
||||
- `username` and `name` attributes [added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144841) in GitLab 16.10.
|
||||
- `email` attribute [added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/181456) in GitLab 17.9 [with a flag](../administration/feature_flags/_index.md) named `group_service_account_custom_email`.
|
||||
- `email` attribute [generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186476) in GitLab 17.11. Feature flag `group_service_account_custom_email` removed.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
Creates a service account user in a given top-level group.
|
||||
Creates a service account in a specified top-level group.
|
||||
|
||||
{{< alert type="note" >}}
|
||||
|
||||
|
|
@ -93,12 +98,12 @@ POST /groups/:id/service_accounts
|
|||
|
||||
Supported attributes:
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
|:-----------|:---------------|:---------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `id` | integer/string | yes | ID or [URL-encoded path](rest/_index.md#namespaced-paths) of a top-level group. |
|
||||
| `name` | string | no | User account name. If not specified, uses `Service account user`. |
|
||||
| `username` | string | no | User account username. If not specified, generates a name prepended with `service_account_group_`. |
|
||||
| `email` | string | no | User account email. If not specified, generates an email prepended with `service_account_group_`. Custom email addresses require confirmation before the account is active, unless the group has a matching [verified domain](../user/enterprise_user/_index.md#verified-domains-for-groups). |
|
||||
| Attribute | Type | Required | Description |
|
||||
| ---------- | -------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | ID or [URL-encoded path](rest/_index.md#namespaced-paths) of a top-level group. |
|
||||
| `name` | string | no | User account name. If not specified, uses `Service account user`. |
|
||||
| `username` | string | no | User account username. If not specified, generates a name prepended with `service_account_group_`. |
|
||||
| `email` | string | no | User account email. If not specified, generates an email prepended with `service_account_group_`. Custom email addresses require confirmation before the account is active, unless the group has a matching [verified domain](../user/enterprise_user/_index.md#verified-domains-for-groups). |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
@ -117,7 +122,7 @@ Example response:
|
|||
}
|
||||
```
|
||||
|
||||
## Update a service account user
|
||||
## Update a group service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -125,7 +130,7 @@ Example response:
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Updates a service account user in a given top-level group.
|
||||
Updates a service account in a specified top-level group.
|
||||
|
||||
{{< alert type="note" >}}
|
||||
|
||||
|
|
@ -139,12 +144,12 @@ PATCH /groups/:id/service_accounts/:user_id
|
|||
|
||||
Parameters:
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
|:-----------|:---------------|:---------|:----------------------------------------------------------------|
|
||||
| Attribute | Type | Required | Description |
|
||||
| ---------- | -------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `user_id` | integer | yes | The ID of the service account user. |
|
||||
| `name` | string | no | Name of the user. |
|
||||
| `username` | string | no | Username of the user. |
|
||||
| `user_id` | integer | yes | The ID of the service account. |
|
||||
| `name` | string | no | Name of the user. |
|
||||
| `username` | string | no | Username of the user. |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
@ -163,7 +168,7 @@ Example response:
|
|||
}
|
||||
```
|
||||
|
||||
## Delete a service account user
|
||||
## Delete a group service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -171,7 +176,7 @@ Example response:
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Deletes a service account user from a given top-level group.
|
||||
Deletes a service account from a specified top-level group.
|
||||
|
||||
{{< alert type="note" >}}
|
||||
|
||||
|
|
@ -185,11 +190,11 @@ DELETE /groups/:id/service_accounts/:user_id
|
|||
|
||||
Parameters:
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
|:---------------------------|:---------------|:--------------------------|:-------------------------------------------------------------------------------|
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `user_id` | integer | yes | The ID of a service account user. |
|
||||
| `hard_delete` | boolean | no | If true, contributions that would usually be [moved to a Ghost User](../user/profile/account/delete_account.md#associated-records) are instead deleted, as well as groups owned solely by this service account user. |
|
||||
| Attribute | Type | Required | Description |
|
||||
| ------------- | -------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `user_id` | integer | yes | The ID of a service account. |
|
||||
| `hard_delete` | boolean | no | If true, contributions that would usually be [moved to a Ghost User](../user/profile/account/delete_account.md#associated-records) are instead deleted, as well as groups owned solely by this service account. |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
@ -197,7 +202,7 @@ Example request:
|
|||
curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/345/service_accounts/181"
|
||||
```
|
||||
|
||||
## List all personal access tokens for a service account user
|
||||
## List all personal access tokens for a group service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -205,7 +210,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Lists all personal access tokens for a service account user in a top-level group.
|
||||
Lists all personal access tokens for a service account in a top-level group.
|
||||
|
||||
```plaintext
|
||||
GET /groups/:id/service_accounts/:user_id/personal_access_tokens
|
||||
|
|
@ -215,18 +220,18 @@ Supported attributes:
|
|||
|
||||
| Attribute | Type | Required | Description |
|
||||
| ------------------ | ------------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | ID or [URL-encoded path](rest/_index.md#namespaced-paths) of a top-level group. |
|
||||
| `user_id` | integer | yes | ID of service account user. |
|
||||
| `created_after` | datetime (ISO 8601) | No | If defined, returns tokens created after the specified time. |
|
||||
| `created_before` | datetime (ISO 8601) | No | If defined, returns tokens created before the specified time. |
|
||||
| `expires_after` | date (ISO 8601) | No | If defined, returns tokens that expire after the specified time. |
|
||||
| `expires_before` | date (ISO 8601) | No | If defined, returns tokens that expire before the specified time. |
|
||||
| `last_used_after` | datetime (ISO 8601) | No | If defined, returns tokens last used after the specified time. |
|
||||
| `last_used_before` | datetime (ISO 8601) | No | If defined, returns tokens last used before the specified time. |
|
||||
| `revoked` | boolean | No | If `true`, only returns revoked tokens. |
|
||||
| `search` | string | No | If defined, returns tokens that include the specified value in the name. |
|
||||
| `sort` | string | No | If defined, sorts the results by the specified value. Possible values: `created_asc`, `created_desc`, `expires_asc`, `expires_desc`, `last_used_asc`, `last_used_desc`, `name_asc`, `name_desc`. |
|
||||
| `state` | string | No | If defined, returns tokens with the specified state. Possible values: `active` and `inactive`. |
|
||||
| `id` | integer/string | yes | ID or [URL-encoded path](rest/_index.md#namespaced-paths) of a top-level group. |
|
||||
| `user_id` | integer | yes | ID of service account. |
|
||||
| `created_after` | datetime (ISO 8601) | no | If defined, returns tokens created after the specified time. |
|
||||
| `created_before` | datetime (ISO 8601) | no | If defined, returns tokens created before the specified time. |
|
||||
| `expires_after` | date (ISO 8601) | no | If defined, returns tokens that expire after the specified time. |
|
||||
| `expires_before` | date (ISO 8601) | no | If defined, returns tokens that expire before the specified time. |
|
||||
| `last_used_after` | datetime (ISO 8601) | no | If defined, returns tokens last used after the specified time. |
|
||||
| `last_used_before` | datetime (ISO 8601) | no | If defined, returns tokens last used before the specified time. |
|
||||
| `revoked` | boolean | no | If `true`, only returns revoked tokens. |
|
||||
| `search` | string | no | If defined, returns tokens that include the specified value in the name. |
|
||||
| `sort` | string | no | If defined, sorts the results by the specified value. Possible values: `created_asc`, `created_desc`, `expires_asc`, `expires_desc`, `last_used_asc`, `last_used_desc`, `name_asc`, `name_desc`. |
|
||||
| `state` | string | no | If defined, returns tokens with the specified state. Possible values: `active` and `inactive`. |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
@ -262,7 +267,7 @@ Example of unsuccessful responses:
|
|||
- `401: Unauthorized`
|
||||
- `404 Group Not Found`
|
||||
|
||||
## Create a personal access token for a service account user
|
||||
## Create a personal access token for a group service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -270,7 +275,7 @@ Example of unsuccessful responses:
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Creates a personal access token for an existing service account user in a given top-level group.
|
||||
Creates a personal access token for an existing service account in a specified top-level group.
|
||||
|
||||
```plaintext
|
||||
POST /groups/:id/service_accounts/:user_id/personal_access_tokens
|
||||
|
|
@ -278,14 +283,14 @@ POST /groups/:id/service_accounts/:user_id/personal_access_tokens
|
|||
|
||||
Parameters:
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
| --------- | --------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | ID or [URL-encoded path](rest/_index.md#namespaced-paths) of a top-level group. |
|
||||
| `user_id` | integer | yes | ID of service account user. |
|
||||
| `name` | string | yes | Name of personal access token. |
|
||||
| `description` | string | no | Description of personal access token. |
|
||||
| `scopes` | array | yes | Array of approved scopes. For a list of possible values, see [Personal access token scopes](../user/profile/personal_access_tokens.md#personal-access-token-scopes). |
|
||||
| `expires_at` | date | no | Expiration date of the access token in ISO format (`YYYY-MM-DD`). If not specified, the date is set to the [maximum allowable lifetime limit](../user/profile/personal_access_tokens.md#access-token-expiration). |
|
||||
| Attribute | Type | Required | Description |
|
||||
| ------------- | -------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | ID or [URL-encoded path](rest/_index.md#namespaced-paths) of a top-level group. |
|
||||
| `user_id` | integer | yes | ID of service account. |
|
||||
| `name` | string | yes | Name of personal access token. |
|
||||
| `description` | string | no | Description of personal access token. |
|
||||
| `scopes` | array | yes | Array of approved scopes. For a list of possible values, see [Personal access token scopes](../user/profile/personal_access_tokens.md#personal-access-token-scopes). |
|
||||
| `expires_at` | date | no | Expiration date of the access token in ISO format (`YYYY-MM-DD`). If not specified, the date is set to the [maximum allowable lifetime limit](../user/profile/personal_access_tokens.md#access-token-expiration). |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
@ -310,7 +315,7 @@ Example response:
|
|||
}
|
||||
```
|
||||
|
||||
## Revoke a personal access token for a service account user
|
||||
## Revoke a personal access token for a group service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -318,7 +323,7 @@ Example response:
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Revokes a personal access token for an existing service account user in a given top-level group.
|
||||
Revokes a personal access token for an existing service account in a specified top-level group.
|
||||
|
||||
{{< alert type="note" >}}
|
||||
|
||||
|
|
@ -332,11 +337,11 @@ DELETE /groups/:id/service_accounts/:user_id/personal_access_tokens/:token_id
|
|||
|
||||
Parameters:
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
| ------------ | --------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `user_id` | integer | yes | The ID of the service account user. |
|
||||
| `token_id` | integer | yes | The ID of the token. |
|
||||
| Attribute | Type | Required | Description |
|
||||
| ---------- | -------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `user_id` | integer | yes | The ID of the service account. |
|
||||
| `token_id` | integer | yes | The ID of the token. |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
@ -353,7 +358,7 @@ Other possible responses:
|
|||
- `403: Forbidden` if the request is not allowed.
|
||||
- `404: Not Found` if the access token does not exist.
|
||||
|
||||
## Rotate a personal access token for a service account user
|
||||
## Rotate a personal access token for a group service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -361,7 +366,7 @@ Other possible responses:
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Rotates a personal access token for an existing service account user in a given top-level group. This creates a new token valid for one week and revokes any existing tokens.
|
||||
Rotates a personal access token for an existing service account in a specified top-level group. This creates a new token valid for one week and revokes any existing tokens.
|
||||
|
||||
{{< alert type="note" >}}
|
||||
|
||||
|
|
@ -375,12 +380,12 @@ POST /groups/:id/service_accounts/:user_id/personal_access_tokens/:token_id/rota
|
|||
|
||||
Parameters:
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
| ------------ | --------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `user_id` | integer | yes | The ID of the service account user. |
|
||||
| `token_id` | integer | yes | The ID of the token. |
|
||||
| `expires_at` | date | no | Expiration date of the access token in ISO format (`YYYY-MM-DD`). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/505671) in GitLab 17.9.If the token requires an expiration date, defaults to 1 week. If not required, defaults to the [maximum allowable lifetime limit](../user/profile/personal_access_tokens.md#access-token-expiration). |
|
||||
| Attribute | Type | Required | Description |
|
||||
| ------------ | -------------- | -------- | ----------- |
|
||||
| `id` | integer/string | yes | The ID or [URL-encoded path of the target group](rest/_index.md#namespaced-paths). |
|
||||
| `user_id` | integer | yes | The ID of the service account. |
|
||||
| `token_id` | integer | yes | The ID of the token. |
|
||||
| `expires_at` | date | no | Expiration date of the access token in ISO format (`YYYY-MM-DD`). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/505671) in GitLab 17.9. If the token requires an expiration date, defaults to one week. If not required, defaults to the [maximum allowable lifetime limit](../user/profile/personal_access_tokens.md#access-token-expiration). |
|
||||
|
||||
Example request:
|
||||
|
||||
|
|
|
|||
|
|
@ -931,7 +931,7 @@ Example response:
|
|||
{{< alert type="warning" >}}
|
||||
|
||||
This endpoint is scheduled for removal in GitLab 18.3 (August 11th, 2025).
|
||||
Use [`GET /groups/:id/saml_users`](#list-all-saml-users) and [`GET /groups/:id/service_accounts`](group_service_accounts.md#list-all-service-account-users) instead.
|
||||
Use [`GET /groups/:id/saml_users`](#list-all-saml-users) and [`GET /groups/:id/service_accounts`](group_service_accounts.md#list-all-group-service-accounts) instead.
|
||||
|
||||
{{< /alert >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ title: Linked epics API
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see [migrate epic APIs to work items](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" \
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see [migrate epic APIs to work items](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see [migrate epic APIs to work items](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ Example response:
|
|||
|
||||
The Epics REST API was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/460668) in GitLab 17.0
|
||||
and is planned for removal in v5 of the API.
|
||||
In GitLab 17.4 or later, if [the new look for epics](../user/group/epics/epic_work_items.md) is enabled, use the
|
||||
From GitLab 17.4 to 18.0, if [the new look for epics](../user/group/epics/_index.md#epics-as-work-items) is enabled, and in GitLab 18.1 and later, use the
|
||||
Work Items API instead. For more information, see [migrate epic APIs to work items](graphql/epic_work_items_api_migration_guide.md).
|
||||
This change is a breaking change.
|
||||
|
||||
|
|
|
|||
|
|
@ -12,12 +12,13 @@ title: Service account users API
|
|||
|
||||
{{< /details >}}
|
||||
|
||||
Use this API to interact with service accounts for an entire GitLab instance. For more information,
|
||||
see [service accounts](../user/profile/service_accounts.md).
|
||||
Use this API to interact with instance service accounts. Instance service accounts are available to
|
||||
an entire GitLab instance, but must still be added to groups and projects like a human user.
|
||||
For more information, see [service accounts](../user/profile/service_accounts.md).
|
||||
|
||||
Service accounts are a type of user, and you can also use the [users API](users.md) to manage service accounts.
|
||||
You can also interact with service accounts through the [users API](users.md).
|
||||
|
||||
## List all service accounts for an instance
|
||||
## List all instance service accounts
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -25,8 +26,7 @@ Service accounts are a type of user, and you can also use the [users API](users.
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Lists all service accounts associated with the GitLab instance. Does not list service accounts
|
||||
associated with a specific group.
|
||||
Lists all instance service accounts.
|
||||
|
||||
Use the `page` and `per_page` [pagination parameters](rest/_index.md#offset-based-pagination) to filter the results.
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ Example response:
|
|||
]
|
||||
```
|
||||
|
||||
## Create a service account for an instance
|
||||
## Create an instance service account
|
||||
|
||||
{{< history >}}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ Example response:
|
|||
|
||||
{{< /history >}}
|
||||
|
||||
Creates a service account associated with the GitLab instance.
|
||||
Creates an instance service account.
|
||||
|
||||
Prerequisites:
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,13 @@ Learn how to contribute to the development of the GitLab product.
|
|||
|
||||
This content is intended for both GitLab team members and members of the wider community.
|
||||
|
||||
- [Contribute to GitLab development](contributing/_index.md)
|
||||
- [Contribute to GitLab Runner development](https://docs.gitlab.com/runner/development/)
|
||||
- [Contribute to GitLab Pages development](pages/_index.md)
|
||||
- [Contribute to GitLab distribution development](distribution/_index.md)
|
||||
{{< cards >}}
|
||||
|
||||
- [Contribute to GitLab](contributing/_index.md)
|
||||
- [Contribute to GitLab Runner](https://docs.gitlab.com/runner/development/)
|
||||
- [Contribute to GitLab Pages](pages/_index.md)
|
||||
- [Contribute to GitLab Distribution](distribution/_index.md)
|
||||
- [Contribute to the GitLab Design System](https://design.gitlab.com/get-started/contributing/)
|
||||
- [Contribute to the GitLab documentation](documentation/_index.md)
|
||||
|
||||
{{< /cards >}}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
stage: none
|
||||
group: unassigned
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/development/development_processes/#development-guidelines-review.
|
||||
description: Code contribution guidelines, style guides, and processes.
|
||||
title: Contribute to GitLab development
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
stage: GitLab Delivery
|
||||
group: Build
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/development/development_processes/#development-guidelines-review.
|
||||
description: Development guidelines for Distribution
|
||||
description: Package methods and components for the GitLab application.
|
||||
title: Contribute to GitLab Distribution
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
stage: none
|
||||
group: Documentation Guidelines
|
||||
info: For assistance with this Style Guide page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects.
|
||||
description: Documentation style guide and workflows.
|
||||
title: Contribute to the GitLab documentation
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,32 @@ ensure that all projects have been updated to test against the new Go version
|
|||
before changing the package builders to use it. Despite [Go's compatibility promise](https://go.dev/doc/go1compat),
|
||||
changes between minor versions can expose bugs or cause problems in our projects.
|
||||
|
||||
### Version in `go.mod`
|
||||
|
||||
**Key Requirements:**
|
||||
|
||||
- Always use `0` as the patch version (for example, `go 1.23.0`, not `go 1.23.4`).
|
||||
- Do not set a version newer than what is used in CNG and Omnibus, otherwise this will cause build failures.
|
||||
|
||||
The Go version in your `go.mod` affects all downstream projects.
|
||||
When you specify a minimum Go version, any project that imports your package must use that version or newer.
|
||||
This can create impossible situations for projects with different Go version constraints.
|
||||
|
||||
For example, if CNG uses Go 1.23.4 but your project declares `go 1.23.5` as the minimum required version, CNG will
|
||||
fail to build your package.
|
||||
Similarly, other projects importing your package will be forced to upgrade their Go version, which may not be feasible.
|
||||
|
||||
[See above](#testing-against-shipped-go-versions) to find out what versions are used in CNG and Omnibus.
|
||||
|
||||
From the [Go Modules Reference](https://go.dev/ref/mod#go-mod-file-go):
|
||||
|
||||
> The go directive sets the minimum version of Go required to use this module.
|
||||
|
||||
You don't need to set `go 1.24.0` to be compatible with Go 1.24.0.
|
||||
Having it at `go 1.23.0` works fine.
|
||||
Go 1.23.0 and any newer version will almost certainly build your package without issues thanks to the
|
||||
[Go 1 compatibility promise](https://go.dev/doc/go1compat).
|
||||
|
||||
### Upgrade cadence
|
||||
|
||||
GitLab adopts major Go versions within eight months of their release
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
stage: Plan
|
||||
group: Knowledge
|
||||
info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/development/development_processes/#development-guidelines-review.
|
||||
description: Development guidelines for GitLab Pages
|
||||
description: Configuration and contribution guidelines.
|
||||
title: Contribute to GitLab Pages development
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -208,11 +208,11 @@ This token authenticates the service account token used to manage GitLab deploym
|
|||
|
||||
To create the service account token:
|
||||
|
||||
1. [Create a service account user](../../api/user_service_accounts.md#create-a-service-account-for-an-instance).
|
||||
1. [Create a service account user](../../api/user_service_accounts.md#create-an-instance-service-account).
|
||||
1. [Add the service account to a group or project](../../api/members.md#add-a-member-to-a-group-or-project)
|
||||
by using your personal access token.
|
||||
1. [Add the service account to protected environments](../../ci/environments/protected_environments.md#protecting-environments).
|
||||
1. [Generate a service account token](../../api/group_service_accounts.md#create-a-personal-access-token-for-a-service-account-user)
|
||||
1. [Generate a service account token](../../api/group_service_accounts.md#create-a-personal-access-token-for-a-group-service-account)
|
||||
by using your personal access token.
|
||||
1. Copy the service account token value.
|
||||
|
||||
|
|
|
|||
|
|
@ -330,7 +330,8 @@ To create a thread:
|
|||
- Resolvable threads for issues [enabled on GitLab.com and GitLab Self-Managed](https://gitlab.com/gitlab-org/gitlab/-/issues/31114) in GitLab 16.4.
|
||||
- Resolvable threads for issues [generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/31114) in GitLab 16.7. Feature flag `resolvable_issue_threads` removed.
|
||||
- Resolvable threads for tasks, objectives, and key results [generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/458818) in GitLab 17.3.
|
||||
- Resolvable threads for epics [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/458818) in GitLab 17.5. [The new look for epics](../group/epics/epic_work_items.md) must be enabled.
|
||||
- Resolvable threads for epics [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/458818) in GitLab 17.5. [The new look for epics](../group/epics/_index.md#epics-as-work-items) must be enabled.
|
||||
- Resolvable threads for epics [generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -338,7 +339,7 @@ You can resolve a thread when you want to finish a conversation.
|
|||
|
||||
Prerequisites:
|
||||
|
||||
- You must be in an epic, issue, task, objective, key result, or merge request. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled.
|
||||
- You must be in an epic, issue, task, objective, key result, or merge request.
|
||||
- You must have at least the Developer role or be the author of the issue or merge request.
|
||||
|
||||
To resolve a thread:
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ Views can be embedded in the following areas:
|
|||
- Epics
|
||||
- Issues
|
||||
- Merge requests
|
||||
- Work items (tasks, OKRs, epics [with the new look](../group/epics/epic_work_items.md))
|
||||
- Work items (tasks, OKRs, or epics)
|
||||
|
||||
### Syntax
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ The possible relationships between epics and other items are:
|
|||
- An epic is the parent of one or more issues.
|
||||
- An epic is the parent of one or more [child epics](manage_epics.md#multi-level-child-epics). Ultimate only.
|
||||
- An epic is [linked](linked_epics.md) to one or more task, objective, or key result.
|
||||
[The new look for epics](epic_work_items.md) must be enabled.
|
||||
|
||||
Example set of relationships:
|
||||
|
||||
|
|
@ -75,14 +74,6 @@ graph TD
|
|||
|
||||
### Child issues from different group hierarchies
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/371081) in GitLab 15.5 [with a flag](../../../administration/feature_flags/_index.md) named `epic_issues_from_different_hierarchies`. Disabled by default.
|
||||
- [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/373304) in GitLab 15.5.
|
||||
- Feature flag `epic_issues_from_different_hierarchies` removed in GitLab 15.6.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
You can add issues from a different group hierarchy to an epic.
|
||||
To do it, paste the issue URL when
|
||||
[adding an existing issue](manage_epics.md#add-an-existing-issue-to-an-epic).
|
||||
|
|
@ -102,6 +93,15 @@ A roadmap filtered for the parent epic opens.
|
|||
|
||||
## Epics as work items
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/9290) in GitLab 17.2 [with a flag](../../../administration/feature_flags/_index.md) named `work_item_epics`. Disabled by default. Introduced in [beta](../../../policy/development_stages_support.md#beta).
|
||||
- [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/470685) in GitLab 17.6.
|
||||
- [Enabled by default on GitLab Self-Managed and GitLab Dedicated](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 17.7.
|
||||
- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1. Feature flag `work_item_epics` removed.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
We have changed how epics look by migrating them to a unified framework for work items to better
|
||||
meet the product needs of our Agile Planning offering.
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 92 KiB |
|
|
@ -100,111 +100,29 @@ When you link epics for planning:
|
|||
- Teams can see upcoming work early.
|
||||
- Status updates roll up to the higher-level view.
|
||||
|
||||
## Add a linked epic
|
||||
## Add a linked item
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Minimum required role for the group [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/381308) from Reporter to Guest in GitLab 15.8.
|
||||
- Ability to link issues, tasks, objectives, and key results [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
Link an epic and another:
|
||||
|
||||
- Epic
|
||||
- Issue
|
||||
- Task
|
||||
- Objective
|
||||
- Key Result
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the Guest role for both groups.
|
||||
- You must have at least the Guest role for both groups or group and project.
|
||||
- For GitLab SaaS: the epic that you're editing must be in a group on GitLab Ultimate.
|
||||
The epics you're linking can be in a group on a lower tier.
|
||||
|
||||
To link one epic to another:
|
||||
|
||||
1. In the **Linked epics** section of an epic,
|
||||
select the add linked epic button ({{< icon name="plus" >}}).
|
||||
1. Select the relationship between the two epics. Either:
|
||||
|
||||
- **relates to**
|
||||
- **[blocks](#blocking-epics)**
|
||||
- **[is blocked by](#blocking-epics)**
|
||||
|
||||
1. To enter the linked epic, either:
|
||||
|
||||
- Enter `&`, followed by the epic's number. For example, `&123`.
|
||||
- Enter `&`, followed by a word from the epic's title. For example, `&Deliver`.
|
||||
- Paste in the epic's full URL.
|
||||
|
||||
Epics of the same group can be specified just by the reference number.
|
||||
Epics from a different group require additional information like the
|
||||
group name. For example:
|
||||
|
||||
- The same group: `&44`
|
||||
- Different group: `group&44`
|
||||
|
||||
Valid references are added to a temporary list that you can review.
|
||||
|
||||
1. Select **Add**.
|
||||
|
||||
The linked epics are then displayed on the epic grouped by relationship.
|
||||
|
||||
## Remove a linked epic
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Minimum required role for the group [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/381308) from Reporter to Guest in GitLab 15.8.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- You must have at least the Guest role for the epic's group.
|
||||
|
||||
To remove a linked epic:
|
||||
|
||||
- In the **Linked epics** section of an epic, next to each epic, select **Remove** ({{< icon name="close" >}}).
|
||||
|
||||
The relationship is removed from both epics.
|
||||
|
||||
## Blocking epics
|
||||
|
||||
When you [add a linked epic](#add-a-linked-epic), you can show that it **blocks** or
|
||||
**is blocked by** another epic.
|
||||
|
||||
If you try to close a blocked epic using the "Close epic" button, a confirmation message appears.
|
||||
|
||||
## When using the new look for epics
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Linking epics to issues, tasks, and OKRs [introduced](https://gitlab.com/groups/gitlab-org/-/epics/9290) in GitLab 17.5. [The new look for epics](epic_work_items.md) must be enabled.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
<!-- When epics as work items are GA, integrate this and the following sections with the previous ones. -->
|
||||
|
||||
If your administrator [enabled the new look for epics](epic_work_items.md), you can also link epics
|
||||
and the following items:
|
||||
|
||||
- Issues
|
||||
- Tasks
|
||||
- Objectives
|
||||
- Key results
|
||||
|
||||
Linked items appear in the **Linked items** section, under the **Child items** section on the epic.
|
||||
You can link epics to work items in different groups.
|
||||
|
||||
The relationship only shows up in the UI if the user can see both items.
|
||||
When you try to close an epic linked to an open blocker, a warning is displayed.
|
||||
|
||||
To manage linked epics through our API, see the
|
||||
Work Items API.
|
||||
|
||||
### Add a linked item
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- [The new look for epics](epic_work_items.md) must be enabled.
|
||||
- You must have at least the Guest role for both groups or group and project.
|
||||
- For GitLab SaaS: the epic that you're editing must be in a group on GitLab Ultimate.
|
||||
The item you're linking can be in a group on a lower tier.
|
||||
|
||||
To link an epic to another item:
|
||||
To link one epic to another item:
|
||||
|
||||
1. In the **Linked items** section of an epic, select **Add**.
|
||||
1. Select the relationship between the two items. Either:
|
||||
|
|
@ -231,16 +149,30 @@ To link an epic to another item:
|
|||
1. Select **Add**.
|
||||
|
||||
The linked items are then displayed on the epic grouped by relationship.
|
||||
The relationship only shows in the UI if the user can see both items.
|
||||
|
||||
### Remove a linked item
|
||||
Alternatively, you can add linked items using [quick actions](../../project/quick_actions.md):
|
||||
|
||||
- `/relate`
|
||||
- `/blocks`
|
||||
- `/blocked_by`
|
||||
|
||||
## Remove a linked item
|
||||
|
||||
Prerequisites:
|
||||
|
||||
- [The new look for epics](epic_work_items.md) must be enabled.
|
||||
- You must have at least the Guest role for the epic's group.
|
||||
|
||||
To remove a linked item:
|
||||
|
||||
- In the **Linked items** section of an epic, next to each item, select **Remove** ({{< icon name="close" >}}).
|
||||
1. At the bottom of the description, find the **Linked items** section of the work item.
|
||||
1. For each linked item, select **Remove** ({{< icon name="close" >}}).
|
||||
|
||||
The relationship is removed from both items.
|
||||
The relationship is removed from both epics.
|
||||
|
||||
## Blocking epics
|
||||
|
||||
When you [add a linked item](#add-a-linked-item), you can show that it **blocks** or
|
||||
**is blocked by** another epic.
|
||||
|
||||
If you try to close a blocked epic using the **Close epic** button, a confirmation message appears.
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@ GitLab Flavored Markdown recognizes the following:
|
|||
| Issue | ``#123`` | `namespace/project#123` | `project#123` |
|
||||
| Merge request | `!123` | `namespace/project!123` | `project!123` |
|
||||
| Snippet | `$123` | `namespace/project$123` | `project$123` |
|
||||
| [Epic](group/epics/_index.md) | `#123` | `group1/subgroup&123` or `group1/subgroup#123` | |
|
||||
| [Epic](group/epics/_index.md) | `#123` or `&123` | `group1/subgroup#123` or `group1/subgroup&123` | |
|
||||
| [Iteration](group/iterations/_index.md) | `*iteration:"iteration title"` | | |
|
||||
| [Iteration cadence](group/iterations/_index.md) by ID<sup>1</sup> | `[cadence:123]` | | |
|
||||
| [Iteration cadence](group/iterations/_index.md) by title (one word)<sup>1</sup> | `[cadence:plan]` | | |
|
||||
|
|
@ -816,8 +816,8 @@ For example:
|
|||
{{< history >}}
|
||||
|
||||
- Support for work items (tasks, objectives, and key results) [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/390854) in GitLab 16.0.
|
||||
- Supported for epics in GitLab 17.7, when `work_item_epics` flag got enabled by default.
|
||||
- Generally available for epics in GitLab 18.1.
|
||||
- Support for epics introduced in GitLab 17.7, with the flag named `work_item_epics`, enabled by default.
|
||||
- Generally available for epics in GitLab 18.1. Feature flag `work_item_epics` removed.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
@ -833,10 +833,9 @@ URL references like `https://gitlab.com/gitlab-org/gitlab/-/issues/1234+` are al
|
|||
|
||||
{{< history >}}
|
||||
|
||||
- Support for issues and merge requests [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/386937) in GitLab 15.10.
|
||||
- Support for work items (tasks, objectives, and key results) [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/390854) in GitLab 16.0.
|
||||
- Supported for epics in GitLab 17.7, when `work_item_epics` flag got enabled by default.
|
||||
- Generally available for epics in GitLab 18.1.
|
||||
- Support for epics introduced in GitLab 17.7, with the flag named `work_item_epics`, enabled by default.
|
||||
- Generally available for epics in GitLab 18.1. Feature flag `work_item_epics` removed.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ You can subscribe to an iCalendar endpoint which contains events at the expiry d
|
|||
|
||||
### Create a service account personal access token with no expiry date
|
||||
|
||||
You can [create a personal access token for a service account](../../api/group_service_accounts.md#create-a-personal-access-token-for-a-service-account-user) with no expiry date. These personal access tokens never expire, unlike non-service account personal access tokens.
|
||||
You can [create a personal access token for a service account](../../api/group_service_accounts.md#create-a-personal-access-token-for-a-group-service-account) with no expiry date. These personal access tokens never expire, unlike non-service account personal access tokens.
|
||||
|
||||
{{< alert type="note" >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,13 @@ You can use service accounts to perform automated actions, access data, or run s
|
|||
Service accounts are commonly used in pipelines or third-party integrations where credentials must
|
||||
remain stable and unaffected by changes in human user membership.
|
||||
|
||||
There are two types of service accounts:
|
||||
|
||||
- Instance service accounts: Available to an entire GitLab instance, but must still be added to
|
||||
groups and projects like a human user. Only available on GitLab Self-Managed and GitLab Dedicated.
|
||||
- Group service accounts: Owned by a specific top-level group and can inherit membership to
|
||||
subgroups and projects like a human user.
|
||||
|
||||
You authenticate as a service account with a [personal access token](personal_access_tokens.md).
|
||||
Service accounts have the same abilities as human users, and can perform actions
|
||||
like interacting with [package and container registries](../packages/_index.md),
|
||||
|
|
@ -29,24 +36,22 @@ Service accounts:
|
|||
- Do not use a seat.
|
||||
- Cannot sign in to GitLab through the UI.
|
||||
- Are identified in the group and project membership as service accounts.
|
||||
- Do not receive notification emails without [adding a custom email address](../../api/user_service_accounts.md#create-a-service-account-for-an-instance).
|
||||
- Do not receive notification emails without [adding a custom email address](../../api/user_service_accounts.md#create-an-instance-service-account).
|
||||
- Are not [billable users](../../subscriptions/self_managed/_index.md#billable-users) or [internal users](../../administration/internal_users.md).
|
||||
- Cannot be used with [trial versions](https://gitlab.com/-/trial_registrations/new?glm_source=docs.gitlab.com&glm_content=free-user-limit-faq/ee/user/free_user_limit.html) of GitLab.com.
|
||||
- Can be used with trial versions of GitLab Self-Managed and GitLab Dedicated.
|
||||
- Can be owned by the entire instance or a specific top-level group.
|
||||
- On GitLab.com, service accounts must be owned by a top-level group.
|
||||
|
||||
You can also manage service accounts through the API.
|
||||
|
||||
- For instance-wide service accounts, use the [service account users API](../../api/user_service_accounts.md).
|
||||
- For instance service accounts, use the [service account users API](../../api/user_service_accounts.md).
|
||||
- For group service accounts, use the [group service accounts API](../../api/group_service_accounts.md).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- On GitLab.com, you must have the Owner role in a top-level group.
|
||||
- On GitLab Self-Managed or GitLab Dedicated you must either:
|
||||
- Be an administrator for the instance.
|
||||
- Have the Owner role in a top-level group and be [allowed to create service accounts](../../administration/settings/account_and_limit_settings.md#allow-top-level-group-owners-to-create-service-accounts).
|
||||
- On GitLab.com, you must have the Owner role in a top-level group.
|
||||
|
||||
## View and manage service accounts
|
||||
|
||||
|
|
@ -166,8 +171,8 @@ contributions can include activity such as merge requests, issues, groups, and p
|
|||
|
||||
You can also delete service accounts through the API.
|
||||
|
||||
- For instance-wide service accounts, use the [users API](../../api/users.md#delete-a-user).
|
||||
- For group service accounts, use the [group service accounts API](../../api/group_service_accounts.md#delete-a-service-account-user).
|
||||
- For instance service accounts, use the [users API](../../api/users.md#delete-a-user).
|
||||
- For group service accounts, use the [group service accounts API](../../api/group_service_accounts.md#delete-a-group-service-account).
|
||||
|
||||
## View and manage personal access tokens for a service account
|
||||
|
||||
|
|
@ -179,7 +184,7 @@ The personal access tokens page displays information about the personal access t
|
|||
|
||||
You can also manage personal access tokens for service accounts through the API.
|
||||
|
||||
- For instance-wide service accounts, use the [personal access tokens API](../../api/personal_access_tokens.md).
|
||||
- For instance service accounts, use the [personal access tokens API](../../api/personal_access_tokens.md).
|
||||
- For group service accounts, use the [group service accounts API](../../api/group_service_accounts.md).
|
||||
|
||||
To view the personal access tokens page for a service account:
|
||||
|
|
|
|||
|
|
@ -219,8 +219,8 @@ This issue occurs because all deploy keys are associated to an account. Because
|
|||
|
||||
To resolve this issue, you can use the deploy keys API to create deploy keys for project service account users, instead of for your own users:
|
||||
|
||||
1. [Create a service account user](../../../api/group_service_accounts.md#create-a-service-account-user).
|
||||
1. [Create a personal access token](../../../api/user_tokens.md#create-a-personal-access-token) for that service account user. This token must have at least the `api` scope.
|
||||
1. [Create a service account user](../../../api/group_service_accounts.md#create-a-group-service-account).
|
||||
1. [Create a personal access token](../../../api/group_service_accounts.md#create-a-personal-access-token-for-a-group-service-account) for that service account user. This token must have at least the `api` scope.
|
||||
1. [Invite the service account user to the project](../../profile/service_accounts.md#service-account-access-to-groups-and-projects).
|
||||
1. Use the deploy key API to [create a deploy key for the service account user](../../../api/deploy_keys.md#add-deploy-key):
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ You can define templates to use as descriptions
|
|||
for your:
|
||||
|
||||
- [issues](issues/_index.md)
|
||||
- [epics](../group/epics/epic_work_items.md)
|
||||
- [epics](../group/epics/_index.md)
|
||||
- [tasks](../tasks.md)
|
||||
- [merge requests](merge_requests/_index.md)
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,8 @@ Payload example:
|
|||
{{< history >}}
|
||||
|
||||
- `type` attribute in `object_attributes` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/467415) in GitLab 17.2.
|
||||
- Support for epics [introduced](https://gitlab.com/groups/gitlab-org/-/epics/13056) in GitLab 17.3. [The new look for epics](../../group/epics/epic_work_items.md) must be enabled.
|
||||
- Support for epics [introduced](https://gitlab.com/groups/gitlab-org/-/epics/13056) in GitLab 17.3. [The new look for epics](../../group/epics/_index.md#epics-as-work-items) must be enabled.
|
||||
- Support for epics [generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,15 +173,15 @@ To build the URL to create an issue with prefilled values, combine:
|
|||
For example: `issue[title]=My%20test%20issue`.
|
||||
1. Optional. `&` to join more parameters.
|
||||
|
||||
| Field | URL parameter | Notes |
|
||||
| ------------ | --------------------- | ----- |
|
||||
| Title | `issue[title]` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). |
|
||||
| Issue type | `issue[issue_type]` | Either `incident` or `issue`. |
|
||||
| Description template (issues, epics, incidents, and merge requests) | `issuable_template` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). |
|
||||
| Description template (tasks, OKRs, issues [with the new look](issue_work_items.md), and epics [with the new look](../../group/epics/epic_work_items.md)). | `description_template` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/513095) in GitLab 17.9. |
|
||||
| Description | `issue[description]` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). If used in combination with `issuable_template` or a [default issue template](../description_templates.md#set-a-default-template-for-merge-requests-and-issues), the `issue[description]` value is appended to the template. |
|
||||
| Confidential | `issue[confidential]` | If `true`, the issue is marked as confidential. |
|
||||
| Relate to… | `add_related_issue` | A numeric issue ID. If present, the issue form shows a [**Relate to** checkbox](#from-another-issue-or-incident) to optionally link the new issue to the specified existing issue. |
|
||||
| Field | URL parameter | Notes |
|
||||
| ---------------------------------------------------------------------------------------------- | ---------------------- | ----- |
|
||||
| Title | `issue[title]` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). |
|
||||
| Issue type | `issue[issue_type]` | Either `incident` or `issue`. |
|
||||
| Description template (issues, incidents, and merge requests) | `issuable_template` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). |
|
||||
| Description template (tasks, OKRs, issues [with the new look](issue_work_items.md), and epics. | `description_template` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/513095) in GitLab 17.9. |
|
||||
| Description | `issue[description]` | Must be [URL-encoded](../../../api/rest/_index.md#namespaced-paths). If used in combination with `issuable_template` or a [default issue template](../description_templates.md#set-a-default-template-for-merge-requests-and-issues), the `issue[description]` value is appended to the template. |
|
||||
| Confidential | `issue[confidential]` | If `true`, the issue is marked as confidential. |
|
||||
| Relate to… | `add_related_issue` | A numeric issue ID. If present, the issue form shows a [**Relate to** checkbox](#from-another-issue-or-incident) to optionally link the new issue to the specified existing issue. |
|
||||
|
||||
In [GitLab 17.8 and later](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/177215),
|
||||
when you select an issue template, the URL changes to show the template used.
|
||||
|
|
|
|||
|
|
@ -63,7 +63,3 @@ The new issues experience includes these improvements:
|
|||
When you change an issue to an epic, the epic is created in the parent group because epics can
|
||||
only exist in groups.
|
||||
- **Development**: Merge requests, branches, and feature flags related to this item are shown in a single list.
|
||||
|
||||
## Related topics
|
||||
|
||||
- [Test a new look for epics](../../group/epics/epic_work_items.md)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ To auto-format this table, use the VS Code Markdown Table formatter: `https://do
|
|||
|
||||
| Command | Issue | Merge request | Epic | Action |
|
||||
|:------------------------------------------------------------------------------------------------|:-----------------------|:-----------------------|:-----------------------|:-------|
|
||||
| `/add_child <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Add `<item>` as a child item. The `<item>` value should be in the format of `#item`, `group/project#item`, or a URL to the item. For issues, you can add tasks and OKRs. [The new look for issues](issues/issue_work_items.md) must be enabled. For epics, you can add issues, tasks, and OKRs. Multiple work items can be added as child items at the same time. [The new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/add_child <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Add `<item>` as a child item. The `<item>` value should be in the format of `#item`, `group/project#item`, or a URL to the item. For issues, you can add tasks and OKRs. [The new look for issues](issues/issue_work_items.md) must be enabled. For epics, you can add issues, tasks, and OKRs. Multiple work items can be added as child items at the same time. |
|
||||
| `/add_contacts [contact:email1@example.com] [contact:email2@example.com]` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add one or more active [CRM contacts](../crm/_index.md). |
|
||||
| `/add_email email1 email2` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add up to six [email participants](service_desk/external_participants.md). This action is behind the feature flag `issue_email_participants`. Not supported in [issue templates](description_templates.md). |
|
||||
| `/approve` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Approve the merge request. |
|
||||
|
|
@ -71,72 +71,68 @@ To auto-format this table, use the VS Code Markdown Table formatter: `https://do
|
|||
| `/assign me` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Assign yourself. |
|
||||
| `/assign_reviewer @user1 @user2` or `/reviewer @user1 @user2` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Assign one or more users as reviewers. |
|
||||
| `/assign_reviewer me` or `/reviewer me` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Assign yourself as a reviewer. |
|
||||
| `/blocked_by <item1> <item2>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark the item as blocked by other items. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214232) in GitLab 16.0). For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/blocks <item1> <item2>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark the item as blocking other items. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214232) in GitLab 16.0). For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/blocked_by <item1> <item2>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark the item as blocked by other items. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214232) in GitLab 16.0). |
|
||||
| `/blocks <item1> <item2>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark the item as blocking other items. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214232) in GitLab 16.0). |
|
||||
| `/board_move ~column` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Move issue to column on the board. The project must have only one issue board. |
|
||||
| `/cc @user` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Mention a user. This command performs no action. You can instead type `CC @user` or only `@user`. |
|
||||
| `/clear_health_status` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Clear [health status](issues/managing_issues.md#health-status). For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/clear_health_status` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Clear [health status](issues/managing_issues.md#health-status). |
|
||||
| `/clear_weight` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Clear weight. |
|
||||
| `/clone <path/to/group_or_project> [--with_notes]` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Clone the work item to a given group or project, or the current one if no arguments are given. Copies as much data as possible as long as the target contains equivalent objects like labels, milestones, or epics. Does not copy comments or system notes unless `--with_notes` is provided as an argument. |
|
||||
| `/close` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Close. |
|
||||
| `/confidential` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark issue or epic as confidential. Support for epics [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213741) in GitLab 15.6. |
|
||||
| `/confidential` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark issue or epic as confidential. |
|
||||
| `/convert_to_ticket <email address>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | [Convert an issue into a Service Desk ticket](service_desk/using_service_desk.md#convert-a-regular-issue-to-a-service-desk-ticket). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/433376) in GitLab 16.9 |
|
||||
| `/copy_metadata <!merge_request>` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Copy labels and milestone from another merge request in the project. |
|
||||
| `/copy_metadata <#item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes| Copy labels and milestone from another issue in the project. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/copy_metadata <#item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes| Copy labels and milestone from another item in the project. |
|
||||
| `/create_merge_request <branch name>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Create a new merge request starting from the current issue. |
|
||||
| `/done` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes| Mark to-do item as done. |
|
||||
| `/draft` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Set the [draft status](merge_requests/drafts.md). |
|
||||
| `/due <date>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Set due date. Examples of valid `<date>` include `in 2 days`, `this Friday` and `December 31st`. See [Chronic](https://gitlab.com/gitlab-org/ruby/gems/gitlab-chronic#examples) for more examples. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/duplicate <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Close this <work item type>. Marks as related to, and a duplicate of, <#item>. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/epic <epic>` or `/set_parent <epic>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No |{{< icon name="check-circle" >}} Yes| Add to epic `<epic>` as a child item. The `<epic>` value should be in the format of `&epic`, `group&epic`, or a URL to an epic. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. Alias `/set_parent` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/514942) in GitLab 17.10. |
|
||||
| `/estimate <time>` or `/estimate_time <time>` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Set time estimate. For example, `/estimate 1mo 2w 3d 4h 5m`. For more information, see [Time tracking](time_tracking.md). Alias `/estimate_time` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16501) in GitLab 15.6. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/health_status <value>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Set [health status](issues/managing_issues.md#health-status). For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. Valid options for `<value>` are `on_track`, `needs_attention`, and `at_risk`. |
|
||||
| `/due <date>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Set due date. Examples of valid `<date>` include `in 2 days`, `this Friday` and `December 31st`. See [Chronic](https://gitlab.com/gitlab-org/ruby/gems/gitlab-chronic#examples) for more examples. |
|
||||
| `/duplicate <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Close this item and mark as related to, and a duplicate of, `<item>`. |
|
||||
| `/epic <epic>` or `/set_parent <epic>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No |{{< icon name="check-circle" >}} Yes| Add to epic `<epic>` as a child item. The `<epic>` value should be in the format of `&epic`, `#epic`, `group&epic`, `group#epic`, or a URL to an epic. |
|
||||
| `/estimate <time>` or `/estimate_time <time>` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Set time estimate. For example, `/estimate 1mo 2w 3d 4h 5m`. For more information, see [Time tracking](time_tracking.md). |
|
||||
| `/health_status <value>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Set [health status](issues/managing_issues.md#health-status). Valid options for `<value>` are `on_track`, `needs_attention`, and `at_risk`. |
|
||||
| `/iteration *iteration:<iteration ID> or <iteration name>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Set iteration. For example, to set the `Late in July` iteration: `/iteration *iteration:"Late in July"`. |
|
||||
| `/iteration [cadence:<iteration cadence ID> or <iteration cadence name>] <--current or --next>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Set iteration to the current or next upcoming iteration of the referenced iteration cadence. For example, `/iteration [cadence:"Team cadence"] --current` sets the iteration to the current iteration of the iteration cadence named "Team cadence". [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/384885) in GitLab 16.9. |
|
||||
| `/iteration <--current or --next>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Set iteration to the current or next upcoming iteration when a group has one iteration cadence. For example, `/iteration --current` sets the iteration to the current iteration of the iteration cadence. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/384885) in GitLab 16.9. |
|
||||
| `/label ~label1 ~label2` or `/labels ~label1 ~label2` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Add one or more labels. Label names can also start without a tilde (`~`), but mixed syntax is not supported. |
|
||||
| `/link` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add a link and description to [linked resources](../../operations/incident_management/linked_resources.md) in an incident ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/374964) in GitLab 15.5). |
|
||||
| `/lock` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Lock the discussions. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/link` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add a link and description to [linked resources](../../operations/incident_management/linked_resources.md) in an incident. |
|
||||
| `/lock` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Lock the discussions. |
|
||||
| `/merge` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Merge changes. Depending on the project setting, this may be [when the pipeline succeeds](merge_requests/auto_merge.md), or adding to a [Merge Train](../../ci/pipelines/merge_trains.md). |
|
||||
| `/milestone %milestone` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Set milestone. |
|
||||
| `/move <path/to/group_or_project>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Move the work item to another group or project. Be careful when moving a work item to a location with different access rules. Before moving the work item, make sure it does not contain sensitive data. |
|
||||
| `/page <policy name>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Start escalations for the incident. |
|
||||
| `/parent_epic <epic>` | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Set parent epic to `<epic>`. The `<epic>` value should be in the format of `&epic`, `group&epic`, or a URL to an epic. If [the new look for epics](../group/epics/epic_work_items.md) is enabled, use `/set_parent` instead. |
|
||||
| `/promote_to_incident` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Promote issue to incident. In [GitLab 15.8 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/376760), you can also use the quick action when creating a new issue. |
|
||||
| `/promote_to_incident` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Promote issue to incident. You can also use the quick action when creating a new issue. |
|
||||
| `/promote` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Promote issue to epic. If [the new look for issues](issues/issue_work_items.md) is enabled, use `/promote_to epic` instead. |
|
||||
| `/publish` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Publish issue to an associated [Status Page](../../operations/incident_management/status_page.md). |
|
||||
| `/react :emoji:` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Toggle an emoji reaction. [Renamed](https://gitlab.com/gitlab-org/gitlab/-/issues/409884) from `/award` in GitLab 16.7. `/award` is still available as an aliased command. |
|
||||
| `/ready` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Set the [ready status](merge_requests/drafts.md#mark-merge-requests-as-ready) ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90361) in GitLab 15.1). |
|
||||
| `/ready` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Set the [ready status](merge_requests/drafts.md#mark-merge-requests-as-ready). |
|
||||
| `/reassign @user1 @user2` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Replace current assignees with those specified. |
|
||||
| `/reassign_reviewer @user1 @user2` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Replace current reviewers with those specified. |
|
||||
| `/rebase` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Rebase source branch on the latest commit of the target branch. For help, see [troubleshooting information](../../topics/git/troubleshooting_git.md). |
|
||||
| `/relabel ~label1 ~label2` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Replace current labels with those specified. |
|
||||
| `/relate <item1> <item2>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark items as related. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/remove_child <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Remove `<item>` as child. The `<item>` value should be in the format of `#item`, `group/project#item`, or a URL to the item. For issues, [the new look for issues](issues/issue_work_items.md) must be enabled. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/remove_child_epic <epic>` | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Remove child epic from `<epic>`. The `<epic>` value should be in the format of `&epic`, `group&epic`, or a URL to an epic. If [the new look for epics](../group/epics/epic_work_items.md) is enabled, use `/remove_child` instead. |
|
||||
| `/relate <item1> <item2>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Mark items as related. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. |
|
||||
| `/remove_child <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Remove `<item>` as child item. The `<item>` value should be in the format of `#item`, `group/project#item`, or a URL to the item. For issues, [the new look for issues](issues/issue_work_items.md) must be enabled. |
|
||||
| `/remove_contacts [contact:email1@example.com] [contact:email2@example.com]` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Remove one or more [CRM contacts](../crm/_index.md) |
|
||||
| `/remove_due_date` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Remove due date. |
|
||||
| `/remove_email email1 email2` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Remove up to six [email participants](service_desk/external_participants.md). This action is behind the feature flag `issue_email_participants`. Not supported in issue templates, merge requests, or epics. |
|
||||
| `/remove_epic` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Remove epic as parent item. If [the new look for epics](../group/epics/epic_work_items.md) is enabled, use `/remove_parent` instead. |
|
||||
| `/remove_estimate` or `/remove_time_estimate` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Remove time estimate. Alias `/remove_time_estimate` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16501) in GitLab 15.6. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/remove_estimate` or `/remove_time_estimate` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Remove time estimate. |
|
||||
| `/remove_iteration` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Remove iteration. |
|
||||
| `/remove_milestone` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Remove milestone. |
|
||||
| `/remove_parent` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Remove the parent from item. For issues, [the new look for issues](issues/issue_work_items.md) must be enabled. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/remove_parent_epic` | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Remove parent epic from epic. If [the new look for epics](../group/epics/epic_work_items.md) is enabled, use `/remove_parent` instead. |
|
||||
| `/remove_time_spent` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes |{{< icon name="check-circle" >}} Yes | Remove time spent. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/remove_parent` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Remove the parent from item. For issues, [the new look for issues](issues/issue_work_items.md) must be enabled. |
|
||||
| `/remove_time_spent` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes |{{< icon name="check-circle" >}} Yes | Remove time spent. |
|
||||
| `/remove_zoom` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Remove Zoom meeting from this issue. |
|
||||
| `/reopen` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Reopen. |
|
||||
| `/request_review @user1 @user2` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Assigns or requests a new review from one or more users. |
|
||||
| `/request_review me` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Assigns or requests a new review from one or more users. |
|
||||
| `/set_parent <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Set parent item. The `<item>` value should be in the format of `#IID`, reference, or a URL to an item. For issues, [the new look for issues](issues/issue_work_items.md) must be enabled. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/set_parent <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | Set parent item. The `<item>` value should be in the format of `#IID`, reference, or a URL to an item. For issues, [the new look for issues](issues/issue_work_items.md) must be enabled. |
|
||||
| `/severity <severity>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Set the severity. Issue type must be `Incident`. Options for `<severity>` are `S1` ... `S4`, `critical`, `high`, `medium`, `low`, `unknown`. |
|
||||
| `/shrug` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Add `¯\_(ツ)_/¯`. |
|
||||
| `/spend <time> [<date>]` or `/spend_time <time> [<date>]` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes| Add or subtract spent time. Optionally, specify the date that time was spent on. For example, `/spend 1mo 2w 3d 4h 5m 2018-08-26` or `/spend -1h 30m`. For more information, see [Time tracking](time_tracking.md). Alias `/spend_time` [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16501) in GitLab 15.6. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/spend <time> [<date>]` or `/spend_time <time> [<date>]` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes| Add or subtract spent time. Optionally, specify the date that time was spent on. For example, `/spend 1mo 2w 3d 4h 5m 2018-08-26` or `/spend -1h 30m`. For more information, see [Time tracking](time_tracking.md). |
|
||||
| `/submit_review` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Submit a pending review. |
|
||||
| `/subscribe` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Subscribe to notifications. |
|
||||
| `/tableflip` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Add `(╯°□°)╯︵ ┻━┻`. |
|
||||
| `/target_branch <local branch name>` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Set target branch. |
|
||||
| `/timeline <timeline comment> \| <date(YYYY-MM-DD)> <time(HH:MM)>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add a timeline event to this incident. For example, `/timeline DB load spiked \| 2022-09-07 09:30`. ([introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/368721) in GitLab 15.4). |
|
||||
| `/timeline <timeline comment> \| <date(YYYY-MM-DD)> <time(HH:MM)>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add a timeline event to this incident. For example, `/timeline DB load spiked \| 2022-09-07 09:30`. |
|
||||
| `/title <new title>` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Change title. |
|
||||
| `/todo` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Add a to-do item. |
|
||||
| `/unapprove` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Unapprove the merge request. |
|
||||
|
|
@ -147,21 +143,26 @@ To auto-format this table, use the VS Code Markdown Table formatter: `https://do
|
|||
| `/unassign` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Remove all assignees. |
|
||||
| `/unlabel ~label1 ~label2` or `/remove_label ~label1 ~label2` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Remove specified labels. |
|
||||
| `/unlabel` or `/remove_label` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Remove all labels. |
|
||||
| `/unlink <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No |{{< icon name="check-circle" >}} Yes| Remove link with to the provided issue. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/414400) in GitLab 16.1). For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled. |
|
||||
| `/unlock` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes |{{< icon name="check-circle" >}} Yes| Unlock the discussions. For epics, [the new look for epics](../group/epics/epic_work_items.md) must be enabled.|
|
||||
| `/unlink <item>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No |{{< icon name="check-circle" >}} Yes| Remove link with to the provided issue. The `<item>` value should be in the format of `#item`, `group/project#item`, or the full URL. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/414400) in GitLab 16.1). |
|
||||
| `/unlock` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes |{{< icon name="check-circle" >}} Yes| Unlock the discussions.|
|
||||
| `/unsubscribe` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Unsubscribe from notifications. |
|
||||
| `/weight <value>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Set weight. Valid values are integers like `0`, `1`, or `2`. |
|
||||
| `/zoom <Zoom URL>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add a Zoom meeting to this issue or incident. In [GitLab 15.3 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/230853) users on GitLab Premium can add a short description when [adding a Zoom link to an incident](../../operations/incident_management/linked_resources.md#link-zoom-meetings-from-an-incident). |
|
||||
| `/zoom <Zoom URL>` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Add a Zoom meeting to this issue or incident. Users on GitLab Premium can add a short description when [adding a Zoom link to an incident](../../operations/incident_management/linked_resources.md#link-zoom-meetings-from-an-incident). |
|
||||
|
||||
## Work items
|
||||
|
||||
{{< history >}}
|
||||
|
||||
- Executing quick actions from comments [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/391282) in GitLab 15.10.
|
||||
- Epics as work items [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
Work items in GitLab include [tasks](../tasks.md) and [OKRs](../okrs.md).
|
||||
Work items in GitLab include:
|
||||
|
||||
- [Tasks](../tasks.md)
|
||||
- [OKRs](../okrs.md)
|
||||
- [Epics](../group/epics/_index.md) (see [Issues, merge requests, and epics](#issues-merge-requests-and-epics))
|
||||
|
||||
The following quick actions can be applied through the description field when editing or commenting on work items.
|
||||
|
||||
<!--
|
||||
|
|
@ -176,7 +177,6 @@ To auto-format this table, use the VS Code Markdown Table formatter: `https://do
|
|||
| `/assign me` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Assign yourself. |
|
||||
| `/add_child <work_item>` | {{< icon name="dotted-circle" >}} No | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Add child to `<work_item>`. The `<work_item>` value should be in the format of `#item`, `group/project#item`, or a URL to a work item. Multiple work items can be added as child items at the same time. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/420797) in GitLab 16.5. |
|
||||
| `/award :emoji:` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Toggle an emoji reaction. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/412275) in GitLab 16.5 |
|
||||
| `/cc @user` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Mention a user. In GitLab 15.0 and later, this command performs no action. You can instead type `CC @user` or only `@user`. |
|
||||
| `/checkin_reminder <cadence>` | {{< icon name="dotted-circle" >}} No| {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | Schedule [check-in reminders](../okrs.md#schedule-okr-check-in-reminders). Options are `weekly`, `twice-monthly`, `monthly`, or `never` (default). [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/422761) in GitLab 16.4 with flags named `okrs_mvc` and `okr_checkin_reminders`. |
|
||||
| `/clear_health_status` | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | {{< icon name="check-circle" >}} Yes | Clear [health status](issues/managing_issues.md#health-status). |
|
||||
| `/clear_weight` | {{< icon name="check-circle" >}} Yes | {{< icon name="dotted-circle" >}} No | {{< icon name="dotted-circle" >}} No | Clear weight. |
|
||||
|
|
|
|||
|
|
@ -16,15 +16,16 @@ description: Estimates, time spent, and reporting.
|
|||
{{< history >}}
|
||||
|
||||
- Time tracking for tasks [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/438577) in GitLab 17.0.
|
||||
- Time tracking for epics [introduced](https://gitlab.com/groups/gitlab-org/-/epics/12396) in GitLab 17.5. [The new look for epics](../group/epics/epic_work_items.md) must be enabled.
|
||||
- Time tracking for epics [introduced](https://gitlab.com/groups/gitlab-org/-/epics/12396) in GitLab 17.5. [The new look for epics](../group/epics/_index.md#epics-as-work-items) must be enabled.
|
||||
- Minimum role to add, edit, and remove estimate [changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169256) from Reporter to Planner in GitLab 17.7.
|
||||
- Time tracking for epics [generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/468310) in GitLab 18.1.
|
||||
|
||||
{{< /history >}}
|
||||
|
||||
Time tracking helps record and manage time invested in GitLab work items.
|
||||
Time tracking:
|
||||
|
||||
- Records actual time spent on issues, merge requests, epics [with the new look](../group/epics/epic_work_items.md), and tasks.
|
||||
- Records actual time spent on issues, merge requests, epics, and tasks.
|
||||
- Estimates total time needed for completion.
|
||||
- Provides detailed reports of time entries.
|
||||
- Calculates totals using standardized time units.
|
||||
|
|
|
|||
|
|
@ -127,10 +127,10 @@ Alternatively, you can add linked items using [quick actions](../project/quick_a
|
|||
- `/blocks`
|
||||
- `/blocked_by`
|
||||
|
||||
For detailed instructions specific to each work item type, see the relevant documentation:
|
||||
For detailed information specific to each work item type, see the relevant documentation:
|
||||
|
||||
- [Linked issues](../project/issues/related_issues.md#add-a-linked-issue)
|
||||
- [Linked epics](../group/epics/linked_epics.md#add-a-linked-epic)
|
||||
- [Linked epics](../group/epics/linked_epics.md#add-a-linked-item)
|
||||
- [Linked tasks](../tasks.md#linked-items-in-tasks)
|
||||
- [Linked OKRs](../okrs.md#linked-items-in-okrs)
|
||||
|
||||
|
|
|
|||
|
|
@ -48,12 +48,12 @@ module Gitlab
|
|||
private
|
||||
|
||||
def compat_ip_whitelist
|
||||
base = Settings.monitoring.ip_whitelist.map(&IPAddr.method(:new))
|
||||
base = Settings.monitoring.ip_whitelist.map { |ip| IPAddr.new(ip) }
|
||||
|
||||
# Add compatible addresses to match IPv4 allow list entries against IPv4 request IPs
|
||||
# that were mapped to IPv6 addresses on the kernel level.
|
||||
# https://docs.kernel.org/networking/ip-sysctl.html#proc-sys-net-ipv6-variables
|
||||
compats = base.select(&:ipv4?).map(&:ipv4_compat)
|
||||
compats = base.select(&:ipv4?).map(&:ipv4_mapped)
|
||||
|
||||
base + compats
|
||||
end
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ module Gitlab
|
|||
Gitlab::Redis::Sessions,
|
||||
Gitlab::Redis::SharedState,
|
||||
Gitlab::Redis::TraceChunks,
|
||||
Gitlab::Redis::MemoryStoreTraceChunks,
|
||||
Gitlab::Redis::Chat,
|
||||
Gitlab::Redis::Workhorse
|
||||
].freeze
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Gitlab
|
||||
module Redis
|
||||
class MemoryStoreTraceChunks < ::Gitlab::Redis::Wrapper
|
||||
# The data we store on TraceChunks used to be stored on SharedState.
|
||||
class << self
|
||||
def config_fallback
|
||||
SharedState
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -2,10 +2,16 @@
|
|||
|
||||
module Gitlab
|
||||
module Redis
|
||||
class TraceChunks < ::Gitlab::Redis::Wrapper
|
||||
# The data we store on TraceChunks used to be stored on SharedState.
|
||||
def self.config_fallback
|
||||
SharedState
|
||||
class TraceChunks < ::Gitlab::Redis::MultiStoreWrapper
|
||||
class << self
|
||||
# The data we store on TraceChunks used to be stored on SharedState.
|
||||
def config_fallback
|
||||
SharedState
|
||||
end
|
||||
|
||||
def multistore
|
||||
MultiStore.create_using_pool(MemoryStoreTraceChunks.pool, pool, store_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@ module Gitlab
|
|||
class << self
|
||||
delegate :flush, to: :tracker
|
||||
|
||||
def enabled?
|
||||
tracker.enabled?
|
||||
end
|
||||
|
||||
def frontend_connect_directly_to_snowplow_collector?
|
||||
Gitlab::CurrentSettings.snowplow_enabled? && !Gitlab::CurrentSettings.snowplow_collector_hostname.blank?
|
||||
end
|
||||
|
|
|
|||
|
|
@ -52,10 +52,6 @@ module Gitlab
|
|||
end
|
||||
end
|
||||
|
||||
def enabled?
|
||||
true
|
||||
end
|
||||
|
||||
def app_id
|
||||
if Gitlab::CurrentSettings.snowplow_enabled?
|
||||
Gitlab::CurrentSettings.snowplow_app_id
|
||||
|
|
|
|||
|
|
@ -26,11 +26,6 @@ module Gitlab
|
|||
cookieDomain: COOKIE_DOMAIN
|
||||
)
|
||||
end
|
||||
|
||||
override :enabled?
|
||||
def enabled?
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -69399,9 +69399,6 @@ msgstr ""
|
|||
msgid "We're experiencing difficulties and this tab content is currently unavailable."
|
||||
msgstr ""
|
||||
|
||||
msgid "We're sorry, your GitLab Duo Enterprise trial could not be created because our system did not respond successfully."
|
||||
msgstr ""
|
||||
|
||||
msgid "We're sorry, your trial could not be created because our system did not respond successfully."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -70431,6 +70428,9 @@ msgstr ""
|
|||
msgid "WorkItem|An error occurred while getting work item counts."
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|An error occurred while making status default."
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|An error occurred while removing the status."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -70796,6 +70796,9 @@ msgstr ""
|
|||
msgid "WorkItem|Magenta"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Make default for %{defaultState} issues"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Mark as done"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
"@gitlab/duo-ui": "^8.24.0",
|
||||
"@gitlab/favicon-overlay": "2.0.0",
|
||||
"@gitlab/fonts": "^1.3.0",
|
||||
"@gitlab/query-language-rust": "0.11.4",
|
||||
"@gitlab/query-language-rust": "0.12.0",
|
||||
"@gitlab/svgs": "3.137.0",
|
||||
"@gitlab/ui": "114.8.1",
|
||||
"@gitlab/vue-router-vue3": "npm:vue-router@4.5.1",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'gitlab-qa', '~> 15', '>= 15.5.0', require: 'gitlab/qa'
|
||||
gem 'gitlab_quality-test_tooling', '~> 2.15.2', require: false
|
||||
gem 'gitlab_quality-test_tooling', '~> 2.15.3', require: false
|
||||
gem 'gitlab-utils', path: '../gems/gitlab-utils'
|
||||
gem 'activesupport', '~> 7.1.5.1' # This should stay in sync with the root's Gemfile
|
||||
gem 'allure-rspec', '~> 2.27.0'
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ GEM
|
|||
rainbow (>= 3, < 4)
|
||||
table_print (= 1.5.7)
|
||||
zeitwerk (>= 2, < 3)
|
||||
gitlab_quality-test_tooling (2.15.2)
|
||||
gitlab_quality-test_tooling (2.15.3)
|
||||
activesupport (>= 7.0, < 7.3)
|
||||
amatch (~> 0.4.1)
|
||||
fog-google (~> 1.24, >= 1.24.1)
|
||||
|
|
@ -385,7 +385,7 @@ DEPENDENCIES
|
|||
gitlab-orchestrator!
|
||||
gitlab-qa (~> 15, >= 15.5.0)
|
||||
gitlab-utils!
|
||||
gitlab_quality-test_tooling (~> 2.15.2)
|
||||
gitlab_quality-test_tooling (~> 2.15.3)
|
||||
googleauth (~> 1.9.0)
|
||||
influxdb-client (~> 3.2)
|
||||
junit_merge (~> 0.1.2)
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@ ee/spec/frontend/admin/subscriptions/show/components/subscription_breakdown_spec
|
|||
ee/spec/frontend/analytics/analytics_dashboards/components/analytics_dashboards_breadcrumbs_spec.js
|
||||
ee/spec/frontend/analytics/analytics_dashboards/components/analytics_data_explorer_spec.js
|
||||
ee/spec/frontend/analytics/cycle_analytics/vsa_settings/components/value_stream_form_content_spec.js
|
||||
ee/spec/frontend/analytics/devops_reports/devops_adoption/components/devops_adoption_app_spec.js
|
||||
ee/spec/frontend/analytics/group_ci_cd_analytics/components/release_stats_card_spec.js
|
||||
ee/spec/frontend/approvals/mr_edit/mr_rules_spec.js
|
||||
ee/spec/frontend/approvals/project_settings/project_rules_spec.js
|
||||
ee/spec/frontend/boards/components/board_content_sidebar_spec.js
|
||||
ee/spec/frontend/boards/components/board_list_spec.js
|
||||
ee/spec/frontend/boards/components/board_new_issue_spec.js
|
||||
ee/spec/frontend/boards/components/epics_swimlanes_spec.js
|
||||
ee/spec/frontend/ci/secrets/components/secrets_breadcrumbs_spec.js
|
||||
|
|
@ -42,7 +40,6 @@ spec/frontend/__helpers__/vue_test_utils_helper_spec.js
|
|||
spec/frontend/access_tokens/index_spec.js
|
||||
spec/frontend/admin/broadcast_messages/components/base_spec.js
|
||||
spec/frontend/alert_management/components/alert_management_table_spec.js
|
||||
spec/frontend/boards/board_list_spec.js
|
||||
spec/frontend/boards/components/board_content_sidebar_spec.js
|
||||
spec/frontend/boards/components/board_content_spec.js
|
||||
spec/frontend/boards/components/board_options_spec.js
|
||||
|
|
|
|||
|
|
@ -81,6 +81,21 @@ RSpec.describe HealthCheckController, :request_store, :use_clean_rails_memory_st
|
|||
expect(response.media_type).to eq 'application/json'
|
||||
expect(json_response['healthy']).to be true
|
||||
end
|
||||
|
||||
context 'if the request IP was mapped to an IPv6' do
|
||||
before do
|
||||
allow(Gitlab::RequestContext.instance)
|
||||
.to receive(:client_ip)
|
||||
.and_return("::ffff:#{whitelisted_ip}")
|
||||
end
|
||||
|
||||
it 'supports successful plaintext response' do
|
||||
get :index
|
||||
|
||||
expect(response).to be_successful
|
||||
expect(response.media_type).to eq 'text/plain'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when a service is down but NO access token' do
|
||||
|
|
|
|||
|
|
@ -29,6 +29,57 @@ class CustomEnvironment extends TestEnvironment {
|
|||
// TODO: Implement robust vue-demi switching logic.
|
||||
// https://gitlab.com/groups/gitlab-org/-/epics/15340
|
||||
/^\[Vue warn\]: \(deprecation GLOBAL_PRIVATE_UTIL\)/,
|
||||
|
||||
// [`@vue/compat`][1] provides configurable Vue 2 compatible
|
||||
// APIs/behaviors, via flags. Some of these are considered
|
||||
// ["fully compatible"][2], i.e., should still work if the given flag
|
||||
// is enabled.
|
||||
//
|
||||
// When application code makes use of these Vue 2 APIs/behaviours,
|
||||
// `@vue/compat` logs a warning to the console. These do not need to
|
||||
// fail tests, since things should still work.
|
||||
//
|
||||
// [1]: https://v3-migration.vuejs.org/migration-build.html
|
||||
// [2]: https://v3-migration.vuejs.org/migration-build.html#fully-compatible
|
||||
/^\[Vue warn\]: \(deprecation GLOBAL_MOUNT\)/,
|
||||
/^\[Vue warn\]: \(deprecation GLOBAL_EXTEND\)/,
|
||||
/^\[Vue warn\]: \(deprecation GLOBAL_PROTOTYPE\)/,
|
||||
/^\[Vue warn\]: \(deprecation GLOBAL_SET\)/,
|
||||
/^\[Vue warn\]: \(deprecation GLOBAL_DELETE\)/,
|
||||
/^\[Vue warn\]: \(deprecation GLOBAL_OBSERVABLE\)/,
|
||||
/^\[Vue warn\]: \(deprecation CONFIG_KEY_CODES\)/,
|
||||
/^\[Vue warn\]: \(deprecation CONFIG_WHITESPACE\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_SET\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_DELETE\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_EVENT_EMITTER\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_EVENT_HOOKS\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_CHILDREN\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_LISTENERS\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_SCOPED_SLOTS\)/,
|
||||
/^\[Vue warn\]: \(deprecation INSTANCE_ATTRS_CLASS_STYLE\)/,
|
||||
/^\[Vue warn\]: \(deprecation OPTIONS_DATA_FN\)/,
|
||||
/^\[Vue warn\]: \(deprecation OPTIONS_DATA_MERGE\)/,
|
||||
/^\[Vue warn\]: \(deprecation OPTIONS_BEFORE_DESTROY\)/,
|
||||
/^\[Vue warn\]: \(deprecation OPTIONS_DESTROYED\)/,
|
||||
/^\[Vue warn\]: \(deprecation WATCH_ARRAY\)/,
|
||||
/^\[Vue warn\]: \(deprecation V_ON_KEYCODE_MODIFIER\)/,
|
||||
/^\[Vue warn\]: \(deprecation CUSTOM_DIR\)/,
|
||||
/^\[Vue warn\]: \(deprecation ATTR_FALSE_VALUE\)/,
|
||||
/^\[Vue warn\]: \(deprecation ATTR_ENUMERATED_COERCION\)/,
|
||||
/^\[Vue warn\]: \(deprecation TRANSITION_GROUP_ROOT\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPONENT_ASYNC\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPONENT_FUNCTIONAL\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPONENT_V_MODEL\)/,
|
||||
/^\[Vue warn\]: \(deprecation RENDER_FUNCTION\)/,
|
||||
/^\[Vue warn\]: \(deprecation FILTERS\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_IS_ON_ELEMENT\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_V_BIND_SYNC\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_V_BIND_PROP\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_V_BIND_OBJECT_ORDER\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_V_ON_NATIVE\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_V_FOR_REF\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_NATIVE_TEMPLATE\)/,
|
||||
/^\[Vue warn\]: \(deprecation COMPILER_FILTERS\)/,
|
||||
],
|
||||
// TODO: Remove this and replace with localized calls to `useConsoleWatcherThrowsImmediately`
|
||||
// https://gitlab.com/gitlab-org/gitlab/-/issues/396779#note_1788506238
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import waitForPromises from 'helpers/wait_for_promises';
|
|||
import ActivityWidget from '~/homepage/components/activity_widget.vue';
|
||||
import * as Sentry from '~/sentry/sentry_browser_wrapper';
|
||||
import axios from '~/lib/utils/axios_utils';
|
||||
import VisibilityChangeDetector from '~/homepage/components/visibility_change_detector.vue';
|
||||
|
||||
jest.mock('~/sentry/sentry_browser_wrapper');
|
||||
|
||||
|
|
@ -17,6 +18,7 @@ describe('ActivityWidget', () => {
|
|||
const findSkeletonLoader = () => wrapper.findComponent(GlSkeletonLoader);
|
||||
const findAlert = () => wrapper.findComponent(GlAlert);
|
||||
const findEventsList = () => wrapper.findByTestId('events-list');
|
||||
const findDetector = () => wrapper.findComponent(VisibilityChangeDetector);
|
||||
|
||||
function createWrapper() {
|
||||
gon.current_username = MOCK_CURRENT_USERNAME;
|
||||
|
|
@ -70,4 +72,20 @@ describe('ActivityWidget', () => {
|
|||
expect(wrapper.findByTestId(EVENT_TESTID).exists()).toBe(true);
|
||||
expect(wrapper.findByTestId(EVENT_TESTID).text()).toBe(EVENT_TEXT);
|
||||
});
|
||||
|
||||
describe('refresh functionality', () => {
|
||||
it('refreshes on becoming visible again', async () => {
|
||||
const reloadSpy = jest.spyOn(ActivityWidget.methods, 'reload').mockImplementation(() => {});
|
||||
|
||||
createWrapper();
|
||||
await waitForPromises();
|
||||
reloadSpy.mockClear();
|
||||
|
||||
findDetector().vm.$emit('visible');
|
||||
await waitForPromises();
|
||||
|
||||
expect(reloadSpy).toHaveBeenCalled();
|
||||
reloadSpy.mockRestore();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import RecentlyViewedWidget from '~/homepage/components/recently_viewed_widget.v
|
|||
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
|
||||
import RecentlyViewedItemsQuery from '~/homepage/graphql/queries/recently_viewed_items.query.graphql';
|
||||
import * as Sentry from '~/sentry/sentry_browser_wrapper';
|
||||
import VisibilityChangeDetector from '~/homepage/components/visibility_change_detector.vue';
|
||||
|
||||
Vue.use(VueApollo);
|
||||
|
||||
|
|
@ -74,6 +75,7 @@ describe('RecentlyViewedWidget', () => {
|
|||
const findItemLinks = () => wrapper.findAll('a[href^="/"]');
|
||||
const findItemIcons = () => wrapper.findAllComponents(GlIcon);
|
||||
const findTooltipComponents = () => wrapper.findAllComponents(TooltipOnTruncate);
|
||||
const findDetector = () => wrapper.findComponent(VisibilityChangeDetector);
|
||||
|
||||
describe('loading state', () => {
|
||||
it('shows skeleton loaders while fetching data', () => {
|
||||
|
|
@ -195,6 +197,22 @@ describe('RecentlyViewedWidget', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('refresh functionality', () => {
|
||||
beforeEach(async () => {
|
||||
createComponent();
|
||||
await waitForPromises();
|
||||
});
|
||||
|
||||
it('refreshes on becoming visible again', async () => {
|
||||
const refetchSpy = jest.spyOn(wrapper.vm.$apollo.queries.items, 'refetch');
|
||||
findDetector().vm.$emit('visible');
|
||||
await waitForPromises();
|
||||
|
||||
expect(refetchSpy).toHaveBeenCalled();
|
||||
refetchSpy.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
describe('items rendering', () => {
|
||||
beforeEach(async () => {
|
||||
createComponent();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import Vue, { nextTick } from 'vue';
|
||||
import Vue from 'vue';
|
||||
import VueApollo from 'vue-apollo';
|
||||
import { GlButton, GlCollapsibleListbox } from '@gitlab/ui';
|
||||
import { GlCollapsibleListbox } from '@gitlab/ui';
|
||||
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
|
||||
import createMockApollo from 'helpers/mock_apollo_helper';
|
||||
import waitForPromises from 'helpers/wait_for_promises';
|
||||
|
|
@ -9,6 +9,7 @@ import TodoItem from '~/todos/components/todo_item.vue';
|
|||
import getTodosQuery from '~/todos/components/queries/get_todos.query.graphql';
|
||||
import { TABS_INDICES } from '~/todos/constants';
|
||||
import * as Sentry from '~/sentry/sentry_browser_wrapper';
|
||||
import VisibilityChangeDetector from '~/homepage/components/visibility_change_detector.vue';
|
||||
import { todosResponse } from '../../todos/mock_data';
|
||||
|
||||
Vue.use(VueApollo);
|
||||
|
|
@ -33,19 +34,11 @@ describe('TodosWidget', () => {
|
|||
|
||||
const findTodoItems = () => wrapper.findAllComponents(TodoItem);
|
||||
const findFirstTodoItem = () => wrapper.findComponent(TodoItem);
|
||||
const findRefreshButton = () => wrapper.findComponent(GlButton);
|
||||
const findEmptyState = () => wrapper.findByText('All your to-do items are done.');
|
||||
const findAllTodosLink = () => wrapper.find('a[href="/dashboard/todos"]');
|
||||
const findDetector = () => wrapper.findComponent(VisibilityChangeDetector);
|
||||
|
||||
describe('rendering', () => {
|
||||
it('shows a refresh button with correct props', () => {
|
||||
createComponent();
|
||||
|
||||
const refreshButton = findRefreshButton();
|
||||
expect(refreshButton.exists()).toBe(true);
|
||||
expect(refreshButton.props('icon')).toBe('retry');
|
||||
});
|
||||
|
||||
it('shows a link to all todos', () => {
|
||||
createComponent();
|
||||
|
||||
|
|
@ -56,21 +49,6 @@ describe('TodosWidget', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('loading state', () => {
|
||||
it('shows loading state on refresh button while fetching todos', () => {
|
||||
createComponent();
|
||||
|
||||
expect(findRefreshButton().props('loading')).toBe(true);
|
||||
});
|
||||
|
||||
it('hides loading state after todos are fetched', async () => {
|
||||
createComponent();
|
||||
await waitForPromises();
|
||||
|
||||
expect(findRefreshButton().props('loading')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('empty state', () => {
|
||||
it('shows empty state when there are no todos', async () => {
|
||||
const emptyResponse = {
|
||||
|
|
@ -272,27 +250,13 @@ describe('TodosWidget', () => {
|
|||
await waitForPromises();
|
||||
});
|
||||
|
||||
it('refetches todos when refresh button is clicked', async () => {
|
||||
todosQuerySuccessHandler.mockClear();
|
||||
|
||||
await findRefreshButton().vm.$emit('click');
|
||||
it('refreshes on becoming visible again', async () => {
|
||||
const refetchSpy = jest.spyOn(wrapper.vm.$apollo.queries.todos, 'refetch');
|
||||
findDetector().vm.$emit('visible');
|
||||
await waitForPromises();
|
||||
|
||||
expect(todosQuerySuccessHandler).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('shows loading state during refresh', async () => {
|
||||
const refreshButton = findRefreshButton();
|
||||
|
||||
await waitForPromises();
|
||||
expect(refreshButton.props('loading')).toBe(false);
|
||||
|
||||
refreshButton.vm.$emit('click');
|
||||
await nextTick();
|
||||
expect(refreshButton.props('loading')).toBe(true);
|
||||
|
||||
await waitForPromises();
|
||||
expect(refreshButton.props('loading')).toBe(false);
|
||||
expect(refetchSpy).toHaveBeenCalled();
|
||||
refetchSpy.mockRestore();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
|
||||
import VisibilityChangeDetector from '~/homepage/components/visibility_change_detector.vue';
|
||||
import waitForPromises from 'helpers/wait_for_promises';
|
||||
|
||||
describe('VisibilityChangeDetector', () => {
|
||||
let wrapper;
|
||||
|
||||
const createComponent = () => {
|
||||
wrapper = shallowMountExtended(VisibilityChangeDetector, {
|
||||
slots: {
|
||||
default: '<div class="test-content">Test Content</div>',
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
jest.spyOn(document, 'addEventListener');
|
||||
jest.spyOn(document, 'removeEventListener');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.restoreAllMocks();
|
||||
});
|
||||
|
||||
describe('lifecycle', () => {
|
||||
it('adds visibility change event listener on mount', () => {
|
||||
createComponent();
|
||||
|
||||
expect(document.addEventListener).toHaveBeenCalledWith(
|
||||
'visibilitychange',
|
||||
wrapper.vm.handleVisibilityChanged,
|
||||
);
|
||||
});
|
||||
|
||||
it('removes visibility change event listener on destroy', () => {
|
||||
createComponent();
|
||||
|
||||
wrapper.destroy();
|
||||
|
||||
expect(document.removeEventListener).toHaveBeenCalledWith(
|
||||
'visibilitychange',
|
||||
wrapper.vm.handleVisibilityChanged,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('visibility change handling', () => {
|
||||
beforeEach(() => {
|
||||
createComponent();
|
||||
});
|
||||
|
||||
it('emits `visible` event when document becomes visible', async () => {
|
||||
document.dispatchEvent(new Event('visibilitychange'));
|
||||
await waitForPromises();
|
||||
|
||||
expect(wrapper.emitted('visible')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('does not emit visible event when document is hidden', async () => {
|
||||
Object.defineProperty(document, 'hidden', {
|
||||
writable: true,
|
||||
value: true,
|
||||
});
|
||||
|
||||
document.dispatchEvent(new Event('visibilitychange'));
|
||||
await waitForPromises();
|
||||
|
||||
expect(wrapper.emitted('visible')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('slot rendering', () => {
|
||||
it('renders slot content', () => {
|
||||
createComponent();
|
||||
|
||||
expect(wrapper.find('.test-content').exists()).toBe(true);
|
||||
expect(wrapper.find('.test-content').text()).toBe('Test Content');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -388,7 +388,7 @@ describe('Issuable output', () => {
|
|||
|
||||
it('removes the css class from the document body when unmounting', () => {
|
||||
wrapper.findComponent(StickyHeader).vm.$emit('show');
|
||||
wrapper.vm.$destroy();
|
||||
wrapper.destroy();
|
||||
expect(document.body.classList?.contains('issuable-sticky-header-visible')).toBe(false);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ describe('Discussion navigation mixin', () => {
|
|||
pinia = createTestingPinia({ plugins: [globalAccessorPlugin] });
|
||||
useLegacyDiffs();
|
||||
useNotes().discussions = createDiscussions();
|
||||
useNotes().setCurrentDiscussionId.mockResolvedValue();
|
||||
useNotes().setCurrentDiscussionId.mockReturnValue();
|
||||
wrapper = shallowMount(createComponent(), { pinia });
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import TodoSnoozedTimestamp from '~/todos/components/todo_snoozed_timestamp.vue'
|
|||
import { useFakeDate } from 'helpers/fake_date';
|
||||
import { MR_REVIEW_REQUEST_TODO } from '../mock_data';
|
||||
|
||||
describe('TodoItem', () => {
|
||||
describe('TodoItemTimestamp', () => {
|
||||
let wrapper;
|
||||
|
||||
const mockCurrentTime = new Date('2024-12-18T13:24:00');
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ describe('Markdown field header component', () => {
|
|||
await nextTick();
|
||||
|
||||
expect(findCloneDiv().element.innerHTML).toBe(
|
||||
'lorem ipsum dolor sit amet lorem <img src="<span class="js-highlight js-highlight-active" style="background-color: rgb(230, 228, 242); display: inline-block;">prompt</span>">',
|
||||
'lorem ipsum dolor sit amet lorem <img src="<span class="js-highlight js-highlight-active" style="background-color: rgb(233, 190, 116); display: inline-block;">prompt</span>">',
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -6,22 +6,9 @@ RSpec.describe TrackingHelper do
|
|||
describe '#tracking_attrs' do
|
||||
using RSpec::Parameterized::TableSyntax
|
||||
|
||||
let(:snowplow_enabled) { true }
|
||||
let(:input) { %w[a b c] }
|
||||
let(:result) { { data: { track_label: 'a', track_action: 'b', track_property: 'c' } } }
|
||||
|
||||
before do
|
||||
allow(Gitlab::Tracking).to receive(:enabled?).and_return(snowplow_enabled)
|
||||
end
|
||||
|
||||
context 'when tracking is disabled' do
|
||||
let(:snowplow_enabled) { false }
|
||||
|
||||
it 'returns no data if snowplow is disabled' do
|
||||
expect(helper.tracking_attrs(*input)).to eq({})
|
||||
end
|
||||
end
|
||||
|
||||
it 'returns data hash' do
|
||||
expect(helper.tracking_attrs(*input)).to eq(result)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -60,10 +60,10 @@ RSpec.describe Gitlab::Middleware::BasicHealthCheck do
|
|||
|
||||
context 'IPv6 compatibility' do
|
||||
before do
|
||||
env['REMOTE_ADDR'] = '::127.0.0.1'
|
||||
env['REMOTE_ADDR'] = '::ffff:127.0.0.1'
|
||||
end
|
||||
|
||||
it 'returns 200 response when entry is IPv4 compatible' do
|
||||
it 'returns 200 response when entry is a mapped IPv4' do
|
||||
allow(Settings.monitoring).to receive(:ip_whitelist).and_return(['127.0.0.1'])
|
||||
expect(app).not_to receive(:call)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Gitlab::Redis::MemoryStoreTraceChunks, feature_category: :shared do
|
||||
include_examples "redis_new_instance_shared_examples", 'memory_store_trace_chunks', Gitlab::Redis::SharedState
|
||||
end
|
||||
|
|
@ -4,4 +4,10 @@ require 'spec_helper'
|
|||
|
||||
RSpec.describe Gitlab::Redis::TraceChunks do
|
||||
include_examples "redis_new_instance_shared_examples", 'trace_chunks', Gitlab::Redis::SharedState
|
||||
include_examples "multi_store_wrapper_shared_examples"
|
||||
|
||||
it 'migrates from self to MemoryStoreTraceChunks' do
|
||||
expect(described_class.multistore.secondary_pool).to eq(described_class.pool)
|
||||
expect(described_class.multistore.primary_pool).to eq(Gitlab::Redis::MemoryStoreTraceChunks.pool)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -241,28 +241,6 @@ RSpec.describe Gitlab::Tracking::Destinations::Snowplow, :do_not_stub_snowplow_b
|
|||
end
|
||||
end
|
||||
|
||||
describe '#enabled?' do
|
||||
context 'when snowplow is enabled' do
|
||||
before do
|
||||
stub_application_setting(snowplow_enabled?: true)
|
||||
end
|
||||
|
||||
it 'returns true' do
|
||||
expect(subject.enabled?).to be_truthy
|
||||
end
|
||||
end
|
||||
|
||||
context 'when snowplow is disabled' do
|
||||
before do
|
||||
stub_application_setting(snowplow_enabled?: false)
|
||||
end
|
||||
|
||||
it 'returns true' do
|
||||
expect(subject.enabled?).to be_truthy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#app_id' do
|
||||
subject { described_class.new.app_id }
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ RSpec.describe EventForward::EventForwardController, feature_category: :product_
|
|||
|
||||
before do
|
||||
allow(Gitlab::Tracking).to receive(:tracker).and_return(tracker)
|
||||
allow(tracker).to receive_messages(emit_event_payload: nil, enabled?: true, hostname: 'localhost')
|
||||
allow(tracker).to receive_messages(emit_event_payload: nil, hostname: 'localhost')
|
||||
allow(Gitlab::Tracking::EventEligibilityChecker).to receive(:new).and_return(event_eligibility_checker)
|
||||
allow(event_eligibility_checker).to receive(:eligible?).and_return(true)
|
||||
allow(EventForward::Logger).to receive(:build).and_return(logger)
|
||||
|
|
|
|||
|
|
@ -13,12 +13,13 @@ module TestEnv
|
|||
result = yield
|
||||
duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
||||
|
||||
duration = duration.round(3)
|
||||
@durations_mutex.synchronize { @component_durations[name] ||= duration }
|
||||
|
||||
name = name.to_s
|
||||
display_name = name.start_with?('setup_') ? name.delete_prefix('setup_').tr('_', ' ').capitalize : name
|
||||
puts "==> #{display_name} set up in #{duration} seconds...\n"
|
||||
if duration > 0.5
|
||||
duration = duration.round(3)
|
||||
@durations_mutex.synchronize { @component_durations[name] ||= duration }
|
||||
name = name.to_s
|
||||
display_name = name.start_with?('setup_') ? name.delete_prefix('setup_').tr('_', ' ').capitalize : name
|
||||
puts "==> #{display_name} set up in #{duration} seconds..."
|
||||
end
|
||||
|
||||
result
|
||||
end
|
||||
|
|
@ -286,7 +287,6 @@ module TestEnv
|
|||
measure_setup_duration('GitLab Workhorse') do
|
||||
# Always rebuild the config file
|
||||
if skip_compile_workhorse?
|
||||
puts "==> GitLab Workhorse up to date, skipping rebuild..."
|
||||
Gitlab::SetupHelper::Workhorse.create_configuration(workhorse_dir, nil, force: true)
|
||||
else
|
||||
FileUtils.rm_rf(workhorse_dir)
|
||||
|
|
@ -506,13 +506,13 @@ module TestEnv
|
|||
end
|
||||
|
||||
def component_timed_setup(component, install_dir:, version:, task:, fresh_install: true, task_args: [])
|
||||
measure_setup_duration(component) do
|
||||
ensure_component_dir_name_is_correct!(component, install_dir)
|
||||
ensure_component_dir_name_is_correct!(component, install_dir)
|
||||
|
||||
# On CI, once installed, components never need update
|
||||
next if File.exist?(install_dir) && ci?
|
||||
# On CI, once installed, components never need update
|
||||
return if File.exist?(install_dir) && ci?
|
||||
|
||||
if component_needs_update?(install_dir, version)
|
||||
if component_needs_update?(install_dir, version)
|
||||
measure_setup_duration(component) do
|
||||
puts "==> Starting #{component} (#{version}) set up...\n"
|
||||
|
||||
# Cleanup the component entirely to ensure we start fresh
|
||||
|
|
|
|||
|
|
@ -1445,10 +1445,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@gitlab/noop/-/noop-1.0.1.tgz#71a831146ee02732b4a61d2d3c11204564753454"
|
||||
integrity sha512-s++4wjMYeDvBp9IO59DBrWjy8SE/gFkjTDO5ck2W0S6Vv7OlqgErwL7pHngAnrSmTJAzyUG8wHGqo0ViS4jn5Q==
|
||||
|
||||
"@gitlab/query-language-rust@0.11.4":
|
||||
version "0.11.4"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/query-language-rust/-/query-language-rust-0.11.4.tgz#b2edf7bf8f2f37bafbc0feb6257b83cd0af2ec2a"
|
||||
integrity sha512-RgBYtF60jRtpAaT+cHepKSQoIpjKH+aRM3GtDmmFL7222VRyVgc369voQzld0fvyAHDSPNyhOWfcB9rALRpTRA==
|
||||
"@gitlab/query-language-rust@0.12.0":
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/query-language-rust/-/query-language-rust-0.12.0.tgz#fe3c91bde10638b433d6d4ee50710ad678267378"
|
||||
integrity sha512-ZWv66surZDxRNSD4q1eAbGOJVoGYsPnXOdbt3PUBW5t0KFtFyM15+9DHI9wugtep8k9q1xB1B8mTrz3+F+eChA==
|
||||
|
||||
"@gitlab/stylelint-config@6.2.2":
|
||||
version "6.2.2"
|
||||
|
|
|
|||
Loading…
Reference in New Issue