Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-02-28 18:14:00 +00:00
parent fbb4454959
commit 0a38880db1
32 changed files with 278 additions and 126 deletions

View File

@ -49,7 +49,7 @@ gem 'responders', '~> 3.0' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'sprockets', '~> 3.7.0' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'view_component', '~> 3.8.0' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'view_component', '~> 3.11.0' # rubocop:todo Gemfile/MissingFeatureCategory
# Supported DBs
gem 'pg', '~> 1.5.5' # rubocop:todo Gemfile/MissingFeatureCategory
@ -301,7 +301,7 @@ gem 'discordrb-webhooks', '~> 3.5', require: false, feature_category: :integrati
# Jira integration
gem 'jira-ruby', '~> 2.3.0', feature_category: :integrations
gem 'atlassian-jwt', '~> 0.2.0', feature_category: :integrations
gem 'atlassian-jwt', '~> 0.2.1', feature_category: :integrations
# Slack integration
gem 'slack-messenger', '~> 2.3.4', feature_category: :integrations

View File

@ -701,7 +701,7 @@
{"name":"validates_hostname","version":"1.0.13","platform":"ruby","checksum":"eac40178cc0b4f727df9cc6a5cb5bc2550718ad8d9bb3728df9aba6354bdda19"},
{"name":"version_gem","version":"1.1.0","platform":"ruby","checksum":"6b009518020db57f51ec7b410213fae2bf692baea9f1b51770db97fbc93d9a80"},
{"name":"version_sorter","version":"2.3.0","platform":"ruby","checksum":"2147f2a1a3804fbb8f60d268b7d7c1ec717e6dd727ffe2c165b4e05e82efe1da"},
{"name":"view_component","version":"3.8.0","platform":"ruby","checksum":"3ec17fe3b56e0d679064b27dde796d7d4254d7bf8110594de85471b86ac0c5f6"},
{"name":"view_component","version":"3.11.0","platform":"ruby","checksum":"6994c3dcc6f8da1fab42420a367f5071c00291241bc5a56f73a34ec8c10fc5ff"},
{"name":"virtus","version":"2.0.0","platform":"ruby","checksum":"8841dae4eb7fcc097320ba5ea516bf1839e5d056c61ee27138aa4bddd6e3d1c2"},
{"name":"vite_rails","version":"3.0.17","platform":"ruby","checksum":"b90e85a3e55802981cbdb43a4101d944b1e7055bfe85599d9cb7de0f1ea58bcc"},
{"name":"vite_ruby","version":"3.5.0","platform":"ruby","checksum":"a3e5da3fdd816f831cb1530c4001a790aac862c89f74c09f48d5a3cfed3dea73"},

View File

