From 0a38880db10da2fcbf0c27e8a5a77b44a62ff8a1 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 28 Feb 2024 18:14:00 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- Gemfile | 4 +- Gemfile.checksum | 2 +- Gemfile.lock | 6 +- .../services/autocomplete_helper.js | 7 +- .../components/show_deployment.vue | 6 ++ .../components/integration_form_actions.vue | 2 +- .../source_viewer/source_viewer.vue | 3 + .../stylesheets/page_bundles/search.scss | 4 ++ app/helpers/search_helper.rb | 6 ++ app/views/projects/tags/index.html.haml | 64 +++++++++-------- app/views/search/results/_issuable.html.haml | 6 ++ doc/.vale/gitlab/Badges-Offerings.yml | 2 +- doc/administration/audit_event_types.md | 36 +++++----- .../dedicated/configure_instance.md | 2 +- .../dedicated/create_instance.md | 2 +- doc/administration/dedicated/index.md | 2 +- doc/api/code_suggestions.md | 41 ++++++++--- doc/api/groups.md | 4 +- doc/ci/variables/predefined_variables.md | 2 +- .../secret_detection/pre_receive.md | 2 +- .../repository/code_suggestions/data.md | 2 +- .../repository/code_suggestions/index.md | 2 +- .../code_suggestions/repository_xray.md | 2 +- .../code_suggestions/supported_extensions.md | 2 +- .../code_suggestions/troubleshooting.md | 2 +- lib/api/groups.rb | 28 ++++++-- locale/gitlab.pot | 70 +++++++++---------- .../tags/developer_views_tags_spec.rb | 2 +- .../services/autocomplete_helper_spec.js | 13 ++++ .../source_viewer/source_viewer_spec.js | 6 ++ spec/requests/api/groups_spec.rb | 70 ++++++++++++++++++- .../docs/templates/audit_event_types.md.erb | 2 +- 32 files changed, 278 insertions(+), 126 deletions(-) diff --git a/Gemfile b/Gemfile index aad8a14a733..923512cd577 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.checksum b/Gemfile.checksum index 1c9186bd04e..d49b63821f6 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -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"}, diff --git a/Gemfile.lock b/Gemfile.lock index deb9ed13400..8a98e3ad6cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/app/assets/javascripts/content_editor/services/autocomplete_helper.js b/app/assets/javascripts/content_editor/services/autocomplete_helper.js index c5e29e1cd3f..4bafe486fef 100644 --- a/app/assets/javascripts/content_editor/services/autocomplete_helper.js +++ b/app/assets/javascripts/content_editor/services/autocomplete_helper.js @@ -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(); diff --git a/app/assets/javascripts/deployments/components/show_deployment.vue b/app/assets/javascripts/deployments/components/show_deployment.vue index 71655e5c3ab..a3262d5bdae 100644 --- a/app/assets/javascripts/deployments/components/show_deployment.vue +++ b/app/assets/javascripts/deployments/components/show_deployment.vue @@ -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" /> + '.html_safe, code_end: ''.html_safe } diff --git a/app/views/search/results/_issuable.html.haml b/app/views/search/results/_issuable.html.haml index a896cbc5cba..bd98e0b087c 100644 --- a/app/views/search/results/_issuable.html.haml +++ b/app/views/search/results/_issuable.html.haml @@ -9,6 +9,12 @@ = issuable_project_reference(issuable) · = 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} } +   + = 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? diff --git a/doc/.vale/gitlab/Badges-Offerings.yml b/doc/.vale/gitlab/Badges-Offerings.yml index cd6b11fee8e..de79c80703a 100644 --- a/doc/.vale/gitlab/Badges-Offerings.yml +++ b/doc/.vale/gitlab/Badges-Offerings.yml @@ -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)) diff --git a/doc/administration/audit_event_types.md b/doc/administration/audit_event_types.md index c5f9dc7c0b5..cef02fd8e31 100644 --- a/doc/administration/audit_event_types.md +++ b/doc/administration/audit_event_types.md @@ -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 diff --git a/doc/administration/dedicated/configure_instance.md b/doc/administration/dedicated/configure_instance.md index 27764c533df..6f8980142ab 100644 --- a/doc/administration/dedicated/configure_instance.md +++ b/doc/administration/dedicated/configure_instance.md @@ -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). diff --git a/doc/administration/dedicated/create_instance.md b/doc/administration/dedicated/create_instance.md index 36ae7bc53ca..3936e39ccb5 100644 --- a/doc/administration/dedicated/create_instance.md +++ b/doc/administration/dedicated/create_instance.md @@ -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. diff --git a/doc/administration/dedicated/index.md b/doc/administration/dedicated/index.md index a1533ffb7c5..cf4f1565176 100644 --- a/doc/administration/dedicated/index.md +++ b/doc/administration/dedicated/index.md @@ -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). diff --git a/doc/api/code_suggestions.md b/doc/api/code_suggestions.md index cb532181661..bd5e214b036 100644 --- a/doc/api/code_suggestions.md +++ b/doc/api/code_suggestions.md @@ -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 " \ - --data "" \ + --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 diff --git a/doc/api/groups.md b/doc/api/groups.md index 7a43a76a5bb..3be09bbbcab 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -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` 1, 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` 1, `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. | diff --git a/doc/ci/variables/predefined_variables.md b/doc/ci/variables/predefined_variables.md index 4c4df7a46ec..9492b2c2c43 100644 --- a/doc/ci/variables/predefined_variables.md +++ b/doc/ci/variables/predefined_variables.md @@ -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. | diff --git a/doc/user/application_security/secret_detection/pre_receive.md b/doc/user/application_security/secret_detection/pre_receive.md index 4f3ee7dbbbb..97b0db682c9 100644 --- a/doc/user/application_security/secret_detection/pre_receive.md +++ b/doc/user/application_security/secret_detection/pre_receive.md @@ -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. diff --git a/doc/user/project/repository/code_suggestions/data.md b/doc/user/project/repository/code_suggestions/data.md index 1aaf970a10c..0966cace15d 100644 --- a/doc/user/project/repository/code_suggestions/data.md +++ b/doc/user/project/repository/code_suggestions/data.md @@ -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. diff --git a/doc/user/project/repository/code_suggestions/index.md b/doc/user/project/repository/code_suggestions/index.md index 41055f2ff90..a2d7174bbc1 100644 --- a/doc/user/project/repository/code_suggestions/index.md +++ b/doc/user/project/repository/code_suggestions/index.md @@ -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. diff --git a/doc/user/project/repository/code_suggestions/repository_xray.md b/doc/user/project/repository/code_suggestions/repository_xray.md index b0a2f5001a6..7dfc82e8a0b 100644 --- a/doc/user/project/repository/code_suggestions/repository_xray.md +++ b/doc/user/project/repository/code_suggestions/repository_xray.md @@ -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. diff --git a/doc/user/project/repository/code_suggestions/supported_extensions.md b/doc/user/project/repository/code_suggestions/supported_extensions.md index 0f13b2a523a..33fd598effb 100644 --- a/doc/user/project/repository/code_suggestions/supported_extensions.md +++ b/doc/user/project/repository/code_suggestions/supported_extensions.md @@ -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. diff --git a/doc/user/project/repository/code_suggestions/troubleshooting.md b/doc/user/project/repository/code_suggestions/troubleshooting.md index 58c1f98b1dd..e4ad0ad1518 100644 --- a/doc/user/project/repository/code_suggestions/troubleshooting.md +++ b/doc/user/project/repository/code_suggestions/troubleshooting.md @@ -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. diff --git a/lib/api/groups.rb b/lib/api/groups.rb index 7b755a76f29..347094e1046 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -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' diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 0220716ce3c..e52740cf390 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -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 "" diff --git a/spec/features/tags/developer_views_tags_spec.rb b/spec/features/tags/developer_views_tags_spec.rb index bc2d33b3a02..8538348ca8b 100644 --- a/spec/features/tags/developer_views_tags_spec.rb +++ b/spec/features/tags/developer_views_tags_spec.rb @@ -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 diff --git a/spec/frontend/content_editor/services/autocomplete_helper_spec.js b/spec/frontend/content_editor/services/autocomplete_helper_spec.js index 39b96798184..abbc60c2288 100644 --- a/spec/frontend/content_editor/services/autocomplete_helper_spec.js +++ b/spec/frontend/content_editor/services/autocomplete_helper_spec.js @@ -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', + ); + }); }); diff --git a/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js b/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js index 37bdfd0a126..05c786d973a 100644 --- a/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js +++ b/spec/frontend/vue_shared/components/source_viewer/source_viewer_spec.js @@ -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 }; diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index fd4a9f728a4..79956045df0 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -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) diff --git a/tooling/audit_events/docs/templates/audit_event_types.md.erb b/tooling/audit_events/docs/templates/audit_event_types.md.erb index b49ecae70e0..41e2f56b7fe 100644 --- a/tooling/audit_events/docs/templates/audit_event_types.md.erb +++ b/tooling/audit_events/docs/templates/audit_event_types.md.erb @@ -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).