@ -1757,7 +1757,7 @@ GEM
activesupport (>= 3.0)
version_gem (1.1.0)
version_sorter (2.3.0)
view_component (3.8.0)
view_component (3.11.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
@ -1831,7 +1831,7 @@ DEPENDENCIES
asciidoctor-include-ext (~> 0.4.0)
asciidoctor-kroki (~> 0.8.0)
asciidoctor-plantuml (~> 0.0.16)
atlassian-jwt (~> 0.2.0)
atlassian-jwt (~> 0.2.1)
attr_encrypted (~> 3.2.4)!
autoprefixer-rails (= 10.2.5.1)
awesome_print
@ -2138,7 +2138,7 @@ DEPENDENCIES
valid_email (~> 0.1)
validates_hostname (~> 1.0.13)
version_sorter (~> 2.3)
view_component (~> 3.8.0)
view_component (~> 3.11.0)
vite_rails (~> 3.0.17)
vite_ruby (~> 3.5.0)
vmstat (~> 2.3.0)

View File

@ -1,4 +1,4 @@
import { identity, memoize, throttle } from 'lodash';
import { identity, memoize, throttle, isEmpty } from 'lodash';
import { initEmojiMap, getAllEmoji, searchEmoji } from '~/emoji';
import { parsePikadayDate } from '~/lib/utils/datetime_utility';
import axios from '~/lib/utils/axios_utils';
@ -118,7 +118,10 @@ export function createDataSource({
export default class AutocompleteHelper {
constructor({ dataSourceUrls, sidebarMediator }) {
this.dataSourceUrls = dataSourceUrls;
this.dataSourceUrls = !isEmpty(dataSourceUrls)
? dataSourceUrls
: gl.GfmAutoComplete?.dataSources;
this.sidebarMediator = sidebarMediator;
initEmojiMap();

View File

@ -15,6 +15,7 @@ export default {
DeploymentAside,
DeploymentApprovals: () =>
import('ee_component/deployments/components/deployment_approvals.vue'),
DeploymentTimeline: () => import('ee_component/deployments/components/deployment_timeline.vue'),
},
inject: ['projectPath', 'deploymentIid', 'environmentName'],
apollo: {
@ -86,6 +87,11 @@ export default {
:deployment="deployment"
class="gl-mt-8 gl-w-90p"
/>
<deployment-timeline
v-if="hasApprovalSummary"
:approval-summary="deployment.approvalSummary"
class="gl-w-90p"
/>
</div>
<deployment-aside
v-if="!hasError"

View File

@ -121,7 +121,7 @@ export default {
<template v-if="showResetButton">
<gl-button
v-gl-modal.confirmResetIntegration
category="tertiary"
category="secondary"
variant="danger"
:loading="isResetting"
:disabled="disableButtons"

View File

@ -91,6 +91,9 @@ export default {
},
},
},
mounted() {
this.selectLine();
},
created() {
this.handleAppear = debounce(this.handleChunkAppear, DEFAULT_DEBOUNCE_AND_THROTTLE_MS);
this.track(EVENT_ACTION, { label: EVENT_LABEL_VIEWER, property: this.blob.language });

View File

@ -15,6 +15,10 @@ $language-filter-max-height: 20rem;
&:last-child {
border-bottom: 0;
}
.fork-sprite {
margin-right: -5px;
}
}
}

View File

@ -582,6 +582,12 @@ module SearchHelper
end
end
def issuable_visible_target_branch(issuable)
return unless issuable.is_a?(::MergeRequest)
issuable.target_branch unless issuable.target_branch == issuable.project.default_branch
end
def sanitized_search_params
sanitized_params = params.dup

View File

@ -1,42 +1,44 @@
- page_title s_('TagsPage|Tags')
= content_for :meta_tags do
= auto_discovery_link_tag(:atom, project_tags_url(@project, rss_url_options), title: "#{@project.name} tags")
- show_header = @tags.any? || @search.present?
.flex-list
.top-area.adjust
.nav-text.row-main-content
= s_('TagsPage|Tags give the ability to mark specific points in history as being important')
- if show_header
.flex-list
.top-area.adjust
.nav-text.row-main-content
.nav-controls.gl-my-3
#js-tags-sort-dropdown{ data: { filter_tags_path: filter_tags_path(search: @search, sort: @sort), sort_options: tags_sort_options_hash.to_json } }
= link_button_to nil, project_tags_path(@project, rss_url_options), title: _("Tags feed"), class: 'has-tooltip gl-ml-auto', icon: 'rss'
- if can?(current_user, :admin_tag, @project)
= link_button_to new_project_tag_path(@project), data: { testid: "new-tag-button" }, variant: :confirm do
= s_('TagsPage|New tag')
.nav-controls
#js-tags-sort-dropdown{ data: { filter_tags_path: filter_tags_path(search: @search, sort: @sort), sort_options: tags_sort_options_hash.to_json } }
= link_button_to nil, project_tags_path(@project, rss_url_options), title: _("Tags feed"), class: 'has-tooltip gl-ml-auto', icon: 'rss'
- if can?(current_user, :admin_tag, @project)
= link_button_to new_project_tag_path(@project), data: { testid: "new-tag-button" }, variant: :confirm do
= s_('TagsPage|New tag')
= render_if_exists 'projects/commits/mirror_status'
= render_if_exists 'projects/commits/mirror_status'
- if @tags_loading_error
= render 'shared/errors/gitaly_unavailable', reason: s_('TagsPage|Unable to load tags')
- if @tags_loading_error
= render 'shared/errors/gitaly_unavailable', reason: s_('TagsPage|Unable to load tags')
.tags
- if @tags.any?
%ul.flex-list.content-list
= render partial: 'tag', collection: @tags
.tags
%ul.flex-list.content-list
= render partial: 'tag', collection: @tags
= paginate @tags, theme: 'gitlab'
- elsif @search.present?
= render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-search-md.svg',
title: s_('TagsPage|Sorry, your filter produced no results'),
empty_state_options: { data: { testid: 'empty-search-result' } })
= paginate @tags, theme: 'gitlab'
- if can?(current_user, :admin_tag, @project)
.js-delete-tag-modal
- else
.nothing-here-block
- if @search.present?
= s_('TagsPage|Sorry, your filter produced no results.')
- else
= s_('TagsPage|Repository has no tags yet.')
%br
%small
= s_('TagsPage|Use git tag command to add a new one:')
%br
%span.monospace git tag -a v1.4 -m 'version 1.4'
- else
= render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-labels-md.svg',
title: s_('TagsPage|Repository has no tags yet'),
primary_button_text: s_('TagsPage|New tag'),
primary_button_link: new_project_tag_path(@project),
empty_state_options: { data: { testid: 'empty-state-tags' } }) do |c|
- if can?(current_user, :admin_tag, @project)
.js-delete-tag-modal
- c.with_description do
%p= s_('TagsPage|Tags give the ability to mark specific points in history as being important.')
%p= s_("TagsPage|Create a new tag using the %{code_start}git tag%{code_end} command. For example, %{code_start}git tag -a v1.4 -m 'version 1.4'%{code_end}").html_safe % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe }

View File

@ -9,6 +9,12 @@
= issuable_project_reference(issuable)
&middot;
= sprintf(s_('created %{issuable_created} by %{author}'), { issuable_created: time_ago_with_tooltip(issuable.created_at, placement: 'bottom'), author: link_to_member(@project, issuable.author, avatar: false) }).html_safe
- if (target_branch = issuable_visible_target_branch(issuable))
%span.project-ref-path.has-tooltip.d-inline-block.gl-text-truncate.gl-max-w-26.gl-vertical-align-bottom{ title: _('Target branch: %{target_branch}') % {target_branch: target_branch} }
&nbsp;
= link_to project_ref_path(issuable.project, target_branch), class: 'ref-name gl-text-gray-500!' do
= sprite_icon('branch', size: 12, css_class: 'fork-sprite')
= target_branch
.description.term.gl-px-0
= highlight_and_truncate_issuable(issuable, @search_term, @search_highlight)
- if issuable.labels.any?

View File

@ -9,4 +9,4 @@ link: https://docs.gitlab.com/ee/development/documentation/styleguide/#available
level: suggestion
scope: raw
raw:
- (?<=\n\*\*Offering:\*\* )[^\n]*(SaaS|self-managed|Self-Managed|GitLab dedicated|and|GitLab Dedicated,|, GitLab\.com|,? Dedicated)
- (?<=\n\*\*Offering:\*\* )(Dedicated|[^\n]*(SaaS|self-managed|Self-Managed|GitLab dedicated|and|GitLab Dedicated,|, GitLab\.com|, Dedicated))

View File

@ -18,7 +18,7 @@ info: "To determine the technical writer assigned to the Stage/Group associated
DETAILS:
**Tier:** Premium, Ultimate
**Offering:** SaaS, self-managed
**Offering:** GitLab.com, Self-managed
Audit event types are used to [filter streamed audit events](audit_event_streaming/index.md#update-event-filters).
@ -49,31 +49,31 @@ Audit event types with the `-` scope are limited to either project, group, or in
|:------------|:------------|:------------------|:---------|:--------------|:--------------|
| [`amazon_s3_configuration_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132443) | Triggered when Amazon S3 configuration for audit events streaming is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423229) | Group |
| [`amazon_s3_configuration_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/133695) | Triggered when Amazon S3 configuration for audit events streaming is deleted.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423229) | Group |
| [`amazon_s3_configuration_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/133691) | Triggered when Amazon S3 configuration for audit events streaming is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423229) | - |
| [`amazon_s3_configuration_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/133691) | Triggered when Amazon S3 configuration for audit events streaming is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423229) | Group |
| [`audit_events_streaming_headers_create`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92068) | Triggered when a streaming header for audit events is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.3](https://gitlab.com/gitlab-org/gitlab/-/issues/366350) | Group |
| [`audit_events_streaming_headers_destroy`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92068) | Triggered when a streaming header for audit events is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.3](https://gitlab.com/gitlab-org/gitlab/-/issues/366350) | Group |
| [`audit_events_streaming_instance_headers_create`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125870) | Triggered when a streaming header for instance level external audit event destination is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/417433) | - |
| [`audit_events_streaming_instance_headers_destroy`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127228) | Triggered when a streaming header for instance level external audit event destination is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/417433) | - |
| [`audit_events_streaming_instance_headers_update`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127228) | Triggered when a streaming header for instance level external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/417433) | - |
| [`audit_events_streaming_instance_headers_create`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125870) | Triggered when a streaming header for instance level external audit event destination is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/417433) | Instance |
| [`audit_events_streaming_instance_headers_destroy`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127228) | Triggered when a streaming header for instance level external audit event destination is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/417433) | Instance |
| [`audit_events_streaming_instance_headers_update`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127228) | Triggered when a streaming header for instance level external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.3](https://gitlab.com/gitlab-org/gitlab/-/issues/417433) | Instance |
| [`create_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74632) | Event triggered when an external audit event destination is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.6](https://gitlab.com/gitlab-org/gitlab/-/issues/344664) | Group |
| [`create_http_namespace_filter`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136047) | Event triggered when a namespace filter for an external audit event destination for a top-level group is created.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.6](https://gitlab.com/gitlab-org/gitlab/-/issues/424176) | Group |
| [`create_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123882) | Event triggered when an instance level external audit event destination is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | - |
| [`create_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123882) | Event triggered when an instance level external audit event destination is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | Instance |
| [`delete_http_namespace_filter`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/136302) | Event triggered when a namespace filter for an external audit event destination for a top-level group is deleted.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/424177) | Group |
| [`destroy_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74632) | Event triggered when an external audit event destination is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.6](https://gitlab.com/gitlab-org/gitlab/-/issues/344664) | Group |
| [`destroy_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125846) | Event triggered when an instance level external audit event destination is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | - |
| [`destroy_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125846) | Event triggered when an instance level external audit event destination is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | Instance |
| [`event_type_filters_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113081) | Event triggered when a new audit events streaming event type filter is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/344848) | Group |
| [`event_type_filters_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113489) | Event triggered when audit events streaming event type filters are deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.10](https://gitlab.com/gitlab-org/gitlab/-/issues/344848) | Group |
| [`google_cloud_logging_configuration_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122025) | Triggered when Google Cloud Logging configuration is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/409422) | Group |
| [`google_cloud_logging_configuration_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122025) | Triggered when Google Cloud Logging configuration is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/409422) | Group |
| [`google_cloud_logging_configuration_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122025) | Triggered when Google Cloud Logging configuration is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.1](https://gitlab.com/gitlab-org/gitlab/-/issues/409422) | Group |
| [`instance_amazon_s3_configuration_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137651) | Triggered when instance Amazon S3 configuration for audit events streaming is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/423235) | - |
| [`instance_amazon_s3_configuration_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138318) | Triggered when instance-level Amazon S3 configuration for audit events streaming is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/423235) | - |
| [`instance_amazon_s3_configuration_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138310) | Triggered when instance-level Amazon S3 configuration for audit events streaming is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/423235) | - |
| [`instance_google_cloud_logging_configuration_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130663) | Triggered when Instance level Google Cloud Logging configuration is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.4](https://gitlab.com/gitlab-org/gitlab/-/issues/423038) | - |
| [`instance_google_cloud_logging_configuration_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131752) | Triggered when instance level Google Cloud Logging configuration is deleted.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423040) | - |
| [`instance_google_cloud_logging_configuration_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131790) | Triggered when instance level Google Cloud Logging configuration is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423039) | - |
| [`update_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74632) | Event triggered when an external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.6](https://gitlab.com/gitlab-org/gitlab/-/issues/344664) | - |
| [`update_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125846) | Event triggered when an instance level external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | - |
| [`instance_amazon_s3_configuration_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137651) | Triggered when instance Amazon S3 configuration for audit events streaming is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/423235) | Instance |
| [`instance_amazon_s3_configuration_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138318) | Triggered when instance-level Amazon S3 configuration for audit events streaming is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/423235) | Instance |
| [`instance_amazon_s3_configuration_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/138310) | Triggered when instance-level Amazon S3 configuration for audit events streaming is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.7](https://gitlab.com/gitlab-org/gitlab/-/issues/423235) | Instance |
| [`instance_google_cloud_logging_configuration_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130663) | Triggered when Instance level Google Cloud Logging configuration is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.4](https://gitlab.com/gitlab-org/gitlab/-/issues/423038) | Instance |
| [`instance_google_cloud_logging_configuration_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131752) | Triggered when instance level Google Cloud Logging configuration is deleted.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423040) | Instance |
| [`instance_google_cloud_logging_configuration_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131790) | Triggered when instance level Google Cloud Logging configuration is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/423039) | Instance |
| [`update_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74632) | Event triggered when an external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.6](https://gitlab.com/gitlab-org/gitlab/-/issues/344664) | Group |
| [`update_instance_event_streaming_destination`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125846) | Event triggered when an instance level external audit event destination is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.2](https://gitlab.com/gitlab-org/gitlab/-/issues/404730) | Instance |
### Build artifacts
@ -142,7 +142,7 @@ Audit event types with the `-` scope are limited to either project, group, or in
| [`personal_access_token_revoked`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108952) | Event triggered when a personal access token is revoked| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/374113) | User |
| [`project_archived`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117528) | Event triggered when a project is archived.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
| [`project_deletion_marked`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117546) | Event triggered when a project is marked for deletion.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
| [`project_destroyed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117546) | Event triggered when a project is destroyed.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | - |
| [`project_destroyed`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117546) | Event triggered when a project is destroyed.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Group |
| [`project_export_file_download_started`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117528) | Event triggered when download of project export file gets started.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/374105) | Project |
| [`project_group_link_created`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108918) | Event triggered when a group is invited to a project| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/374114) | Group |
| [`project_group_link_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108918) | Event triggered when a project group link is deleted| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [15.9](https://gitlab.com/gitlab-org/gitlab/-/issues/374114) | Group |
@ -210,7 +210,7 @@ Audit event types with the `-` scope are limited to either project, group, or in
| Name | Description | Saved to database | Streamed | Introduced in | Scope |
|:------------|:------------|:------------------|:---------|:--------------|:--------------|
| [`dast_profile_create`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62604) | Triggered when a dynamic application security testing profile is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.1](https://gitlab.com/gitlab-org/gitlab/-/issues/217872) | Project |
| [`dast_profile_destroy`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62604) | Triggered when a dynamic application security profile is removed| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.1](https://gitlab.com/gitlab-org/gitlab/-/issues/217872) | - |
| [`dast_profile_destroy`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62604) | Triggered when a dynamic application security profile is removed| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.1](https://gitlab.com/gitlab-org/gitlab/-/issues/217872) | Project |
| [`dast_profile_schedule_create`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68046) | Triggered when a dynamic application security testing profile schedule is created| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.3](https://gitlab.com/gitlab-org/gitlab/-/issues/330308) | Project |
| [`dast_profile_schedule_update`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66445) | Triggered when a dynamic application security testing profile schedule is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.3](https://gitlab.com/gitlab-org/gitlab/-/issues/330308) | Project |
| [`dast_profile_update`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62604) | Triggered when a dynamic application security profile is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [14.1](https://gitlab.com/gitlab-org/gitlab/-/issues/217872) | Project |
@ -233,7 +233,7 @@ Audit event types with the `-` scope are limited to either project, group, or in
| [`protected_environment_deploy_access_level_added`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | This event is triggered when a deploy access level is added to a protected environment.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Group, Project |
| [`protected_environment_deploy_access_level_deleted`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | This event is triggered when a deploy access level is removed from a protected environment.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Group, Project |
| [`protected_environment_deploy_access_level_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | This event is triggered when a deploy access level of a protected environment is updated| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Project |
| [`protected_environment_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | This event is triggered when a protected environment is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Group |
| [`protected_environment_updated`](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131484) | This event is triggered when a protected environment is updated.| **{check-circle}** Yes | **{check-circle}** Yes | GitLab [16.5](https://gitlab.com/gitlab-org/gitlab/-/issues/415603) | Group, Project |
### Feature flags

View File

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Ultimate
**Offering:** Dedicated
**Offering:** GitLab Dedicated
The instructions on this page guide you through configuring your GitLab Dedicated instance, including enabling and updating the settings for [available functionality](../../subscriptions/gitlab_dedicated/index.md#available-features).

View File

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Ultimate
**Offering:** Dedicated
**Offering:** GitLab Dedicated
The instructions on this page guide you through the onboarding and initial setup of your GitLab Dedicated instance using [Switchboard](https://about.gitlab.com/direction/saas-platforms/switchboard/), the GitLab Dedicated portal.

View File

@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Ultimate
**Offering:** Dedicated
**Offering:** GitLab Dedicated
GitLab Dedicated is a single-tenant SaaS solution, fully managed and hosted by GitLab. For more information about this offering, see the [subscription page](../../subscriptions/gitlab_dedicated/index.md).

View File

@ -22,28 +22,51 @@ On self-managed GitLab, by default this feature is not available. To make it ava
On GitLab.com, this feature is not available.
This feature is not ready for production use.
```plaintext
POST /code_suggestions/completions
```
NOTE:
This endpoint rate-limits each user to 60 requests per 1-minute window.
Use the AI abstraction layer to generate code completions.
```plaintext
POST /code_suggestions/completions
```
Requests to this endpoint are proxied to the
[AI Gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/blob/main/docs/api.md).
Requests to this endpoint are proxied directly to the [model gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#completions). The documentation for the endpoint is currently the SSoT for named parameters.
Parameters:
| Attribute | Type | Required | Description |
|----------------|---------|----------|-------------|
| `current_file` | hash | yes | Attributes of file for which code suggestions are being generated. See [File attributes](#file-attributes) for a list of strings this attribute accepts. |
| `intent` | string | no | The intent of the completion request. Options: `completion` or `generation`. |
| `stream` | boolean | no | Whether to stream the response as smaller chunks as they are ready (if applicable). Default: `false`. |
| `project_path` | string | no | The path of the project. |
### File attributes
The `current_file` attribute accepts the following strings:
- `file_name` - The name of the file. Required.
- `content_above_cursor` - The content of the file above the current cursor position. Required.
- `content_below_cursor` - The content of the file below the current cursor position. Optional.
Example request:
```shell
curl --request POST \
--header "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \
--data "<JSON_BODY>" \
--data '{
"current_file": {
"file_name": "car.py",
"content_above_cursor": "class Car:\n def __init__(self):\n self.is_running = False\n self.speed = 0\n def increase_speed(self, increment):",
"content_below_cursor": ""
},
"intent": "completion"
}' \
--url "https://gitlab.example.com/api/v4/code_suggestions/completions"
```
Example body:
The [model gateway](https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist#completions) is the SSoT for parameters.
Example response:
```json

View File

@ -310,7 +310,7 @@ Parameters:
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) owned by the authenticated user |
| `archived` | boolean | no | Limit by archived status |
| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, `similarity` <sup>1</sup>, or `last_activity_at` fields. Default is `created_at` |
| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, `similarity` <sup>1</sup>, `star_count` or `last_activity_at` fields. Default is `created_at` |
| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of authorized projects matching the search criteria |
| `simple` | boolean | no | Return only limited fields for each project. This is a no-op without authentication where only simple fields are returned. |
@ -398,7 +398,7 @@ Parameters:
| `id` | integer/string | yes | The ID or [URL-encoded path of the group](rest/index.md#namespaced-path-encoding) owned by the authenticated user |
| `archived` | boolean | no | Limit by archived status |
| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, `star_count` or `last_activity_at` fields. Default is `created_at` |
| `sort` | string | no | Return projects sorted in `asc` or `desc` order. Default is `desc` |
| `search` | string | no | Return list of authorized projects matching the search criteria |
| `simple` | boolean | no | Return only limited fields for each project. This is a no-op without authentication where only simple fields are returned. |

View File

@ -51,7 +51,7 @@ as it can cause the pipeline to behave unexpectedly.
| `CI_COMMIT_TAG_MESSAGE` | Pipeline | 15.5 | all | The commit tag message. Available only in pipelines for tags. |
| `CI_COMMIT_TIMESTAMP` | Pipeline | 13.4 | all | The timestamp of the commit in the [ISO 8601](https://www.rfc-editor.org/rfc/rfc3339#appendix-A) format. For example, `2022-01-31T16:47:55Z`. [UTC by default](../../administration/timezone.md). |
| `CI_COMMIT_TITLE` | Pipeline | 10.8 | all | The title of the commit. The full first line of the message. |
| `CI_COMPONENT_FQDN` | Pipeline | 16.10 | all | The Fully Qualified Domain Name of the instance. For example `gitlab.example.com:8080`. |
| `CI_COMPONENT_FQDN` | Pipeline | 16.10 | all | The fully qualified domain name (FQDN) of the instance. For example `gitlab.example.com:8080`. |
| `CI_CONCURRENT_ID` | Jobs only | all | 11.10 | The unique ID of build execution in a single executor. |
| `CI_CONCURRENT_PROJECT_ID` | Jobs only | all | 11.10 | The unique ID of build execution in a single executor and project. |
| `CI_CONFIG_PATH` | Pipeline | 9.4 | 0.5 | The path to the CI/CD configuration file. Defaults to `.gitlab-ci.yml`. Read-only inside a running pipeline. |

View File

@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Ultimate
**Offering:** Dedicated
**Offering:** GitLab Dedicated
**Status:** Experiment
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/11439) in GitLab 16.7 as an [Experiment](../../../policy/experiment-beta-support.md) for GitLab Dedicated customers.

View File

@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Premium, Ultimate
**Offering:** GitLab.com, self-managed, GitLab Dedicated. GitLab Duo Pro required.
**Offering:** GitLab.com, Self-managed, GitLab Dedicated. GitLab Duo Pro required.
Code Suggestions is powered by a generative AI model.

View File

@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Premium, Ultimate
**Offering:** GitLab.com, self-managed, GitLab Dedicated. GitLab Duo Pro required.
**Offering:** GitLab.com, Self-managed, GitLab Dedicated. GitLab Duo Pro required.
NOTE:
GitLab Duo Code Suggestions requires [GitLab 16.8](https://about.gitlab.com/releases/2024/01/18/gitlab-16-8-released/) and later. Earlier GitLab versions are not supported.

View File

@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Premium, Ultimate
**Offering:** GitLab.com, self-managed
**Offering:** GitLab.com, Self-managed
> - [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12060) in GitLab 16.7.

View File

@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Premium, Ultimate
**Offering:** GitLab.com, self-managed, GitLab Dedicated. GitLab Duo Pro required.
**Offering:** GitLab.com, Self-managed, GitLab Dedicated. GitLab Duo Pro required.
Code Suggestions is available in the following editor extensions and
for the following languages.

View File

@ -8,7 +8,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
DETAILS:
**Tier:** Premium, Ultimate
**Offering:** GitLab.com, self-managed, GitLab Dedicated. GitLab Duo Pro required.
**Offering:** GitLab.com, Self-managed, GitLab Dedicated. GitLab Duo Pro required.
When working with GitLab Duo Code Suggestions, you might encounter the following issues.

View File

@ -82,7 +82,10 @@ module API
params: project_finder_params,
options: finder_options
).execute
projects = reorder_projects_with_similarity_order_support(group, projects)
order_by = params[:order_by]
projects = reorder_projects_with_order_support(projects, group, order_by)
paginate(projects)
end
@ -148,10 +151,15 @@ module API
accepted!
end
def reorder_projects_with_similarity_order_support(group, projects)
return handle_similarity_order(group, projects) if params[:order_by] == 'similarity'
reorder_projects(projects)
def reorder_projects_with_order_support(projects, group, order_by)
case order_by
when 'similarity'
handle_similarity_order(group, projects)
when 'star_count'
handle_star_count_order(group, projects)
else
reorder_projects(projects)
end
end
def order_groups(groups)
@ -177,6 +185,12 @@ module API
projects.reorder(order_options)
end
end
def handle_star_count_order(group, projects)
order_options = { star_count: params[:sort] == 'asc' ? :asc : :desc }
order_options['id'] ||= params[:sort]
projects.reorder(order_options)
end
# rubocop: enable CodeReuse/ActiveRecord
def authorize_group_creation!
@ -307,7 +321,7 @@ module API
optional :visibility, type: String, values: Gitlab::VisibilityLevel.string_values,
desc: 'Limit by visibility'
optional :search, type: String, desc: 'Return list of authorized projects matching the search criteria'
optional :order_by, type: String, values: %w[id name path created_at updated_at last_activity_at similarity],
optional :order_by, type: String, values: %w[id name path created_at updated_at last_activity_at similarity star_count],
default: 'created_at', desc: 'Return projects ordered by field'
optional :sort, type: String, values: %w[asc desc], default: 'desc',
desc: 'Return projects sorted in ascending and descending order'
@ -349,7 +363,7 @@ module API
optional :visibility, type: String, values: Gitlab::VisibilityLevel.string_values,
desc: 'Limit by visibility'
optional :search, type: String, desc: 'Return list of authorized projects matching the search criteria'
optional :order_by, type: String, values: %w[id name path created_at updated_at last_activity_at],
optional :order_by, type: String, values: %w[id name path created_at updated_at last_activity_at star_count],
default: 'created_at', desc: 'Return projects ordered by field'
optional :sort, type: String, values: %w[asc desc], default: 'desc',
desc: 'Return projects sorted in ascending and descending order'

View File

@ -17381,9 +17381,15 @@ msgstr ""
msgid "Deployment|Add approval comment"
msgstr ""
msgid "Deployment|Approval Comments"
msgstr ""
msgid "Deployment|Approve deployment"
msgstr ""
msgid "Deployment|Approved"
msgstr ""
msgid "Deployment|Branch"
msgstr ""
@ -17438,6 +17444,9 @@ msgstr ""
msgid "Deployment|Reject"
msgstr ""
msgid "Deployment|Rejected"
msgstr ""
msgid "Deployment|Related Tags"
msgstr ""
@ -23419,39 +23428,48 @@ msgstr ""
msgid "GoogleCloudPlatformService|Connect Google Cloud Artifact Registry to GitLab."
msgstr ""
msgid "GoogleCloudPlatformService|Connect Google Cloud Workload Identity Federation to GitLab."
msgid "GoogleCloudPlatformService|Example: %{code_open}314053285323%{code_close}"
msgstr ""
msgid "GoogleCloudPlatformService|Example: %{code_open}my-sample-project-191923%{code_close}"
msgstr ""
msgid "GoogleCloudPlatformService|Google Cloud Artifact Registry"
msgstr ""
msgid "GoogleCloudPlatformService|Google Cloud Identity and Access Management"
msgid "GoogleCloudPlatformService|Google Cloud IAM"
msgstr ""
msgid "GoogleCloudPlatformService|Google Cloud project ID"
msgstr ""
msgid "GoogleCloudPlatformService|Google Cloud project ID for the Workload Identity Federation."
msgstr ""
msgid "GoogleCloudPlatformService|Google Cloud project number"
msgstr ""
msgid "GoogleCloudPlatformService|Google Cloud project number for the Workload Identity Federation."
msgstr ""
msgid "GoogleCloudPlatformService|ID of the Workload Identity Pool provider."
msgstr ""
msgid "GoogleCloudPlatformService|ID of the Workload Identity Pool."
msgstr ""
msgid "GoogleCloudPlatformService|Manage permissions for Google Cloud resources with Identity and Access Management (IAM)."
msgstr ""
msgid "GoogleCloudPlatformService|Pool ID"
msgstr ""
msgid "GoogleCloudPlatformService|Project ID"
msgstr ""
msgid "GoogleCloudPlatformService|Project number"
msgstr ""
msgid "GoogleCloudPlatformService|Project number of the Workload Identity Pool."
msgstr ""
msgid "GoogleCloudPlatformService|Project with the Artifact Registry repository."
msgstr ""
msgid "GoogleCloudPlatformService|Provider ID"
msgstr ""
msgid "GoogleCloudPlatformService|Repository location"
msgstr ""
@ -37130,9 +37148,6 @@ msgstr ""
msgid "Please accept the Terms of Service before continuing."
msgstr ""
msgid "Please add a comment in the text area above"
msgstr ""
msgid "Please check the configuration file for this chart"
msgstr ""
@ -42438,9 +42453,6 @@ msgstr ""
msgid "Ruby"
msgstr ""
msgid "Rule"
msgstr ""
msgid "Rule name is already taken."
msgstr ""
@ -49310,6 +49322,9 @@ msgstr ""
msgid "TagsPage|Cancel, keep tag"
msgstr ""
msgid "TagsPage|Create a new tag using the %{code_start}git tag%{code_end} command. For example, %{code_start}git tag -a v1.4 -m 'version 1.4'%{code_end}"
msgstr ""
msgid "TagsPage|Create release"
msgstr ""
@ -49364,24 +49379,21 @@ msgstr ""
msgid "TagsPage|Please type the following to confirm:"
msgstr ""
msgid "TagsPage|Repository has no tags yet."
msgid "TagsPage|Repository has no tags yet"
msgstr ""
msgid "TagsPage|Sorry, your filter produced no results."
msgid "TagsPage|Sorry, your filter produced no results"
msgstr ""
msgid "TagsPage|Tags"
msgstr ""
msgid "TagsPage|Tags give the ability to mark specific points in history as being important"
msgid "TagsPage|Tags give the ability to mark specific points in history as being important."
msgstr ""
msgid "TagsPage|Unable to load tags"
msgstr ""
msgid "TagsPage|Use git tag command to add a new one:"
msgstr ""
msgid "TagsPage|Yes, delete protected tag"
msgstr ""
@ -60525,18 +60537,6 @@ msgstr[1] ""
msgid "vulnerability|Add a comment"
msgstr ""
msgid "vulnerability|Add a comment or reason for dismissal"
msgstr ""
msgid "vulnerability|Add comment"
msgstr ""
msgid "vulnerability|Add comment & dismiss"
msgstr ""
msgid "vulnerability|Save comment"
msgstr ""
msgid "vulnerability|dismissed"
msgstr ""

View File

@ -28,7 +28,7 @@ RSpec.describe 'Developer views tags', feature_category: :source_code_management
end
it 'displays a specific message' do
expect(page).to have_content 'Repository has no tags yet.'
expect(page).to have_css '[data-testid="empty-state-tags"]'
end
end

View File

@ -199,4 +199,17 @@ describe('AutocompleteHelper', () => {
).toMatchSnapshot();
},
);
it('loads default datasources if not passed', () => {
gl.GfmAutoComplete = {
dataSources: {
members: '/gitlab-org/gitlab-test/-/autocomplete_sources/members',
},
};
autocompleteHelper = new AutocompleteHelper({});
expect(autocompleteHelper.dataSourceUrls.members).toBe(
'/gitlab-org/gitlab-test/-/autocomplete_sources/members',
);
});
});

View File

@ -83,6 +83,12 @@ describe('Source Viewer component', () => {
expect(LineHighlighter).toHaveBeenCalled();
});
describe('when mounted', () => {
it('should highlight the hash', () => {
expect(lineHighlighter.highlightHash).toHaveBeenCalledWith(hash);
});
});
describe('event tracking', () => {
it('fires a tracking event when the component is created', () => {
const eventData = { label: EVENT_LABEL_VIEWER, property: LANGUAGE_MOCK };

View File

@ -14,7 +14,7 @@ RSpec.describe API::Groups, feature_category: :groups_and_projects do
let_it_be(:group1) { create(:group, path: 'some_path', avatar: File.open(uploaded_image_temp_path)) }
let_it_be(:group2) { create(:group, :private) }
let_it_be(:project1) { create(:project, namespace: group1) }
let_it_be(:project2) { create(:project, namespace: group2) }
let_it_be(:project2) { create(:project, namespace: group2, name: 'testing') }
let_it_be(:project3) { create(:project, namespace: group1, path: 'test', visibility_level: Gitlab::VisibilityLevel::PRIVATE) }
let_it_be(:archived_project) { create(:project, namespace: group1, archived: true) }
@ -1247,6 +1247,48 @@ RSpec.describe API::Groups, feature_category: :groups_and_projects do
end
end
context 'with star_count ordering' do
let_it_be(:group_with_projects) { create(:group) }
let_it_be(:project_1) { create(:project, name: 'Project Test', path: 'project-test', group: group_with_projects) }
let_it_be(:project_2) { create(:project, name: 'Test Project', path: 'test-project', group: group_with_projects, star_count: 10) }
let_it_be(:project_3) { create(:project, name: 'Test', path: 'test', group: group_with_projects, star_count: 5) }
let(:params) { { order_by: 'star_count', search: 'test' } }
subject { get api("/groups/#{group_with_projects.id}/projects", user1), params: params }
before do
group_with_projects.add_owner(user1)
end
it 'returns items based ordered by star_count', :aggregate_failures do
subject
expect(response).to have_gitlab_http_status(:ok)
expect(response).to include_pagination_headers
filtered_response = json_response.map { |h| h.slice('star_count', 'name') }
expect(filtered_response).to eq([
{ "star_count" => 10, "name" => "Test Project" },
{ "star_count" => 5, "name" => "Test" },
{ "star_count" => 0, "name" => "Project Test" }
])
end
it 'returns items based ordered by star_count in ascending order', :aggregate_failures do
params[:sort] = 'asc'
subject
expect(response).to have_gitlab_http_status(:ok)
expect(response).to include_pagination_headers
filtered_response = json_response.map { |h| h.slice('star_count', 'name') }
expect(filtered_response).to eq([
{ "star_count" => 0, "name" => "Project Test" },
{ "star_count" => 5, "name" => "Test" },
{ "star_count" => 10, "name" => "Test Project" }
])
end
end
it "returns the group's projects with simple representation", :aggregate_failures do
get api("/groups/#{group1.id}/projects", user1), params: { simple: true }
@ -1440,7 +1482,7 @@ RSpec.describe API::Groups, feature_category: :groups_and_projects do
describe "GET /groups/:id/projects/shared" do
let!(:project4) do
create(:project, namespace: group2, path: 'test_project', visibility_level: Gitlab::VisibilityLevel::PRIVATE)
create(:project, namespace: group2, name: 'test project', path: 'test_project', visibility_level: Gitlab::VisibilityLevel::PRIVATE, star_count: 5)
end
let(:path) { "/groups/#{group1.id}/projects/shared" }
@ -1510,6 +1552,30 @@ RSpec.describe API::Groups, feature_category: :groups_and_projects do
expect(json_response.first['id']).to eq(project4.id)
end
it 'returns the shared projects in the group ordered by star count', :aggregate_failures do
get api(path, user1), params: { order_by: 'star_count', search: 'test' }
expect(response).to have_gitlab_http_status(:ok)
expect(response).to include_pagination_headers
filtered_response = json_response.map { |h| h.slice('star_count', 'name') }
expect(filtered_response).to eq([
{ "star_count" => 5, "name" => "test project" },
{ "star_count" => 0, "name" => "testing" }
])
end
it 'returns the shared projects in the group ordered by star count in ascending order', :aggregate_failures do
get api(path, user1), params: { order_by: 'star_count', search: 'test', sort: 'asc' }
expect(response).to have_gitlab_http_status(:ok)
expect(response).to include_pagination_headers
filtered_response = json_response.map { |h| h.slice('star_count', 'name') }
expect(filtered_response).to eq([
{ "star_count" => 0, "name" => "testing" },
{ "star_count" => 5, "name" => "test project" }
])
end
it 'does not return the projects owned by the group', :aggregate_failures do
get api(path, user1)

View File

@ -36,7 +36,7 @@ info: "To determine the technical writer assigned to the Stage/Group associated
DETAILS:
**Tier:** Premium, Ultimate
**Offering:** SaaS, self-managed
**Offering:** GitLab.com, Self-managed
Audit event types are used to [filter streamed audit events](audit_event_streaming/index.md#update-event-filters).