diff options
163 files changed, 1029 insertions, 450 deletions
diff --git a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml index d4653bab68d..f8e8bf5dc4b 100644 --- a/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml +++ b/.rubocop_todo/layout/line_end_string_concatenation_indentation.yml @@ -121,7 +121,6 @@ Layout/LineEndStringConcatenationIndentation: - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_deployment_approvals_metric_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/protected_environment_approval_rules_required_approvals_average_metric_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/protected_environments_required_approvals_average_metric_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/actual_state_calculator_spec.rb' - 'ee/spec/mailers/ee/emails/identity_verification_spec.rb' - 'ee/spec/requests/api/analytics/product_analytics_spec.rb' - 'ee/spec/requests/api/graphql/mutations/boards/lists/update_limit_metrics_spec.rb' @@ -138,7 +137,6 @@ Layout/LineEndStringConcatenationIndentation: - 'ee/spec/services/geo/container_repository_sync_spec.rb' - 'ee/spec/services/merge_trains/create_pipeline_service_spec.rb' - 'ee/spec/services/users/abuse/git_abuse/application_throttle_service_spec.rb' - - 'ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb' - 'ee/spec/support/shared_examples/finders/geo/framework_registry_finder_shared_examples.rb' - 'ee/spec/support/shared_examples/graphql/geo/geo_registries_resolver_shared_examples.rb' - 'ee/spec/support/shared_examples/models/license_shared_examples.rb' diff --git a/.rubocop_todo/metrics/cyclomatic_complexity.yml b/.rubocop_todo/metrics/cyclomatic_complexity.yml index e345c2be451..2519705f21a 100644 --- a/.rubocop_todo/metrics/cyclomatic_complexity.yml +++ b/.rubocop_todo/metrics/cyclomatic_complexity.yml @@ -9,7 +9,6 @@ Metrics/CyclomaticComplexity: - 'app/services/projects/create_service.rb' - 'ee/app/controllers/ee/groups_controller.rb' - 'ee/lib/gitlab/ci/parsers/security/formatters/dependency_list.rb' - - 'ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb' - 'lib/banzai/filter/references/abstract_reference_filter.rb' - 'lib/gitlab/conflict/file.rb' - 'lib/gitlab/database/query_analyzers/prevent_cross_database_modification.rb' diff --git a/.rubocop_todo/metrics/perceived_complexity.yml b/.rubocop_todo/metrics/perceived_complexity.yml index 2ad1c1d1f33..6e541bee880 100644 --- a/.rubocop_todo/metrics/perceived_complexity.yml +++ b/.rubocop_todo/metrics/perceived_complexity.yml @@ -7,7 +7,6 @@ Metrics/PerceivedComplexity: - 'app/helpers/nav/top_nav_helper.rb' - 'app/services/projects/create_service.rb' - 'ee/app/controllers/ee/groups_controller.rb' - - 'ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb' - 'lib/banzai/filter/references/abstract_reference_filter.rb' - 'lib/banzai/renderer.rb' - 'lib/gitlab/conflict/file.rb' diff --git a/.rubocop_todo/qa/fabricate_usage.yml b/.rubocop_todo/qa/fabricate_usage.yml index 4560204b84c..ec3a94d4d75 100644 --- a/.rubocop_todo/qa/fabricate_usage.yml +++ b/.rubocop_todo/qa/fabricate_usage.yml @@ -33,4 +33,3 @@ QA/FabricateUsage: - 'qa/qa/specs/features/ee/browser_ui/12_systems/geo/rename_replication_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/12_systems/geo/ssh_push_spec.rb' - 'qa/qa/specs/features/ee/browser_ui/12_systems/geo/ssh_push_to_secondary_spec.rb' - - 'qa/qa/specs/features/ee/browser_ui/3_create/remote_development/workspace_actions_spec.rb' diff --git a/.rubocop_todo/rspec/named_subject.yml b/.rubocop_todo/rspec/named_subject.yml index 40e6ed52b02..45c9cf90b03 100644 --- a/.rubocop_todo/rspec/named_subject.yml +++ b/.rubocop_todo/rspec/named_subject.yml @@ -88,7 +88,6 @@ RSpec/NamedSubject: - 'ee/spec/finders/okrs/checkin_reminder_key_result_finder_spec.rb' - 'ee/spec/finders/productivity_analytics_finder_spec.rb' - 'ee/spec/finders/projects/integrations/jira/issues_finder_spec.rb' - - 'ee/spec/finders/remote_development/workspaces_finder_spec.rb' - 'ee/spec/finders/security/approval_groups_finder_spec.rb' - 'ee/spec/finders/security/pipeline_vulnerabilities_finder_spec.rb' - 'ee/spec/finders/security/vulnerabilities_finder_spec.rb' @@ -527,36 +526,6 @@ RSpec/NamedSubject: - 'ee/spec/lib/gitlab_subscriptions/upcoming_reconciliation_entity_spec.rb' - 'ee/spec/lib/omni_auth/strategies/kerberos_spec.rb' - 'ee/spec/lib/product_analytics/settings_spec.rb' - - 'ee/spec/lib/remote_development/agent_config/main_integration_spec.rb' - - 'ee/spec/lib/remote_development/agent_config/updater_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/devfile_flattener_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/editor_component_injector_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/main_integration_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/personal_access_token_creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/project_cloner_component_injector_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/volume_component_injector_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/volume_definer_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/workspace_creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/workspace_variables_creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/actual_state_calculator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/agent_info_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/agent_infos_observer_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/factory_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/params_extractor_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/params_to_infos_converter_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/main_integration_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/output/desired_config_generator_prev1_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/output/desired_config_generator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/output/devfile_parser_prev1_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/output/devfile_parser_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/output/rails_infos_observer_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/persistence/orphaned_workspaces_observer_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_from_agent_infos_updater_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_updater_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/update/main_integration_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/update/updater_spec.rb' - 'ee/spec/lib/sidebars/groups/menus/epics_menu_spec.rb' - 'ee/spec/lib/sidebars/groups/menus/security_compliance_menu_spec.rb' - 'ee/spec/lib/sidebars/projects/menus/learn_gitlab_menu_spec.rb' @@ -729,9 +698,6 @@ RSpec/NamedSubject: - 'ee/spec/models/protected_environment_spec.rb' - 'ee/spec/models/push_rule_spec.rb' - 'ee/spec/models/release_highlight_spec.rb' - - 'ee/spec/models/remote_development/remote_development_agent_config_spec.rb' - - 'ee/spec/models/remote_development/workspace_spec.rb' - - 'ee/spec/models/remote_development/workspace_variable_spec.rb' - 'ee/spec/models/requirements_management/requirement_spec.rb' - 'ee/spec/models/requirements_management/test_report_spec.rb' - 'ee/spec/models/saml_provider_spec.rb' diff --git a/.rubocop_todo/style/inline_disable_annotation.yml b/.rubocop_todo/style/inline_disable_annotation.yml index 136c5fe9a0c..9e83147da61 100644 --- a/.rubocop_todo/style/inline_disable_annotation.yml +++ b/.rubocop_todo/style/inline_disable_annotation.yml @@ -2033,15 +2033,6 @@ Style/InlineDisableAnnotation: - 'ee/lib/gitlab/zoekt/search_results.rb' - 'ee/lib/product_analytics/settings.rb' - 'ee/lib/quality/seeders/vulnerabilities.rb' - - 'ee/lib/remote_development/agent_config/updater.rb' - - 'ee/lib/remote_development/workspaces/reconcile/input/actual_state_calculator.rb' - - 'ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator.rb' - - 'ee/lib/remote_development/workspaces/reconcile/output/desired_config_generator_prev1.rb' - - 'ee/lib/remote_development/workspaces/reconcile/output/devfile_parser.rb' - - 'ee/lib/remote_development/workspaces/reconcile/output/devfile_parser_prev1.rb' - - 'ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_from_agent_infos_updater.rb' - - 'ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_finder.rb' - - 'ee/lib/remote_development/workspaces/reconcile/persistence/workspaces_to_be_returned_updater.rb' - 'ee/lib/system_check/geo/authorized_keys_check.rb' - 'ee/lib/system_check/geo/geo_database_configured_check.rb' - 'ee/lib/tasks/geo.rake' @@ -2127,16 +2118,6 @@ Style/InlineDisableAnnotation: - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_security_scans_metric_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/count_user_merge_requests_for_projects_with_applied_scan_result_policies_metric_spec.rb' - 'ee/spec/lib/gitlab/usage/metrics/instrumentations/protected_environment_approval_rules_required_approvals_average_metric_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/personal_access_token_creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/post_flatten_devfile_validator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/workspace_creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/create/workspace_variables_creator_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/input/factory_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/main_integration_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/main_reconcile_scenarios_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/reconcile/persistence/workspaces_from_agent_infos_updater_spec.rb' - - 'ee/spec/lib/remote_development/workspaces/update/updater_spec.rb' - 'ee/spec/mailers/emails/enterprise_users_spec.rb' - 'ee/spec/mailers/emails/merge_requests_spec.rb' - 'ee/spec/mailers/emails/okr_spec.rb' @@ -2204,7 +2185,6 @@ Style/InlineDisableAnnotation: - 'ee/spec/support/helpers/duo_chat_fixture_helpers.rb' - 'ee/spec/support/matchers/locked_schema.rb' - 'ee/spec/support/shared_contexts/graphql/geo/registries_shared_context.rb' - - 'ee/spec/support/shared_contexts/remote_development/remote_development_shared_contexts.rb' - 'ee/spec/support/shared_contexts/saas_registration_settings_context.rb' - 'ee/spec/support/shared_contexts/saas_trial_settings_context.rb' - 'ee/spec/support/shared_contexts/user_contribution_events_shared_context.rb' diff --git a/GITLAB_PAGES_VERSION b/GITLAB_PAGES_VERSION index 4a7fd6cd0fd..e347135ff4a 100644 --- a/GITLAB_PAGES_VERSION +++ b/GITLAB_PAGES_VERSION @@ -1 +1 @@ -885055526d498a171120e69d7fe1c769814b73ec +6cb3173f9a1468c93d5c3fa9327e9b560de1329b diff --git a/app/assets/javascripts/invite_members/components/invite_members_modal.vue b/app/assets/javascripts/invite_members/components/invite_members_modal.vue index 1a10130e969..27124808550 100644 --- a/app/assets/javascripts/invite_members/components/invite_members_modal.vue +++ b/app/assets/javascripts/invite_members/components/invite_members_modal.vue @@ -128,8 +128,6 @@ export default { invalidMembers: {}, source: 'unknown', mode: 'default', - // Kept in sync with "base" - selectedAccessLevel: undefined, errorsLimit: 2, isErrorsSectionExpanded: false, shouldShowEmptyInvitesAlert: false, @@ -355,9 +353,6 @@ export default { this.closeModal(); }, - onAccessLevelUpdate(val) { - this.selectedAccessLevel = val; - }, clearValidation() { this.invalidFeedbackMessage = ''; this.invalidMembers = {}; @@ -398,7 +393,6 @@ export default { @cancel="onCancel" @reset="resetFields" @submit="sendInvite" - @access-level="onAccessLevelUpdate" > <template #intro-text-before> <div v-if="isCelebration" class="gl-p-4 gl-font-size-h1"> diff --git a/app/assets/javascripts/invite_members/components/invite_modal_base.vue b/app/assets/javascripts/invite_members/components/invite_modal_base.vue index a55000010ff..d48bea3616d 100644 --- a/app/assets/javascripts/invite_members/components/invite_modal_base.vue +++ b/app/assets/javascripts/invite_members/components/invite_modal_base.vue @@ -1,7 +1,7 @@ <script> import { + GlCollapsibleListbox, GlFormGroup, - GlFormSelect, GlModal, GlDatepicker, GlLink, @@ -36,8 +36,8 @@ const DEFAULT_SLOTS = [ export default { components: { + GlCollapsibleListbox, GlFormGroup, - GlFormSelect, GlDatepicker, GlLink, GlModal, @@ -194,14 +194,6 @@ export default { }; }, }, - watch: { - selectedAccessLevel: { - immediate: true, - handler(val) { - this.$emit('access-level', val); - }, - }, - }, methods: { onReset() { // This component isn't necessarily disposed, @@ -308,11 +300,13 @@ export default { </template> </gl-sprintf> </template> - <gl-form-select + <gl-collapsible-listbox :id="dropdownId" v-model="selectedAccessLevel" data-qa-selector="access_level_dropdown" - :options="accessLevelsOptions" + data-testid="access-level-dropdown" + :items="accessLevelsOptions" + block /> </gl-form-group> diff --git a/app/controllers/projects/settings/merge_requests_controller.rb b/app/controllers/projects/settings/merge_requests_controller.rb index f09e324f574..2724e2d9eec 100644 --- a/app/controllers/projects/settings/merge_requests_controller.rb +++ b/app/controllers/projects/settings/merge_requests_controller.rb @@ -52,6 +52,7 @@ module Projects :resolve_outdated_diff_discussions, :only_allow_merge_if_all_discussions_are_resolved, :only_allow_merge_if_pipeline_succeeds, + :allow_merge_without_pipeline, :printing_merge_request_link_enabled, :remove_source_branch_after_merge, :merge_method, diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index cee56dca538..e8c6d6b1f9e 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -497,6 +497,7 @@ class ProjectsController < Projects::ApplicationController :name, :only_allow_merge_if_all_discussions_are_resolved, :only_allow_merge_if_pipeline_succeeds, + :allow_merge_without_pipeline, :path, :printing_merge_request_link_enabled, :public_builds, diff --git a/app/graphql/mutations/ci/catalog/resources/base.rb b/app/graphql/mutations/ci/catalog/resources/base.rb new file mode 100644 index 00000000000..4ff245d52ec --- /dev/null +++ b/app/graphql/mutations/ci/catalog/resources/base.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module Mutations + module Ci + module Catalog + module Resources + class Base < BaseMutation + argument :project_path, GraphQL::Types::ID, + required: true, + description: 'Project path belonging to the catalog resource.' + + def find_object(project_path:) + Project.find_by_full_path(project_path) + end + end + end + end + end +end diff --git a/app/graphql/mutations/ci/catalog/resources/create.rb b/app/graphql/mutations/ci/catalog/resources/create.rb index 7f934e101c8..34d60f780ca 100644 --- a/app/graphql/mutations/ci/catalog/resources/create.rb +++ b/app/graphql/mutations/ci/catalog/resources/create.rb @@ -4,13 +4,9 @@ module Mutations module Ci module Catalog module Resources - class Create < BaseMutation + class Create < Base graphql_name 'CatalogResourcesCreate' - argument :project_path, GraphQL::Types::ID, - required: true, - description: 'Project to convert to a catalog resource.' - authorize :add_catalog_resource def resolve(project_path:) @@ -23,12 +19,6 @@ module Mutations errors: errors } end - - private - - def find_object(project_path:) - Project.find_by_full_path(project_path) - end end end end diff --git a/app/graphql/mutations/ci/catalog/resources/destroy.rb b/app/graphql/mutations/ci/catalog/resources/destroy.rb new file mode 100644 index 00000000000..d33a8c1ef70 --- /dev/null +++ b/app/graphql/mutations/ci/catalog/resources/destroy.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +module Mutations + module Ci + module Catalog + module Resources + class Destroy < Base + graphql_name 'CatalogResourcesDestroy' + + authorize :add_catalog_resource + + def resolve(project_path:) + project = authorized_find!(project_path: project_path) + catalog_resource = project.catalog_resource + + response = ::Ci::Catalog::Resources::DestroyService.new(project, current_user).execute(catalog_resource) + + errors = response.success? ? [] : [response.message] + + { + errors: errors + } + end + end + end + end + end +end diff --git a/app/graphql/types/mutation_type.rb b/app/graphql/types/mutation_type.rb index e1bd1f603ad..8055247fb8a 100644 --- a/app/graphql/types/mutation_type.rb +++ b/app/graphql/types/mutation_type.rb @@ -139,6 +139,7 @@ module Types mount_mutation Mutations::ContainerRepositories::Destroy mount_mutation Mutations::ContainerRepositories::DestroyTags mount_mutation Mutations::Ci::Catalog::Resources::Create, alpha: { milestone: '15.11' } + mount_mutation Mutations::Ci::Catalog::Resources::Destroy, alpha: { milestone: '16.6' } mount_mutation Mutations::Ci::Catalog::Resources::Unpublish, alpha: { milestone: '16.6' } mount_mutation Mutations::Ci::Job::Cancel mount_mutation Mutations::Ci::Job::Play diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 524a9b8074b..051568a5674 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -1572,6 +1572,10 @@ class MergeRequest < ApplicationRecord project.only_allow_merge_if_pipeline_succeeds?(inherit_group_setting: true) end + def allow_merge_without_pipeline? + project.allow_merge_without_pipeline?(inherit_group_setting: true) + end + def only_allow_merge_if_all_discussions_are_resolved? project.only_allow_merge_if_all_discussions_are_resolved?(inherit_group_setting: true) end @@ -1579,6 +1583,7 @@ class MergeRequest < ApplicationRecord def mergeable_ci_state? return true unless only_allow_merge_if_pipeline_succeeds? return false unless actual_head_pipeline + return true if project.allow_merge_on_skipped_pipeline?(inherit_group_setting: true) && actual_head_pipeline.skipped? actual_head_pipeline.success? diff --git a/app/models/project.rb b/app/models/project.rb index 0d103094aec..4aec4207ece 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -539,6 +539,7 @@ class Project < ApplicationRecord with_options to: :project_setting do delegate :allow_merge_on_skipped_pipeline, :allow_merge_on_skipped_pipeline?, :allow_merge_on_skipped_pipeline= + delegate :allow_merge_without_pipeline, :allow_merge_without_pipeline?, :allow_merge_without_pipeline= delegate :has_confluence? delegate :has_shimo? delegate :show_diff_preview_in_email, :show_diff_preview_in_email=, :show_diff_preview_in_email? @@ -858,6 +859,7 @@ class Project < ApplicationRecord cascading_with_parent_namespace :only_allow_merge_if_pipeline_succeeds cascading_with_parent_namespace :allow_merge_on_skipped_pipeline cascading_with_parent_namespace :only_allow_merge_if_all_discussions_are_resolved + cascading_with_parent_namespace :allow_merge_without_pipeline def self.with_feature_available_for_user(feature, user) with_project_feature.merge(ProjectFeature.with_feature_available_for_user(feature, user)) diff --git a/app/services/ci/catalog/resources/destroy_service.rb b/app/services/ci/catalog/resources/destroy_service.rb new file mode 100644 index 00000000000..feea0302ca9 --- /dev/null +++ b/app/services/ci/catalog/resources/destroy_service.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module Ci + module Catalog + module Resources + class DestroyService + include Gitlab::Allowable + + attr_reader :project, :current_user + + def initialize(project, user) + @current_user = user + @project = project + end + + def execute(catalog_resource) + raise Gitlab::Access::AccessDeniedError unless can?(current_user, :add_catalog_resource, + project) + + catalog_resource.destroy! + + ServiceResponse.success(message: 'Catalog Resource destroyed') + end + end + end + end +end diff --git a/config/metrics/settings/20210204124856_instance_auto_devops_enabled.yml b/config/metrics/settings/20210204124856_instance_auto_devops_enabled.yml index 4e035f5bb5a..ccff2e5b472 100644 --- a/config/metrics/settings/20210204124856_instance_auto_devops_enabled.yml +++ b/config/metrics/settings/20210204124856_instance_auto_devops_enabled.yml @@ -9,6 +9,9 @@ value_type: boolean status: active time_frame: none data_source: system +instrumentation_class: GitlabSettingsMetric +options: + setting_method: auto_devops_enabled? distribution: - ce - ee diff --git a/config/metrics/settings/20210204124904_gravatar_enabled.yml b/config/metrics/settings/20210204124904_gravatar_enabled.yml index 0364fb9f6ac..1af899ff7fd 100644 --- a/config/metrics/settings/20210204124904_gravatar_enabled.yml +++ b/config/metrics/settings/20210204124904_gravatar_enabled.yml @@ -9,6 +9,9 @@ value_type: boolean status: active time_frame: none data_source: system +instrumentation_class: GitlabSettingsMetric +options: + setting_method: gravatar_enabled? distribution: - ce - ee diff --git a/config/metrics/settings/20210204124918_signup_enabled.yml b/config/metrics/settings/20210204124918_signup_enabled.yml index f9e47064771..ae30de3422d 100644 --- a/config/metrics/settings/20210204124918_signup_enabled.yml +++ b/config/metrics/settings/20210204124918_signup_enabled.yml @@ -9,6 +9,9 @@ value_type: boolean status: active time_frame: none data_source: system +instrumentation_class: GitlabSettingsMetric +options: + setting_method: allow_signup? distribution: - ce - ee diff --git a/config/metrics/settings/20210204124922_grafana_link_enabled.yml b/config/metrics/settings/20210204124922_grafana_link_enabled.yml index c80a6c88073..7c1a00eee71 100644 --- a/config/metrics/settings/20210204124922_grafana_link_enabled.yml +++ b/config/metrics/settings/20210204124922_grafana_link_enabled.yml @@ -9,6 +9,9 @@ value_type: boolean status: active time_frame: none data_source: system +instrumentation_class: GitlabSettingsMetric +options: + setting_method: grafana_enabled? distribution: - ce tier: diff --git a/config/metrics/settings/20210216180314_gitpod_enabled.yml b/config/metrics/settings/20210216180314_gitpod_enabled.yml index 3bd80b5e141..047f41fa9d5 100644 --- a/config/metrics/settings/20210216180314_gitpod_enabled.yml +++ b/config/metrics/settings/20210216180314_gitpod_enabled.yml @@ -9,6 +9,9 @@ value_type: boolean status: active time_frame: none data_source: system +instrumentation_class: GitlabSettingsMetric +options: + setting_method: gitpod_enabled? distribution: - ce - ee diff --git a/db/migrate/20231026172345_add_allow_merge_without_pipeline_to_namespace_settings.rb b/db/migrate/20231026172345_add_allow_merge_without_pipeline_to_namespace_settings.rb new file mode 100644 index 00000000000..e2f919acbc0 --- /dev/null +++ b/db/migrate/20231026172345_add_allow_merge_without_pipeline_to_namespace_settings.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class AddAllowMergeWithoutPipelineToNamespaceSettings < Gitlab::Database::Migration[2.2] + enable_lock_retries! + milestone '16.6' + + def change + add_column :namespace_settings, :allow_merge_without_pipeline, :boolean, default: false, null: false + end +end diff --git a/db/migrate/20231026175042_add_allow_merge_without_pipeline_to_project_settings.rb b/db/migrate/20231026175042_add_allow_merge_without_pipeline_to_project_settings.rb new file mode 100644 index 00000000000..c9d786bc801 --- /dev/null +++ b/db/migrate/20231026175042_add_allow_merge_without_pipeline_to_project_settings.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class AddAllowMergeWithoutPipelineToProjectSettings < Gitlab::Database::Migration[2.2] + enable_lock_retries! + milestone '16.6' + + def change + add_column :project_settings, :allow_merge_without_pipeline, :boolean, default: false, null: false + end +end diff --git a/db/post_migrate/20231110173626_drop_merge_requests_on_author_id_index.rb b/db/post_migrate/20231110173626_drop_merge_requests_on_author_id_index.rb new file mode 100644 index 00000000000..fac5f0ad679 --- /dev/null +++ b/db/post_migrate/20231110173626_drop_merge_requests_on_author_id_index.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class DropMergeRequestsOnAuthorIdIndex < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + + milestone '16.7' + + INDEX_NAME = 'index_merge_requests_on_author_id' + TABLE_NAME = :merge_requests + + def up + # Duplicated index. This index is covered by +index_merge_requests_on_author_id_and_created_at+ + remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME + end + + def down + add_concurrent_index TABLE_NAME, :author_id, name: INDEX_NAME + end +end diff --git a/db/schema_migrations/20231026172345 b/db/schema_migrations/20231026172345 new file mode 100644 index 00000000000..805a3790beb --- /dev/null +++ b/db/schema_migrations/20231026172345 @@ -0,0 +1 @@ +45048beec6a1167b9a3925c99dcc97067d3bbeb3716276c3afd180b2806018a4
\ No newline at end of file diff --git a/db/schema_migrations/20231026175042 b/db/schema_migrations/20231026175042 new file mode 100644 index 00000000000..fd4bf10c3be --- /dev/null +++ b/db/schema_migrations/20231026175042 @@ -0,0 +1 @@ +34f2680296663a5a929da3e43b45d320a8c811d5191e1901f52dbacf2a097e59
\ No newline at end of file diff --git a/db/schema_migrations/20231110173626 b/db/schema_migrations/20231110173626 new file mode 100644 index 00000000000..a8c8e082ad2 --- /dev/null +++ b/db/schema_migrations/20231110173626 @@ -0,0 +1 @@ +a26ca208d67553ecd81aa11be3f4b99dcb604dfb9d4d86932af3866e863add01
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 226be544ea2..5ea1c69abc5 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -19471,6 +19471,7 @@ CREATE TABLE namespace_settings ( default_branch_protection_defaults jsonb DEFAULT '{}'::jsonb NOT NULL, service_access_tokens_expiration_enforced boolean DEFAULT true NOT NULL, product_analytics_enabled boolean DEFAULT false NOT NULL, + allow_merge_without_pipeline boolean DEFAULT false NOT NULL, CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)), CONSTRAINT namespace_settings_unique_project_download_limit_alertlist_size CHECK ((cardinality(unique_project_download_limit_alertlist) <= 100)), CONSTRAINT namespace_settings_unique_project_download_limit_allowlist_size CHECK ((cardinality(unique_project_download_limit_allowlist) <= 100)) @@ -22054,6 +22055,7 @@ CREATE TABLE project_settings ( encrypted_product_analytics_configurator_connection_string bytea, encrypted_product_analytics_configurator_connection_string_iv bytea, pages_multiple_versions_enabled boolean DEFAULT false NOT NULL, + allow_merge_without_pipeline boolean DEFAULT false NOT NULL, CONSTRAINT check_1a30456322 CHECK ((char_length(pages_unique_domain) <= 63)), CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)), CONSTRAINT check_3ca5cbffe6 CHECK ((char_length(issue_branch_template) <= 255)), @@ -33285,8 +33287,6 @@ CREATE INDEX index_merge_requests_id_created_at_prepared_at ON merge_requests US CREATE INDEX index_merge_requests_on_assignee_id ON merge_requests USING btree (assignee_id); -CREATE INDEX index_merge_requests_on_author_id ON merge_requests USING btree (author_id); - CREATE INDEX index_merge_requests_on_author_id_and_created_at ON merge_requests USING btree (author_id, created_at); CREATE INDEX index_merge_requests_on_author_id_and_id ON merge_requests USING btree (author_id, id); diff --git a/doc/administration/email_from_gitlab.md b/doc/administration/email_from_gitlab.md index ec231d25da2..2b4ca07a8ab 100644 --- a/doc/administration/email_from_gitlab.md +++ b/doc/administration/email_from_gitlab.md @@ -7,37 +7,31 @@ type: howto, reference # Email from GitLab **(PREMIUM SELF)** -GitLab provides a tool to administrators for emailing all users, or users of -a chosen group or project, right from the Admin Area. Users receive the email -at their primary email address. +Administrators can email all users, or users of a chosen group or project. +Users receive the email at their primary email address. + +You might use this functionality to notify your users: + +- About a new project, a new feature, or a new product launch. +- About a new deployment, or that downtime is expected. For information about email notifications originating from GitLab, read [GitLab notification emails](../user/profile/notifications.md). -## Use-cases +## Sending emails to users from GitLab -- Notify your users about a new project, a new feature, or a new product launch. -- Notify your users about a new deployment, or that downtime is expected - for a particular reason. +You can send email notifications to all users, or only to users in a specific group or project. +You can send email notifications once every 10 minutes. -## Sending emails to users from GitLab +To send an email: 1. On the left sidebar, select **Search or go to**. 1. Select **Admin Area**. 1. Select **Overview > Users**. -1. Select **Send email to users**. - - ![administrators](img/email1.png) - -1. Compose an email and choose where to send it (all users or users of a - chosen group or project). The email body only supports plain text messages. - HTML, Markdown, and other rich text formats are not supported, and is - sent as plain text to users. - - ![compose an email](img/email2.png) - -NOTE: -[Starting with GitLab 13.0](https://gitlab.com/gitlab-org/gitlab/-/issues/31509), email notifications can be sent only once every 10 minutes. This helps minimize performance issues. +1. In the upper-right corner, select **Send email to users** (**{mail}**). +1. Complete the fields. The email body supports only plain text and does not support HTML, Markdown, or other rich text formats. +1. From the **Select group or project** dropdown list, select the recipient. +1. Select **Send message**. ## Unsubscribing from emails diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 4a1b536fd40..553b1e7b6ab 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -1909,7 +1909,7 @@ Input type: `CatalogResourcesCreateInput` | Name | Type | Description | | ---- | ---- | ----------- | | <a id="mutationcatalogresourcescreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | -| <a id="mutationcatalogresourcescreateprojectpath"></a>`projectPath` | [`ID!`](#id) | Project to convert to a catalog resource. | +| <a id="mutationcatalogresourcescreateprojectpath"></a>`projectPath` | [`ID!`](#id) | Project path belonging to the catalog resource. | #### Fields @@ -1918,6 +1918,28 @@ Input type: `CatalogResourcesCreateInput` | <a id="mutationcatalogresourcescreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | | <a id="mutationcatalogresourcescreateerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. | +### `Mutation.catalogResourcesDestroy` + +WARNING: +**Introduced** in 16.6. +This feature is an Experiment. It can be changed or removed at any time. + +Input type: `CatalogResourcesDestroyInput` + +#### Arguments + +| Name | Type | Description | +| ---- | ---- | ----------- | +| <a id="mutationcatalogresourcesdestroyclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | +| <a id="mutationcatalogresourcesdestroyprojectpath"></a>`projectPath` | [`ID!`](#id) | Project path belonging to the catalog resource. | + +#### Fields + +| Name | Type | Description | +| ---- | ---- | ----------- | +| <a id="mutationcatalogresourcesdestroyclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | +| <a id="mutationcatalogresourcesdestroyerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. | + ### `Mutation.ciAiGenerateConfig` WARNING: @@ -18761,6 +18783,7 @@ Returns [`PreviewBillableUserChange`](#previewbillableuserchange). | <a id="groupgitlabsubscriptionspreviewbillableuserchangeaddgroupid"></a>`addGroupId` | [`Int`](#int) | Group ID to add. | | <a id="groupgitlabsubscriptionspreviewbillableuserchangeadduseremails"></a>`addUserEmails` | [`[String!]`](#string) | User emails to add. | | <a id="groupgitlabsubscriptionspreviewbillableuserchangeadduserids"></a>`addUserIds` | [`[Int!]`](#int) | User IDs to add. | +| <a id="groupgitlabsubscriptionspreviewbillableuserchangememberroleid"></a>`memberRoleId` | [`Int`](#int) | Custom role assigned to the users. | | <a id="groupgitlabsubscriptionspreviewbillableuserchangerole"></a>`role` | [`GitlabSubscriptionsUserRole!`](#gitlabsubscriptionsuserrole) | Role of users being added to group. | ##### `Group.groupMembers` @@ -23569,6 +23592,7 @@ Returns [`PreviewBillableUserChange`](#previewbillableuserchange). | <a id="projectgitlabsubscriptionspreviewbillableuserchangeaddgroupid"></a>`addGroupId` | [`Int`](#int) | Group ID to add. | | <a id="projectgitlabsubscriptionspreviewbillableuserchangeadduseremails"></a>`addUserEmails` | [`[String!]`](#string) | User emails to add. | | <a id="projectgitlabsubscriptionspreviewbillableuserchangeadduserids"></a>`addUserIds` | [`[Int!]`](#int) | User IDs to add. | +| <a id="projectgitlabsubscriptionspreviewbillableuserchangememberroleid"></a>`memberRoleId` | [`Int`](#int) | Custom role assigned to the users. | | <a id="projectgitlabsubscriptionspreviewbillableuserchangerole"></a>`role` | [`GitlabSubscriptionsUserRole!`](#gitlabsubscriptionsuserrole) | Role of users being added to group. | ##### `Project.incidentManagementEscalationPolicies` diff --git a/doc/development/adding_service_component.md b/doc/development/adding_service_component.md index 3ce303d429a..7996a9b1195 100644 --- a/doc/development/adding_service_component.md +++ b/doc/development/adding_service_component.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Adding a new Service Component to GitLab diff --git a/doc/development/ai_architecture.md b/doc/development/ai_architecture.md index 54ad52f0c39..e1ad9745fee 100644 --- a/doc/development/ai_architecture.md +++ b/doc/development/ai_architecture.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # AI Architecture diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md index 318f9bed6d3..73c52dda859 100644 --- a/doc/development/api_graphql_styleguide.md +++ b/doc/development/api_graphql_styleguide.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GraphQL API style guide diff --git a/doc/development/api_styleguide.md b/doc/development/api_styleguide.md index 45568c700c7..7a5898c6521 100644 --- a/doc/development/api_styleguide.md +++ b/doc/development/api_styleguide.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # API style guide diff --git a/doc/development/application_secrets.md b/doc/development/application_secrets.md index 33bba2b3285..3961cc08d97 100644 --- a/doc/development/application_secrets.md +++ b/doc/development/application_secrets.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Application secrets diff --git a/doc/development/architecture.md b/doc/development/architecture.md index 094853f5c42..9fd94f4c75a 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GitLab architecture overview diff --git a/doc/development/backend/ruby_style_guide.md b/doc/development/backend/ruby_style_guide.md index 384d8122ccf..78f3de17031 100644 --- a/doc/development/backend/ruby_style_guide.md +++ b/doc/development/backend/ruby_style_guide.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Ruby style guide diff --git a/doc/development/bitbucket_cloud_importer.md b/doc/development/bitbucket_cloud_importer.md index 8a59743a243..7d8874417a9 100644 --- a/doc/development/bitbucket_cloud_importer.md +++ b/doc/development/bitbucket_cloud_importer.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Bitbucket Cloud importer developer documentation diff --git a/doc/development/caching.md b/doc/development/caching.md index c3385c8499d..9a02c795bbe 100644 --- a/doc/development/caching.md +++ b/doc/development/caching.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Caching guidelines diff --git a/doc/development/changelog.md b/doc/development/changelog.md index 486808f25e7..f2ba1aa13a9 100644 --- a/doc/development/changelog.md +++ b/doc/development/changelog.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Changelog entries diff --git a/doc/development/chaos_endpoints.md b/doc/development/chaos_endpoints.md index 196ec14bffa..0a11e76e8d9 100644 --- a/doc/development/chaos_endpoints.md +++ b/doc/development/chaos_endpoints.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Generating chaos in a test GitLab instance diff --git a/doc/development/code_comments.md b/doc/development/code_comments.md index 306f371f306..b1a360a8a2f 100644 --- a/doc/development/code_comments.md +++ b/doc/development/code_comments.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Code comments diff --git a/doc/development/code_review.md b/doc/development/code_review.md index c2f2a7643ae..ba336faecfb 100644 --- a/doc/development/code_review.md +++ b/doc/development/code_review.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Code Review Guidelines diff --git a/doc/development/contributing/design.md b/doc/development/contributing/design.md index c4ec0f66b62..b849daec18e 100644 --- a/doc/development/contributing/design.md +++ b/doc/development/contributing/design.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Design and user interface changes diff --git a/doc/development/contributing/first_contribution.md b/doc/development/contributing/first_contribution.md index 834f34328bc..a30c8edcb58 100644 --- a/doc/development/contributing/first_contribution.md +++ b/doc/development/contributing/first_contribution.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Tutorial: Make a GitLab contribution diff --git a/doc/development/contributing/index.md b/doc/development/contributing/index.md index abec161bd6e..5dc789aa1ac 100644 --- a/doc/development/contributing/index.md +++ b/doc/development/contributing/index.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Contribute to GitLab development diff --git a/doc/development/contributing/issue_workflow.md b/doc/development/contributing/issue_workflow.md index 0b1c7303fc0..b4e195cfc69 100644 --- a/doc/development/contributing/issue_workflow.md +++ b/doc/development/contributing/issue_workflow.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Issues workflow diff --git a/doc/development/contributing/merge_request_workflow.md b/doc/development/contributing/merge_request_workflow.md index e739799557e..7978ec1cb3b 100644 --- a/doc/development/contributing/merge_request_workflow.md +++ b/doc/development/contributing/merge_request_workflow.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Merge requests workflow diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md index 80ac0b872d6..f0398145404 100644 --- a/doc/development/contributing/style_guides.md +++ b/doc/development/contributing/style_guides.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Development style guides diff --git a/doc/development/dangerbot.md b/doc/development/dangerbot.md index 476d370e7ee..dbd53c8ed21 100644 --- a/doc/development/dangerbot.md +++ b/doc/development/dangerbot.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Danger bot diff --git a/doc/development/database/namespaces_storage_statistics.md b/doc/development/database/namespaces_storage_statistics.md index c653cfb145d..07754839a1f 100644 --- a/doc/development/database/namespaces_storage_statistics.md +++ b/doc/development/database/namespaces_storage_statistics.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Database case study: Namespaces storage statistics diff --git a/doc/development/dependencies.md b/doc/development/dependencies.md index 3b935ceba22..0acd9472075 100644 --- a/doc/development/dependencies.md +++ b/doc/development/dependencies.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Dependencies diff --git a/doc/development/deprecation_guidelines/index.md b/doc/development/deprecation_guidelines/index.md index d586f25ffbf..7d1551cfc6c 100644 --- a/doc/development/deprecation_guidelines/index.md +++ b/doc/development/deprecation_guidelines/index.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Deprecating GitLab features diff --git a/doc/development/development_seed_files.md b/doc/development/development_seed_files.md index 2bf3688fd48..18fedb90315 100644 --- a/doc/development/development_seed_files.md +++ b/doc/development/development_seed_files.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Development seed files diff --git a/doc/development/documentation/graphql_styleguide.md b/doc/development/documentation/graphql_styleguide.md index 3c96dd06b25..bad22110a3a 100644 --- a/doc/development/documentation/graphql_styleguide.md +++ b/doc/development/documentation/graphql_styleguide.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. description: "Writing styles, markup, formatting, and other standards for GraphQL API's GitLab Documentation." --- diff --git a/doc/development/documentation/site_architecture/automation.md b/doc/development/documentation/site_architecture/automation.md index 5b2b02ad97e..c199366f4fa 100644 --- a/doc/development/documentation/site_architecture/automation.md +++ b/doc/development/documentation/site_architecture/automation.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: For assistance with this Style Guide page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. --- # Automated pages diff --git a/doc/development/documentation/site_architecture/deployment_process.md b/doc/development/documentation/site_architecture/deployment_process.md index 767fdf907d6..7f232ad0c0d 100644 --- a/doc/development/documentation/site_architecture/deployment_process.md +++ b/doc/development/documentation/site_architecture/deployment_process.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: For assistance with this Style Guide page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. --- # Documentation deployments diff --git a/doc/development/documentation/site_architecture/folder_structure.md b/doc/development/documentation/site_architecture/folder_structure.md index d4a3c856e0a..739c432ee27 100644 --- a/doc/development/documentation/site_architecture/folder_structure.md +++ b/doc/development/documentation/site_architecture/folder_structure.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: For assistance with this Style Guide page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. --- # Folder structure for documentation diff --git a/doc/development/documentation/site_architecture/global_nav.md b/doc/development/documentation/site_architecture/global_nav.md index 3e0534220a8..0dfe538cfbd 100644 --- a/doc/development/documentation/site_architecture/global_nav.md +++ b/doc/development/documentation/site_architecture/global_nav.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: For assistance with this Style Guide page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. description: "Learn how GitLab docs' global navigation works and how to add new items." --- diff --git a/doc/development/documentation/site_architecture/index.md b/doc/development/documentation/site_architecture/index.md index 822c7992222..04bdff22150 100644 --- a/doc/development/documentation/site_architecture/index.md +++ b/doc/development/documentation/site_architecture/index.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: For assistance with this Style Guide page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. --- # Documentation site architecture diff --git a/doc/development/documentation/workflow.md b/doc/development/documentation/workflow.md index 5c99f5c48df..20392e82a9a 100644 --- a/doc/development/documentation/workflow.md +++ b/doc/development/documentation/workflow.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: For assistance with this Style Guide page, see https://handbook.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects. --- # Documentation workflow diff --git a/doc/development/ee_features.md b/doc/development/ee_features.md index d05249f3d3f..fa12ee4dc32 100644 --- a/doc/development/ee_features.md +++ b/doc/development/ee_features.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Guidelines for implementing Enterprise Edition features diff --git a/doc/development/emails.md b/doc/development/emails.md index bf32b71f2b7..c69eade7cb6 100644 --- a/doc/development/emails.md +++ b/doc/development/emails.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Working with email in development diff --git a/doc/development/event_store.md b/doc/development/event_store.md index 918da8fb738..a6d59f671ad 100644 --- a/doc/development/event_store.md +++ b/doc/development/event_store.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GitLab EventStore diff --git a/doc/development/fe_guide/architecture.md b/doc/development/fe_guide/architecture.md index 810d9af2de7..b7e5c5f9997 100644 --- a/doc/development/fe_guide/architecture.md +++ b/doc/development/fe_guide/architecture.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Architecture diff --git a/doc/development/fe_guide/axios.md b/doc/development/fe_guide/axios.md index 876855b807c..57d8bb39321 100644 --- a/doc/development/fe_guide/axios.md +++ b/doc/development/fe_guide/axios.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Axios diff --git a/doc/development/fe_guide/dark_mode.md b/doc/development/fe_guide/dark_mode.md index 185bd60dd9a..2bdc32dc0ba 100644 --- a/doc/development/fe_guide/dark_mode.md +++ b/doc/development/fe_guide/dark_mode.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- This page is about developing dark mode for GitLab. For more information on how to enable dark mode, see [Change the syntax highlighting theme](../../user/profile/preferences.md#change-the-syntax-highlighting-theme). diff --git a/doc/development/fe_guide/dependencies.md b/doc/development/fe_guide/dependencies.md index b9bacada499..0ba38c04d7b 100644 --- a/doc/development/fe_guide/dependencies.md +++ b/doc/development/fe_guide/dependencies.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Frontend dependencies diff --git a/doc/development/fe_guide/design_patterns.md b/doc/development/fe_guide/design_patterns.md index 44238ff5dc5..b8be003776f 100644 --- a/doc/development/fe_guide/design_patterns.md +++ b/doc/development/fe_guide/design_patterns.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Design Patterns diff --git a/doc/development/fe_guide/design_tokens.md b/doc/development/fe_guide/design_tokens.md index b47c2661e19..b98bded7759 100644 --- a/doc/development/fe_guide/design_tokens.md +++ b/doc/development/fe_guide/design_tokens.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Design tokens diff --git a/doc/development/fe_guide/emojis.md b/doc/development/fe_guide/emojis.md index c93e1bb34c5..f1e4c55f985 100644 --- a/doc/development/fe_guide/emojis.md +++ b/doc/development/fe_guide/emojis.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Emojis diff --git a/doc/development/fe_guide/frontend_faq.md b/doc/development/fe_guide/frontend_faq.md index ab75cc27b6a..b8e98b47cac 100644 --- a/doc/development/fe_guide/frontend_faq.md +++ b/doc/development/fe_guide/frontend_faq.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Frontend FAQ diff --git a/doc/development/fe_guide/frontend_goals.md b/doc/development/fe_guide/frontend_goals.md index 4f39e82c72e..d2ae9ceff28 100644 --- a/doc/development/fe_guide/frontend_goals.md +++ b/doc/development/fe_guide/frontend_goals.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Frontend Goals diff --git a/doc/development/fe_guide/getting_started.md b/doc/development/fe_guide/getting_started.md index 14e704d567e..5687d912de3 100644 --- a/doc/development/fe_guide/getting_started.md +++ b/doc/development/fe_guide/getting_started.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Getting started diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 5807c9c5621..b01f61bba0e 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GraphQL diff --git a/doc/development/fe_guide/guides.md b/doc/development/fe_guide/guides.md index dc2fffcf10a..ce53d3df0fc 100644 --- a/doc/development/fe_guide/guides.md +++ b/doc/development/fe_guide/guides.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Guides diff --git a/doc/development/fe_guide/haml.md b/doc/development/fe_guide/haml.md index 1dc8cf63de9..88f4a785a70 100644 --- a/doc/development/fe_guide/haml.md +++ b/doc/development/fe_guide/haml.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # HAML diff --git a/doc/development/fe_guide/icons.md b/doc/development/fe_guide/icons.md index df296f13f48..d1882644c02 100644 --- a/doc/development/fe_guide/icons.md +++ b/doc/development/fe_guide/icons.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Icons and SVG Illustrations diff --git a/doc/development/fe_guide/index.md b/doc/development/fe_guide/index.md index 6bea22bd6bf..fc42e02dfeb 100644 --- a/doc/development/fe_guide/index.md +++ b/doc/development/fe_guide/index.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Frontend Development Guidelines diff --git a/doc/development/fe_guide/keyboard_shortcuts.md b/doc/development/fe_guide/keyboard_shortcuts.md index aeeee72e6be..35ca240a2ad 100644 --- a/doc/development/fe_guide/keyboard_shortcuts.md +++ b/doc/development/fe_guide/keyboard_shortcuts.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Implementing keyboard shortcuts diff --git a/doc/development/feature_development.md b/doc/development/feature_development.md index 4dbde42b0ff..b1acf3301e2 100644 --- a/doc/development/feature_development.md +++ b/doc/development/feature_development.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Feature development diff --git a/doc/development/features_inside_dot_gitlab.md b/doc/development/features_inside_dot_gitlab.md index f8de93a2243..889e1349485 100644 --- a/doc/development/features_inside_dot_gitlab.md +++ b/doc/development/features_inside_dot_gitlab.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Features inside the `.gitlab/` directory diff --git a/doc/development/file_storage.md b/doc/development/file_storage.md index 39833a441ee..6d236b6f1b7 100644 --- a/doc/development/file_storage.md +++ b/doc/development/file_storage.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # File Storage in GitLab diff --git a/doc/development/gemfile.md b/doc/development/gemfile.md index ed38f6481e7..4801a8c2557 100644 --- a/doc/development/gemfile.md +++ b/doc/development/gemfile.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Gemfile development guidelines diff --git a/doc/development/gems.md b/doc/development/gems.md index 54d6e6dc30d..476ed8f916b 100644 --- a/doc/development/gems.md +++ b/doc/development/gems.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Gems development guidelines diff --git a/doc/development/github_importer.md b/doc/development/github_importer.md index 9ce95cf7da1..dd6b5c419f3 100644 --- a/doc/development/github_importer.md +++ b/doc/development/github_importer.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GitHub importer developer documentation diff --git a/doc/development/gotchas.md b/doc/development/gotchas.md index 59362dc33c0..6864676a719 100644 --- a/doc/development/gotchas.md +++ b/doc/development/gotchas.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Gotchas diff --git a/doc/development/import_project.md b/doc/development/import_project.md index 0be17ea5873..f592bfc5d35 100644 --- a/doc/development/import_project.md +++ b/doc/development/import_project.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Test import project diff --git a/doc/development/index.md b/doc/development/index.md index abc19645ecb..e6a07d6bfbb 100644 --- a/doc/development/index.md +++ b/doc/development/index.md @@ -2,7 +2,7 @@ type: index, dev stage: none group: unassigned -info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. description: "Development Guidelines: learn how to contribute to GitLab." --- diff --git a/doc/development/interacting_components.md b/doc/development/interacting_components.md index 7fb711795c1..b9da531f4f5 100644 --- a/doc/development/interacting_components.md +++ b/doc/development/interacting_components.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Developing against interacting components or features diff --git a/doc/development/internal_users.md b/doc/development/internal_users.md index 2b809137906..950660be163 100644 --- a/doc/development/internal_users.md +++ b/doc/development/internal_users.md @@ -3,7 +3,7 @@ description: "Internal users documentation." type: concepts, reference, dev stage: none group: unassigned -info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Internal users diff --git a/doc/development/json.md b/doc/development/json.md index bdb7f73ab62..2292e102fa3 100644 --- a/doc/development/json.md +++ b/doc/development/json.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # JSON development guidelines diff --git a/doc/development/licensing.md b/doc/development/licensing.md index de2df3c8ca1..2c11756acbc 100644 --- a/doc/development/licensing.md +++ b/doc/development/licensing.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GitLab Licensing and Compatibility diff --git a/doc/development/mass_insert.md b/doc/development/mass_insert.md index 24f6127a3de..e16f162abfa 100644 --- a/doc/development/mass_insert.md +++ b/doc/development/mass_insert.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Mass inserting Rails models diff --git a/doc/development/module_with_instance_variables.md b/doc/development/module_with_instance_variables.md index 733823d7f6e..36e6639857b 100644 --- a/doc/development/module_with_instance_variables.md +++ b/doc/development/module_with_instance_variables.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Modules with instance variables could be considered harmful diff --git a/doc/development/multi_version_compatibility.md b/doc/development/multi_version_compatibility.md index 36b392a0037..4f1fc1b0f10 100644 --- a/doc/development/multi_version_compatibility.md +++ b/doc/development/multi_version_compatibility.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Backwards compatibility across updates diff --git a/doc/development/namespaces.md b/doc/development/namespaces.md index e25b0f57f08..8a094541c27 100644 --- a/doc/development/namespaces.md +++ b/doc/development/namespaces.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Namespaces diff --git a/doc/development/performance.md b/doc/development/performance.md index 428d5637aa9..9bdb65aacba 100644 --- a/doc/development/performance.md +++ b/doc/development/performance.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Performance Guidelines diff --git a/doc/development/polling.md b/doc/development/polling.md index ff239effb80..fa295d6d2df 100644 --- a/doc/development/polling.md +++ b/doc/development/polling.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Polling with ETag caching diff --git a/doc/development/profiling.md b/doc/development/profiling.md index efee6ff3cd5..a7a5f993ca9 100644 --- a/doc/development/profiling.md +++ b/doc/development/profiling.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Profiling diff --git a/doc/development/projections.md b/doc/development/projections.md index caa54e7b912..a9a06d91d2c 100644 --- a/doc/development/projections.md +++ b/doc/development/projections.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Projections diff --git a/doc/development/pry_debugging.md b/doc/development/pry_debugging.md index 8ad584a8edc..890e6b490ae 100644 --- a/doc/development/pry_debugging.md +++ b/doc/development/pry_debugging.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Pry debugging diff --git a/doc/development/rails_initializers.md b/doc/development/rails_initializers.md index 93a7b568974..e3faf1accb1 100644 --- a/doc/development/rails_initializers.md +++ b/doc/development/rails_initializers.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Rails initializers diff --git a/doc/development/rails_update.md b/doc/development/rails_update.md index 772206c2d73..d00a1681e76 100644 --- a/doc/development/rails_update.md +++ b/doc/development/rails_update.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Rails upgrade guidelines diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md index d879668649d..25b0a42db3a 100644 --- a/doc/development/rake_tasks.md +++ b/doc/development/rake_tasks.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Rake tasks for developers diff --git a/doc/development/reactive_caching.md b/doc/development/reactive_caching.md index d0652c85c6d..00110d21dc0 100644 --- a/doc/development/reactive_caching.md +++ b/doc/development/reactive_caching.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # `ReactiveCaching` diff --git a/doc/development/redis.md b/doc/development/redis.md index 63a778ec1c1..612d2bbcf2a 100644 --- a/doc/development/redis.md +++ b/doc/development/redis.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Redis development guidelines diff --git a/doc/development/reference_processing.md b/doc/development/reference_processing.md index 5a026e0a2a0..044c1b01b30 100644 --- a/doc/development/reference_processing.md +++ b/doc/development/reference_processing.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. description: 'An introduction to reference parsers and reference filters, and a guide to their implementation.' --- diff --git a/doc/development/renaming_features.md b/doc/development/renaming_features.md index ee759efd7e2..94004177126 100644 --- a/doc/development/renaming_features.md +++ b/doc/development/renaming_features.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Renaming features diff --git a/doc/development/repository_mirroring.md b/doc/development/repository_mirroring.md index 6d95dec823b..d65df403fb9 100644 --- a/doc/development/repository_mirroring.md +++ b/doc/development/repository_mirroring.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Repository mirroring diff --git a/doc/development/reusing_abstractions.md b/doc/development/reusing_abstractions.md index 4a964f7d3c9..ba5998da844 100644 --- a/doc/development/reusing_abstractions.md +++ b/doc/development/reusing_abstractions.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Guidelines for reusing abstractions diff --git a/doc/development/routing.md b/doc/development/routing.md index 8f475674c39..7c635461320 100644 --- a/doc/development/routing.md +++ b/doc/development/routing.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Routing diff --git a/doc/development/rubocop_development_guide.md b/doc/development/rubocop_development_guide.md index 807544b71d4..7a9a590bc91 100644 --- a/doc/development/rubocop_development_guide.md +++ b/doc/development/rubocop_development_guide.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # RuboCop rule development guidelines diff --git a/doc/development/ruby3_gotchas.md b/doc/development/ruby3_gotchas.md index 0d000bc68df..16ca804e6d6 100644 --- a/doc/development/ruby3_gotchas.md +++ b/doc/development/ruby3_gotchas.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Ruby 3 gotchas diff --git a/doc/development/ruby_upgrade.md b/doc/development/ruby_upgrade.md index 61bc629e8c8..110bc6076b0 100644 --- a/doc/development/ruby_upgrade.md +++ b/doc/development/ruby_upgrade.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Ruby upgrade guidelines diff --git a/doc/development/scalability.md b/doc/development/scalability.md index 733e94cb5a7..ada7adc8bdd 100644 --- a/doc/development/scalability.md +++ b/doc/development/scalability.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GitLab scalability diff --git a/doc/development/secure_coding_guidelines.md b/doc/development/secure_coding_guidelines.md index 180d35e04fe..c46cde9a31a 100644 --- a/doc/development/secure_coding_guidelines.md +++ b/doc/development/secure_coding_guidelines.md @@ -2,7 +2,7 @@ type: reference, dev stage: none group: unassigned -info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-development-guidelines" +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Secure coding development guidelines diff --git a/doc/development/service_measurement.md b/doc/development/service_measurement.md index 9d22e9c376c..f193035560f 100644 --- a/doc/development/service_measurement.md +++ b/doc/development/service_measurement.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GitLab Developers Guide to service measurement diff --git a/doc/development/session.md b/doc/development/session.md index c30364c27f8..ecf9bee836a 100644 --- a/doc/development/session.md +++ b/doc/development/session.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Accessing session data diff --git a/doc/development/shared_files.md b/doc/development/shared_files.md index 3bf18a4d410..f39d3ee98bb 100644 --- a/doc/development/shared_files.md +++ b/doc/development/shared_files.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Shared files diff --git a/doc/development/shell_commands.md b/doc/development/shell_commands.md index 321bd7aeadd..39bcf7a875f 100644 --- a/doc/development/shell_commands.md +++ b/doc/development/shell_commands.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # Shell command development guidelines diff --git a/doc/development/utilities.md b/doc/development/utilities.md index 83b87d6d289..d2d7c1a11e8 100644 --- a/doc/development/utilities.md +++ b/doc/development/utilities.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # GitLab utilities diff --git a/doc/development/vs_code_debugging.md b/doc/development/vs_code_debugging.md index 66f69a74c86..457b3e5f792 100644 --- a/doc/development/vs_code_debugging.md +++ b/doc/development/vs_code_debugging.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. --- # VS Code debugging diff --git a/doc/development/windows.md b/doc/development/windows.md index 99085b4b5f8..26fcb886332 100644 --- a/doc/development/windows.md +++ b/doc/development/windows.md @@ -1,7 +1,7 @@ --- stage: none group: unassigned -info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments +info: Any user with at least the Maintainer role can merge updates to this content. For details, see https://docs.gitlab.com/ee/development/development_processes.html#development-guidelines-review. type: reference, howto --- diff --git a/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb b/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb index 2143497f084..6a1529ade92 100644 --- a/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb +++ b/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher.rb @@ -14,12 +14,14 @@ module Gitlab Issue => { serializer_class: AnalyticsIssueSerializer, includes_for_query: { project: { namespace: [:route] }, author: [] }, - columns_for_select: %I[title iid id created_at author_id project_id] + columns_for_select: %I[title iid id created_at author_id project_id], + finder_class: IssuesFinder }, MergeRequest => { serializer_class: AnalyticsMergeRequestSerializer, includes_for_query: { target_project: [:namespace], author: [] }, - columns_for_select: %I[title iid id created_at author_id state_id target_project_id] + columns_for_select: %I[title iid id created_at author_id state_id target_project_id], + finder_class: MergeRequestsFinder } }.freeze @@ -80,14 +82,17 @@ module Gitlab def load_issuables(stage_event_records) stage_event_records_by_issuable_id = stage_event_records.index_by(&:issuable_id) - issuable_model = stage_event_model.issuable_model - issuables_by_id = issuable_model.id_in(stage_event_records_by_issuable_id.keys).index_by(&:id) + issuables_by_id = finder.execute.id_in(stage_event_records_by_issuable_id.keys).index_by(&:id) stage_event_records_by_issuable_id.map do |issuable_id, record| [issuables_by_id[issuable_id], record] if issuables_by_id[issuable_id] end.compact end + def finder + MAPPINGS.fetch(subject_class).fetch(:finder_class).new(params[:current_user]) + end + def serializer MAPPINGS.fetch(subject_class).fetch(:serializer_class).new end diff --git a/lib/gitlab/analytics/cycle_analytics/request_params.rb b/lib/gitlab/analytics/cycle_analytics/request_params.rb index 0c4a0afa1d5..e284ed76749 100644 --- a/lib/gitlab/analytics/cycle_analytics/request_params.rb +++ b/lib/gitlab/analytics/cycle_analytics/request_params.rb @@ -119,6 +119,7 @@ module Gitlab attrs[:namespace] = namespace_attributes attrs[:enable_tasks_by_type_chart] = 'false' attrs[:enable_customizable_stages] = 'false' + attrs[:can_edit] = 'false' attrs[:enable_projects_filter] = 'false' attrs[:default_stages] = Gitlab::Analytics::CycleAnalytics::DefaultStages.all.map do |stage_params| ::Analytics::CycleAnalytics::StagePresenter.new(stage_params) diff --git a/lib/gitlab/email/receiver.rb b/lib/gitlab/email/receiver.rb index d5877234c3a..e36b07da801 100644 --- a/lib/gitlab/email/receiver.rb +++ b/lib/gitlab/email/receiver.rb @@ -85,7 +85,13 @@ module Gitlab def mail_key strong_memoize(:mail_key) do - find_first_key_from(to) || key_from_additional_headers + find_most_concrete_key_from(to) || key_from_additional_headers + end + end + + def find_most_concrete_key_from(items) + find_first_key_from(items) do |email| + Gitlab::Email::ServiceDesk::CustomEmail.key_from_reply_address(email) || email_class.key_from_address(email) end end @@ -93,7 +99,8 @@ module Gitlab items.each do |item| email = item.is_a?(Mail::Field) ? item.value : item - key = email_class.key_from_address(email) + key = block_given? ? yield(email) : email_class.key_from_address(email) + return key if key end nil diff --git a/lib/gitlab/email/service_desk/custom_email.rb b/lib/gitlab/email/service_desk/custom_email.rb index 30ae435a6ec..224fffc6521 100644 --- a/lib/gitlab/email/service_desk/custom_email.rb +++ b/lib/gitlab/email/service_desk/custom_email.rb @@ -7,6 +7,9 @@ module Gitlab # support all features and methods of ingestable email addresses like # incoming_email and service_desk_email. module CustomEmail + REPLY_ADDRESS_KEY_REGEXP = /\+([0-9a-f]{32})@/ + EMAIL_REGEXP = /\A[\w\-._]+@[\w\-.]+\.{1}[a-zA-Z]{2,}\z/ + class << self def reply_address(issue, reply_key) return if reply_key.nil? @@ -18,6 +21,31 @@ module Gitlab # We don't have a placeholder. custom_email.sub('@', "+#{reply_key}@") end + + def key_from_reply_address(email) + match_data = REPLY_ADDRESS_KEY_REGEXP.match(email) + return unless match_data + + key = match_data[1] + + settings = find_service_desk_setting_from_reply_address(email, key) + # We intentionally don't check whether custom email is enabled + # so we don't lose emails that are addressed to a disabled custom email address + return unless settings + + return unless Feature.enabled?(:service_desk_custom_email, settings.project) + + key + end + + private + + def find_service_desk_setting_from_reply_address(email, key) + potential_custom_email = email.sub("+#{key}", '') + return unless EMAIL_REGEXP.match?(potential_custom_email) + + ServiceDeskSetting.find_by_custom_email(potential_custom_email) + end end end end diff --git a/lib/gitlab/usage/metrics/instrumentations/generic_metric.rb b/lib/gitlab/usage/metrics/instrumentations/generic_metric.rb index 774f65da3bf..0a47045aab5 100644 --- a/lib/gitlab/usage/metrics/instrumentations/generic_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/generic_metric.rb @@ -32,9 +32,9 @@ module Gitlab super(metric_definition.reverse_merge(time_frame: 'none')) end - def value(...) + def value alt_usage_data(fallback: self.class.fallback) do - self.class.metric_value.call(...) + instance_eval(&self.class.metric_value) end end end diff --git a/lib/gitlab/usage/metrics/instrumentations/gitlab_settings_metric.rb b/lib/gitlab/usage/metrics/instrumentations/gitlab_settings_metric.rb new file mode 100644 index 00000000000..6a36b69e287 --- /dev/null +++ b/lib/gitlab/usage/metrics/instrumentations/gitlab_settings_metric.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Gitlab + module Usage + module Metrics + module Instrumentations + class GitlabSettingsMetric < GenericMetric + value do + # rubocop:disable GitlabSecurity/PublicSend -- this is on static data and not a user-controlled input + Gitlab::CurrentSettings.public_send(options[:setting_method]) + # rubocop:enable GitlabSecurity/PublicSend + end + end + end + end + end +end diff --git a/lib/gitlab/usage/metrics/instrumentations/index_inconsistencies_metric.rb b/lib/gitlab/usage/metrics/instrumentations/index_inconsistencies_metric.rb index 2ce7e95ce77..b5c3420b5fe 100644 --- a/lib/gitlab/usage/metrics/instrumentations/index_inconsistencies_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/index_inconsistencies_metric.rb @@ -18,26 +18,24 @@ module Gitlab end end - class << self - private + private - def database - database_model = Gitlab::Database.database_base_models[Gitlab::Database::MAIN_DATABASE_NAME] - Gitlab::Schema::Validation::Sources::Database.new(database_model.connection) - end + def database + database_model = Gitlab::Database.database_base_models[Gitlab::Database::MAIN_DATABASE_NAME] + Gitlab::Schema::Validation::Sources::Database.new(database_model.connection) + end - def structure_sql - stucture_sql_path = Rails.root.join('db/structure.sql') - Gitlab::Schema::Validation::Sources::StructureSql.new(stucture_sql_path) - end + def structure_sql + stucture_sql_path = Rails.root.join('db/structure.sql') + Gitlab::Schema::Validation::Sources::StructureSql.new(stucture_sql_path) + end - def validators - [ - Gitlab::Schema::Validation::Validators::MissingIndexes, - Gitlab::Schema::Validation::Validators::DifferentDefinitionIndexes, - Gitlab::Schema::Validation::Validators::ExtraIndexes - ] - end + def validators + [ + Gitlab::Schema::Validation::Validators::MissingIndexes, + Gitlab::Schema::Validation::Validators::DifferentDefinitionIndexes, + Gitlab::Schema::Validation::Validators::ExtraIndexes + ] end end end diff --git a/lib/gitlab/usage/metrics/instrumentations/prometheus_metric.rb b/lib/gitlab/usage/metrics/instrumentations/prometheus_metric.rb index ab1298b63c3..cc6be7fb349 100644 --- a/lib/gitlab/usage/metrics/instrumentations/prometheus_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/prometheus_metric.rb @@ -18,7 +18,7 @@ module Gitlab # end def value with_prometheus_client(verify: false, fallback: FALLBACK) do |client| - super(client) + self.class.metric_value.call(client) end end end diff --git a/lib/gitlab/usage/metrics/instrumentations/schema_inconsistencies_metric.rb b/lib/gitlab/usage/metrics/instrumentations/schema_inconsistencies_metric.rb index a481f7a5682..737cecccec3 100644 --- a/lib/gitlab/usage/metrics/instrumentations/schema_inconsistencies_metric.rb +++ b/lib/gitlab/usage/metrics/instrumentations/schema_inconsistencies_metric.rb @@ -21,22 +21,20 @@ module Gitlab end end - class << self - private + private - def validators - Gitlab::Schema::Validation::Validators::Base.all_validators - end + def validators + Gitlab::Schema::Validation::Validators::Base.all_validators + end - def database - database_model = Gitlab::Database.database_base_models[Gitlab::Database::MAIN_DATABASE_NAME] - Gitlab::Schema::Validation::Sources::Database.new(database_model.connection) - end + def database + database_model = Gitlab::Database.database_base_models[Gitlab::Database::MAIN_DATABASE_NAME] + Gitlab::Schema::Validation::Sources::Database.new(database_model.connection) + end - def structure_sql - stucture_sql_path = Rails.root.join('db/structure.sql') - Gitlab::Schema::Validation::Sources::StructureSql.new(stucture_sql_path) - end + def structure_sql + stucture_sql_path = Rails.root.join('db/structure.sql') + Gitlab::Schema::Validation::Sources::StructureSql.new(stucture_sql_path) end end end diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index bd0252dd15b..930a637cdd4 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -163,20 +163,15 @@ module Gitlab def features_usage_data_ce { - instance_auto_devops_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.auto_devops_enabled? }, container_registry_enabled: alt_usage_data(fallback: nil) { Gitlab.config.registry.enabled }, dependency_proxy_enabled: Gitlab.config.try(:dependency_proxy)&.enabled, gitlab_shared_runners_enabled: alt_usage_data(fallback: nil) { Gitlab.config.gitlab_ci.shared_runners_enabled }, - gravatar_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.gravatar_enabled? }, ldap_enabled: alt_usage_data(fallback: nil) { Gitlab.config.ldap.enabled }, mattermost_enabled: alt_usage_data(fallback: nil) { Gitlab.config.mattermost.enabled }, omniauth_enabled: alt_usage_data(fallback: nil) { Gitlab::Auth.omniauth_enabled? }, prometheus_enabled: alt_usage_data(fallback: nil) { Gitlab::Prometheus::Internal.prometheus_enabled? }, prometheus_metrics_enabled: alt_usage_data(fallback: nil) { Gitlab::Metrics.prometheus_metrics_enabled? }, - reply_by_email_enabled: alt_usage_data(fallback: nil) { Gitlab::Email::IncomingEmail.enabled? }, - signup_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.allow_signup? }, - grafana_link_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.grafana_enabled? }, - gitpod_enabled: alt_usage_data(fallback: nil) { Gitlab::CurrentSettings.gitpod_enabled? } + reply_by_email_enabled: alt_usage_data(fallback: nil) { Gitlab::Email::IncomingEmail.enabled? } } end diff --git a/package.json b/package.json index 773afdd1112..0ebf12ed752 100644 --- a/package.json +++ b/package.json @@ -190,7 +190,7 @@ "remark-rehype": "^10.1.0", "scrollparent": "^2.0.1", "semver": "^7.3.4", - "sentrybrowser": "npm:@sentry/browser@7.79.0", + "sentrybrowser": "npm:@sentry/browser@7.80.0", "sentrybrowser5": "npm:@sentry/browser@5.30.0", "sortablejs": "^1.10.2", "string-hash": "1.1.3", diff --git a/qa/qa/page/component/members/invite_members_modal.rb b/qa/qa/page/component/members/invite_members_modal.rb index b9d0b382ba1..e3d681cf403 100644 --- a/qa/qa/page/component/members/invite_members_modal.rb +++ b/qa/qa/page/component/members/invite_members_modal.rb @@ -76,8 +76,10 @@ module QA private def set_access_level(access_level) - # Guest option is selected by default, skipping these steps if desired option is 'Guest' - select_element(:access_level_dropdown, access_level) unless access_level == 'Guest' + within_element(:access_level_dropdown) do + expand_select_list + select_item access_level + end end end end diff --git a/qa/qa/page/search/results.rb b/qa/qa/page/search/results.rb index f9e5e97b96f..1f30cb3b756 100644 --- a/qa/qa/page/search/results.rb +++ b/qa/qa/page/search/results.rb @@ -20,7 +20,7 @@ module QA end def switch_to_code - click_element(:nav_item_link, submenu_item: 'Code') + click_element('nav-item-link', submenu_item: 'Code') end def switch_to_projects diff --git a/qa/qa/scenario/template.rb b/qa/qa/scenario/template.rb index 56ab4e14352..e7749ffe209 100644 --- a/qa/qa/scenario/template.rb +++ b/qa/qa/scenario/template.rb @@ -4,10 +4,10 @@ module QA module Scenario class Template class << self - def perform(*args) + def perform(...) new.tap do |scenario| yield scenario if block_given? - break scenario.perform(*args) + break scenario.perform(...) end end @@ -21,7 +21,10 @@ module QA end def perform(options, *args) - define_gitlab_address(options, args) + define_gitlab_address(args) + + # Store passed options globally + Support::GlobalOptions.set(options) # Save the scenario class name Runtime::Scenario.define(:klass, self.class.name) @@ -39,43 +42,24 @@ module QA # QA::Runtime::Release.perform_before_hooks unless QA::Runtime::Env.dry_run - Runtime::Feature.enable(options[:enable_feature]) if options.key?(:enable_feature) - - if options.key?(:disable_feature) && (@feature_enabled = Runtime::Feature.enabled?(options[:disable_feature])) - Runtime::Feature.disable(options[:disable_feature]) - end - - Runtime::Feature.set(options[:set_feature_flags]) if options.key?(:set_feature_flags) - Specs::Runner.perform do |specs| specs.tty = true specs.tags = self.class.focus specs.options = args if args.any? end - ensure - Runtime::Feature.disable(options[:enable_feature]) if options.key?(:enable_feature) - Runtime::Feature.enable(options[:disable_feature]) if options.key?(:disable_feature) && @feature_enabled - end - - def extract_address(name, options) - address = options[name] - validate_address(name, address) - - Runtime::Scenario.define(name, address) end private - delegate :define_gitlab_address_attribute!, to: 'QA::Support::GitlabAddress' + delegate :define_gitlab_address_attribute!, to: QA::Support::GitlabAddress # Define gitlab address attribute # # Use first argument if a valid address, else use named argument or default to environment variable # - # @param [Hash] options # @param [Array] args # @return [void] - def define_gitlab_address(options, args) + def define_gitlab_address(args) address_from_opt = Runtime::Scenario.attributes[:gitlab_address] return define_gitlab_address_attribute!(args.shift) if args.first && Runtime::Address.valid?(args.first) diff --git a/qa/qa/specs/helpers/feature_setup.rb b/qa/qa/specs/helpers/feature_setup.rb new file mode 100644 index 00000000000..fd1e84a5691 --- /dev/null +++ b/qa/qa/specs/helpers/feature_setup.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +module QA + module Specs + module Helpers + class FeatureSetup + class << self + # Set up feature flags + # + # @return [void] + def configure! + configure_rspec + end + + private + + # Add global hooks to perform feature flag changes + # + # @return [void] + def configure_rspec + setup = new + + ::RSpec.configure do |config| + config.before(:suite) { setup.run_before } + config.after(:suite) { setup.run_after } + end + end + end + + FF_PATTERN = /[a-z_]+=(enabled|disabled)/ + + private_class_method :new + + def initialize + @options = Support::GlobalOptions.get + @enable_feature = options[:enable_feature] + @disable_feature = options[:disable_feature] + end + + # Run feature setup before suite + # + # @return [void] + def run_before + set_feature_flags + + enable_features + disable_features + end + + # Restore feature state after suite + # + # @return [void] + def run_after + Runtime::Feature.disable(enable_feature) if enable_feature && !enabled + Runtime::Feature.enable(disable_feature) if disable_feature && !disabled + end + + private + + delegate :logger, to: Runtime::Logger + + attr_reader :options, :enable_feature, :disable_feature, :enabled, :disabled + + # Feature flags to set + # + # @return [<String, nil>] + def feature_flags + return @feature_flags if defined?(@feature_flags) + + @feature_flags ||= options[:set_feature_flags] || feature_flags_from_env + end + + # Fetch feature flags from environment variable + # + # @return [<Hash, nil>] + def feature_flags_from_env + ff = ENV["QA_FEATURE_FLAGS"] + return if ff.blank? + + ff.split(",").each_with_object({}) do |flag, hash| + unless flag.match?(FF_PATTERN) + error_msg = "'#{flag}' in QA_FEATURE_FLAGS environment variable doesn't match pattern '#{FF_PATTERN}'" + next logger.error(error_msg) + end + + name, value = flag.split("=") + hash[name] = value + end + end + + # Update group of feature flags + # + # @return [void] + def set_feature_flags + return unless feature_flags + + Runtime::Feature.set(feature_flags) + end + + # Enable features + # + # @return [void] + def enable_features + return unless enable_feature + + @enabled = Runtime::Feature.enabled?(enable_feature) + return if @enabled + + Runtime::Feature.enable(enable_feature) + end + + # Disable features + # + # @return [void] + def disable_features + return unless disable_feature + + @disabled = !Runtime::Feature.enabled?(disable_feature) + return if @disabled + + Runtime::Feature.disable(disable_feature) + end + end + end + end +end diff --git a/qa/qa/specs/spec_helper.rb b/qa/qa/specs/spec_helper.rb index 965e3c2f88c..27ac7224052 100644 --- a/qa/qa/specs/spec_helper.rb +++ b/qa/qa/specs/spec_helper.rb @@ -12,8 +12,10 @@ QA::Specs::QaDeprecationToolkitEnv.configure! Knapsack::Adapters::RSpecAdapter.bind if QA::Runtime::Env.knapsack? +# TODO: move all classes that perform rspec configuration under spec/helpers QA::Support::GitlabAddress.define_gitlab_address_attribute! QA::Runtime::Browser.configure! unless QA::Runtime::Env.dry_run +QA::Specs::Helpers::FeatureSetup.configure! QA::Runtime::AllureReport.configure! QA::Runtime::Scenario.from_env(QA::Runtime::Env.runtime_scenario_attributes) QA::Support::KnapsackReport.configure! @@ -122,7 +124,7 @@ RSpec.configure do |config| # show exception that triggers a retry if verbose_retry is set to true config.display_try_failure_messages = true - non_quarantine_retries = QA::Runtime::Env.ci_project_name =~ /staging|canary|production/ ? 3 : 2 + non_quarantine_retries = QA::Runtime::Env.ci_project_name.match?(/staging|canary|production/) ? 3 : 2 config.around do |example| quarantine = example.metadata[:quarantine] different_quarantine_context = QA::Specs::Helpers::Quarantine.quarantined_different_context?(quarantine) @@ -136,5 +138,5 @@ RSpec.configure do |config| end end -Dir[::File.join(__dir__, "features/shared_examples/**/*.rb")].sort.each { |f| require f } -Dir[::File.join(__dir__, "features/shared_contexts/**/*.rb")].sort.each { |f| require f } +Dir[::File.join(__dir__, "features/shared_examples/**/*.rb")].each { |f| require f } +Dir[::File.join(__dir__, "features/shared_contexts/**/*.rb")].each { |f| require f } diff --git a/qa/qa/support/global_options.rb b/qa/qa/support/global_options.rb new file mode 100644 index 00000000000..1069d9e720d --- /dev/null +++ b/qa/qa/support/global_options.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module QA + # Global options for test run + # + module Support + class GlobalOptions + class << self + # Get global cli options + # + # @return [Hash] + def get + @options ||= {} + end + + # Set global cli options + # + # @param [Hash] options + # @return [Hash] + def set(options) + @options = options + end + end + end + end +end diff --git a/qa/spec/scenario/template_spec.rb b/qa/spec/scenario/template_spec.rb index 56521cc13bc..37875ad57c9 100644 --- a/qa/spec/scenario/template_spec.rb +++ b/qa/spec/scenario/template_spec.rb @@ -11,7 +11,6 @@ RSpec.describe QA::Scenario::Template do before do stub_const('QA::Runtime::Release', release) - stub_const('QA::Runtime::Feature', feature) stub_const('QA::Runtime::Scenario', scenario) stub_const('QA::Specs::Runner', runner) @@ -26,62 +25,6 @@ RSpec.describe QA::Scenario::Template do QA::Support::GitlabAddress.instance_variable_set(:@initialized, false) end - it 'allows a feature to be enabled' do - subject.perform({ gitlab_address: gitlab_address, enable_feature: 'a-feature' }) - - expect(feature).to have_received(:enable).with('a-feature') - expect(feature).to have_received(:disable).with('a-feature') - end - - it 'allows a feature to be disabled' do - allow(QA::Runtime::Feature).to receive(:enabled?).with('another-feature').and_return(true) - - subject.perform({ gitlab_address: gitlab_address, disable_feature: 'another-feature' }) - - expect(feature).to have_received(:disable).with('another-feature') - expect(feature).to have_received(:enable).with('another-feature') - end - - it 'does not disable a feature if already disabled' do - allow(QA::Runtime::Feature).to receive(:enabled?).with('another-feature').and_return(false) - - subject.perform({ gitlab_address: gitlab_address, disable_feature: 'another-feature' }) - - expect(feature).not_to have_received(:disable).with('another-feature') - end - - it 'ensures an enabled feature is disabled afterwards' do - allow(QA::Specs::Runner).to receive(:perform).and_raise('failed test') - - expect { subject.perform({ gitlab_address: gitlab_address, enable_feature: 'a-feature' }) } - .to raise_error('failed test') - - expect(feature).to have_received(:enable).with('a-feature') - expect(feature).to have_received(:disable).with('a-feature') - end - - it 'ensures a disabled feature is enabled afterwards' do - allow(QA::Specs::Runner).to receive(:perform).and_raise('failed test') - allow(QA::Runtime::Feature).to receive(:enabled?).with('another-feature').and_return(true) - - expect { subject.perform({ gitlab_address: gitlab_address, disable_feature: 'another-feature' }) } - .to raise_error('failed test') - - expect(feature).to have_received(:disable).with('another-feature') - expect(feature).to have_received(:enable).with('another-feature') - end - - it 'ensures a disabled feature is not enabled afterwards if it was disabled earlier' do - allow(QA::Specs::Runner).to receive(:perform).and_raise('failed test') - allow(QA::Runtime::Feature).to receive(:enabled?).with('another-feature').and_return(false) - - expect { subject.perform({ gitlab_address: gitlab_address, disable_feature: 'another-feature' }) } - .to raise_error('failed test') - - expect(feature).not_to have_received(:disable).with('another-feature') - expect(feature).not_to have_received(:enable).with('another-feature') - end - it 'defines gitlab address from positional argument' do allow(scenario).to receive(:attributes).and_return({}) diff --git a/qa/spec/specs/allure_report_spec.rb b/qa/spec/specs/allure_report_spec.rb index 85befb2f602..8b01d50b4f3 100644 --- a/qa/spec/specs/allure_report_spec.rb +++ b/qa/spec/specs/allure_report_spec.rb @@ -3,7 +3,7 @@ describe QA::Runtime::AllureReport do include QA::Support::Helpers::StubEnv - let(:rspec_config) { instance_double('RSpec::Core::Configuration', 'add_formatter': nil, append_after: nil) } + let(:rspec_config) { instance_double('RSpec::Core::Configuration', add_formatter: nil, append_after: nil) } let(:png_path) { 'png_path' } let(:html_path) { 'html_path' } diff --git a/qa/spec/specs/helpers/feature_setup_spec.rb b/qa/spec/specs/helpers/feature_setup_spec.rb new file mode 100644 index 00000000000..07203e31aca --- /dev/null +++ b/qa/spec/specs/helpers/feature_setup_spec.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +describe QA::Specs::Helpers::FeatureSetup do + include QA::Support::Helpers::StubEnv + + let(:rspec_config) { instance_double(RSpec::Core::Configuration) } + let(:options) { {} } + let(:feature_enabled) { true } + + let(:feature_flags_env) { "" } + let(:feature_flags) { feature_flags_env.split(",").to_h { |ff| ff.split("=") } } + + before do + stub_env('QA_FEATURE_FLAGS', feature_flags_env) + + allow(RSpec).to receive(:configure).and_yield(rspec_config) + allow(rspec_config).to receive(:before).with(:suite).and_yield + allow(rspec_config).to receive(:after).with(:suite).and_yield + + allow(QA::Support::GlobalOptions).to receive(:get).and_return(options) + allow(QA::Runtime::Feature).to receive(:disable) + allow(QA::Runtime::Feature).to receive(:enable) + allow(QA::Runtime::Feature).to receive(:set).with(feature_flags) + allow(QA::Runtime::Feature).to receive(:enabled?).and_return(feature_enabled) + allow(QA::Runtime::Logger).to receive(:logger).and_return(instance_double(ActiveSupport::Logger, error: nil)) + + described_class.configure! + end + + context "without any features configured" do + it "doesn't perform any operations" do + expect(QA::Runtime::Feature).not_to have_received(:set) + expect(QA::Runtime::Feature).not_to have_received(:enable) + expect(QA::Runtime::Feature).not_to have_received(:disable) + end + end + + context "with enabling a feature" do + let(:options) { { enable_feature: 'a-feature' } } + + context "when feature is not enabled" do + let(:feature_enabled) { false } + + it "enables and restores feature" do + expect(QA::Runtime::Feature).to have_received(:enable).with(options[:enable_feature]) + expect(QA::Runtime::Feature).to have_received(:disable).with(options[:enable_feature]) + end + end + + context "when feature is already enabled" do + it "skips feature" do + expect(QA::Runtime::Feature).not_to have_received(:disable) + expect(QA::Runtime::Feature).not_to have_received(:enable) + end + end + end + + context "with disabling a feature" do + let(:options) { { disable_feature: 'a-feature' } } + + context "when feature is enabled" do + it "disables and restore feature" do + expect(QA::Runtime::Feature).to have_received(:disable).with(options[:disable_feature]) + expect(QA::Runtime::Feature).to have_received(:enable).with(options[:disable_feature]) + end + end + + context "when feature is already disabled" do + let(:feature_enabled) { false } + + it "skips feature" do + expect(QA::Runtime::Feature).not_to have_received(:disable) + expect(QA::Runtime::Feature).not_to have_received(:enable) + end + end + end + + context "with feature flags" do + context "with valid ff string" do + let(:feature_flags_env) { "some_flag=enabled,some_other_flag=disabled" } + + it "sets feature flags" do + expect(QA::Runtime::Feature).to have_received(:set).with(feature_flags) + end + end + + context "with not valid ff string" do + let(:feature_flags_env) { "some_flag=enabled,some_other_flag=invalid_state" } + let(:feature_flags) { { "some_flag" => "enabled" } } + + it "skips invalid pair" do + expect(QA::Runtime::Feature).to have_received(:set).with(feature_flags) + end + end + end +end diff --git a/spec/features/projects/members/manage_members_spec.rb b/spec/features/projects/members/manage_members_spec.rb index 76b2a73e170..3423c636c2b 100644 --- a/spec/features/projects/members/manage_members_spec.rb +++ b/spec/features/projects/members/manage_members_spec.rb @@ -108,7 +108,10 @@ RSpec.describe 'Projects > Members > Manage members', :js, feature_category: :on let(:current_user) { project_owner } it 'shows Owner in the dropdown' do - expect(page).to have_select('Select a role', options: %w[Guest Reporter Developer Maintainer Owner]) + within_modal do + toggle_listbox + expect_listbox_items(%w[Guest Reporter Developer Maintainer Owner]) + end end end @@ -116,8 +119,10 @@ RSpec.describe 'Projects > Members > Manage members', :js, feature_category: :on let(:current_user) { project_maintainer } it 'does not show the Owner option' do - expect(page).to have_select('Select a role', options: %w[Guest Reporter Developer Maintainer]) - expect(page).not_to have_select('Select a role', options: %w[Owner]) + within_modal do + toggle_listbox + expect_listbox_items(%w[Guest Reporter Developer Maintainer]) + end end end end diff --git a/spec/frontend/invite_members/components/invite_modal_base_spec.js b/spec/frontend/invite_members/components/invite_modal_base_spec.js index e70c83a424e..26e7d98b8f4 100644 --- a/spec/frontend/invite_members/components/invite_modal_base_spec.js +++ b/spec/frontend/invite_members/components/invite_modal_base_spec.js @@ -1,5 +1,5 @@ import { - GlFormSelect, + GlCollapsibleListbox, GlDatepicker, GlFormGroup, GlLink, @@ -9,7 +9,11 @@ import { } from '@gitlab/ui'; import { stubComponent } from 'helpers/stub_component'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; -import { mountExtended, shallowMountExtended } from 'helpers/vue_test_utils_helper'; +import { + mountExtended, + shallowMountExtended, + extendedWrapper, +} from 'helpers/vue_test_utils_helper'; import InviteModalBase from '~/invite_members/components/invite_modal_base.vue'; import ContentTransition from '~/vue_shared/components/content_transition.vue'; @@ -31,7 +35,7 @@ describe('InviteModalBase', () => { ? {} : { ContentTransition, - GlFormSelect: true, + GlCollapsibleListbox: true, GlSprintf, GlFormGroup: stubComponent(GlFormGroup, { props: ['state', 'invalidFeedback'], @@ -54,8 +58,8 @@ describe('InviteModalBase', () => { }); }; - const findFormSelect = () => wrapper.findComponent(GlFormSelect); - const findFormSelectOptions = () => findFormSelect().findAllComponents('option'); + const findListbox = () => extendedWrapper(wrapper.findComponent(GlCollapsibleListbox)); + const findListboxOptions = () => findListbox().findAllByRole('option'); const findDatepicker = () => wrapper.findComponent(GlDatepicker); const findLink = () => wrapper.findComponent(GlLink); const findIcon = () => wrapper.findComponent(GlIcon); @@ -108,12 +112,13 @@ describe('InviteModalBase', () => { }); it('sets the default dropdown text to the default access level name', () => { - expect(findFormSelect().exists()).toBe(true); - expect(findFormSelect().element.value).toBe('10'); + expect(findListbox().exists()).toBe(true); + const option = findListbox().find('[aria-selected]'); + expect(option.text()).toBe('Reporter'); }); it('renders dropdown items for each accessLevel', () => { - expect(findFormSelectOptions()).toHaveLength(5); + expect(findListboxOptions()).toHaveLength(5); }); }); @@ -211,7 +216,7 @@ describe('InviteModalBase', () => { it('renders correct blocks', () => { expect(findIcon().exists()).toBe(false); expect(findDisabledInput().exists()).toBe(false); - expect(findFormSelect().exists()).toBe(true); + expect(findListbox().exists()).toBe(true); expect(findDatepicker().exists()).toBe(true); expect(wrapper.findComponent(GlModal).text()).toMatch(textRegex); }); diff --git a/spec/frontend/invite_members/mock_data/modal_base.js b/spec/frontend/invite_members/mock_data/modal_base.js index 565e8d4df1e..c44e890da3d 100644 --- a/spec/frontend/invite_members/mock_data/modal_base.js +++ b/spec/frontend/invite_members/mock_data/modal_base.js @@ -3,7 +3,7 @@ export const propsData = { modalId: '_modal_id_', name: '_name_', accessLevels: { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 }, - defaultAccessLevel: 10, + defaultAccessLevel: 20, helpLink: 'https://example.com', labelIntroText: '_label_intro_text_', labelSearchField: '_label_search_field_', diff --git a/spec/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher_spec.rb b/spec/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher_spec.rb index aa0a1b66eef..14831f0e61d 100644 --- a/spec/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher_spec.rb +++ b/spec/lib/gitlab/analytics/cycle_analytics/aggregated/records_fetcher_spec.rb @@ -2,19 +2,23 @@ require 'spec_helper' -RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do - let_it_be(:project) { create(:project) } +RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher, feature_category: :value_stream_management do + let_it_be(:project, refind: true) { create(:project, :public) } let_it_be(:issue_1) { create(:issue, project: project) } - let_it_be(:issue_2) { create(:issue, project: project) } + let_it_be(:issue_2) { create(:issue, :confidential, project: project) } let_it_be(:issue_3) { create(:issue, project: project) } + let_it_be(:merge_request) { create(:merge_request, :unique_branches, source_project: project, target_project: project) } + + let_it_be(:user) { create(:user).tap { |u| project.add_developer(u) } } + let_it_be(:stage) { create(:cycle_analytics_stage, start_event_identifier: :issue_created, end_event_identifier: :issue_deployed_to_production, namespace: project.reload.project_namespace) } let_it_be(:stage_event_1) { create(:cycle_analytics_issue_stage_event, stage_event_hash_id: stage.stage_event_hash_id, project_id: project.id, issue_id: issue_1.id, start_event_timestamp: 2.years.ago, end_event_timestamp: 1.year.ago) } # duration: 1 year let_it_be(:stage_event_2) { create(:cycle_analytics_issue_stage_event, stage_event_hash_id: stage.stage_event_hash_id, project_id: project.id, issue_id: issue_2.id, start_event_timestamp: 5.years.ago, end_event_timestamp: 2.years.ago) } # duration: 3 years let_it_be(:stage_event_3) { create(:cycle_analytics_issue_stage_event, stage_event_hash_id: stage.stage_event_hash_id, project_id: project.id, issue_id: issue_3.id, start_event_timestamp: 6.years.ago, end_event_timestamp: 3.months.ago) } # duration: 5+ years - let(:params) { { from: 10.years.ago, to: Date.today } } + let(:params) { { from: 10.years.ago, to: Date.today, current_user: user } } subject(:records_fetcher) do query_builder = Gitlab::Analytics::CycleAnalytics::Aggregated::BaseQueryBuilder.new(stage: stage, params: params) @@ -25,7 +29,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do it 'returns issues in the correct order' do returned_iids = records_fetcher.serialized_records.pluck(:iid).map(&:to_i) - expect(returned_iids).to eq(expected_issue_ids) + expect(returned_iids).to eq(expected_iids) end it 'passes a hash with all expected attributes to the serializer' do @@ -52,7 +56,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do describe '#serialized_records' do describe 'sorting' do context 'when sorting by end event DESC' do - let(:expected_issue_ids) { [issue_3.iid, issue_1.iid, issue_2.iid] } + let(:expected_iids) { [issue_3.iid, issue_1.iid, issue_2.iid] } before do params[:sort] = :end_event @@ -76,7 +80,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do end context 'when sorting by end event ASC' do - let(:expected_issue_ids) { [issue_2.iid, issue_1.iid, issue_3.iid] } + let(:expected_iids) { [issue_2.iid, issue_1.iid, issue_3.iid] } before do params[:sort] = :end_event @@ -87,7 +91,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do end context 'when sorting by duration DESC' do - let(:expected_issue_ids) { [issue_3.iid, issue_2.iid, issue_1.iid] } + let(:expected_iids) { [issue_3.iid, issue_2.iid, issue_1.iid] } before do params[:sort] = :duration @@ -98,7 +102,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do end context 'when sorting by duration ASC' do - let(:expected_issue_ids) { [issue_1.iid, issue_2.iid, issue_3.iid] } + let(:expected_iids) { [issue_1.iid, issue_2.iid, issue_3.iid] } before do params[:sort] = :duration @@ -110,7 +114,7 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do end describe 'pagination' do - let(:expected_issue_ids) { [issue_3.iid] } + let(:expected_iids) { [issue_3.iid] } before do params[:sort] = :duration @@ -163,4 +167,66 @@ RSpec.describe Gitlab::Analytics::CycleAnalytics::Aggregated::RecordsFetcher do end end end + + describe 'respecting visibility rules' do + let(:expected_iids) { [issue_3.iid, issue_1.iid] } + + subject(:returned_iids) { records_fetcher.serialized_records.pluck(:iid).map(&:to_i) } + + context 'when current user is guest' do + before do + params[:current_user] = nil + end + + it { is_expected.to eq(expected_iids) } + end + + context 'when current user is logged and has no access to the project' do + before do + params[:current_user] = create(:user) + end + + it { is_expected.to eq(expected_iids) } + end + end + + context 'when querying merge requests' do + let_it_be(:mr_stage) { create(:cycle_analytics_stage, start_event_identifier: :merge_request_last_build_started, end_event_identifier: :merge_request_last_build_finished, namespace: project.reload.project_namespace) } + let_it_be(:mr_stage_event) { create(:cycle_analytics_merge_request_stage_event, stage_event_hash_id: mr_stage.stage_event_hash_id, project_id: project.id, merge_request_id: merge_request.id, start_event_timestamp: 2.years.ago, end_event_timestamp: 1.year.ago) } + + let(:stage) { mr_stage } + let(:expected_iids) { [merge_request.iid] } + + subject(:returned_iids) { records_fetcher.serialized_records.pluck(:iid).map(&:to_i) } + + it { is_expected.to eq(expected_iids) } + + context 'when current user is guest' do + before do + params[:current_user] = nil + end + + it { is_expected.to eq([merge_request.iid]) } + end + + context 'when current user is logged and has no access to the project' do + before do + params[:current_user] = create(:user) + end + + it { is_expected.to eq([merge_request.iid]) } + + context 'when MR access level is elevated' do + before do + project.project_feature.update!( + builds_access_level: ProjectFeature::PRIVATE, + repository_access_level: ProjectFeature::PRIVATE, + merge_requests_access_level: ProjectFeature::PRIVATE + ) + end + + it { is_expected.to eq([]) } + end + end + end end diff --git a/spec/lib/gitlab/email/receiver_spec.rb b/spec/lib/gitlab/email/receiver_spec.rb index c86a83092a4..aff5928c3da 100644 --- a/spec/lib/gitlab/email/receiver_spec.rb +++ b/spec/lib/gitlab/email/receiver_spec.rb @@ -2,10 +2,10 @@ require 'spec_helper' -RSpec.describe Gitlab::Email::Receiver do +RSpec.describe Gitlab::Email::Receiver, feature_category: :shared do include_context 'email shared context' - let_it_be(:project) { create(:project) } + let_it_be_with_reload(:project) { create(:project) } let(:metric_transaction) { instance_double(Gitlab::Metrics::WebTransaction) } shared_examples 'successful receive' do @@ -130,6 +130,63 @@ RSpec.describe Gitlab::Email::Receiver do it_behaves_like 'successful receive' end + + context 'when Service Desk custom email reply address in To header and no References header exists' do + let_it_be_with_refind(:setting) { create(:service_desk_setting, project: project, add_external_participants_from_cc: true) } + + let!(:credential) { create(:service_desk_custom_email_credential, project: project) } + let!(:verification) { create(:service_desk_custom_email_verification, :finished, project: project) } + let(:incoming_email) { "incoming+gitlabhq/gitlabhq+auth_token@appmail.example.com" } + let(:reply_key) { "5de1a83a6fc3c9fe34d756c7f484159e" } + let(:custom_email_reply) { "support+#{reply_key}@example.com" } + + context 'when custom email is enabled' do + let(:email_raw) do + <<~EMAIL + Delivered-To: #{incoming_email} + From: jake@example.com + To: #{custom_email_reply} + Subject: Reply titile + + Reply body + EMAIL + end + + let(:meta_key) { :to_address } + let(:meta_value) { [custom_email_reply] } + + before do + project.reset + setting.update!(custom_email: 'support@example.com', custom_email_enabled: true) + end + + it_behaves_like 'successful receive' do + let(:mail_key) { reply_key } + end + + # Email forwarding using a transport rule in Microsoft 365 adds the forwarding + # target to the `To` header. We have to select te custom email reply address + # before the incoming address (forwarding target) + # See https://gitlab.com/gitlab-org/gitlab/-/issues/426269#note_1629170865 for email structure + context 'when also Service Desk incoming address in To header' do + let(:email_raw) do + <<~EMAIL + From: jake@example.com + To: #{custom_email_reply}, #{incoming_email} + Subject: Reply titile + + Reply body + EMAIL + end + + let(:meta_value) { [custom_email_reply, incoming_email] } + + it_behaves_like 'successful receive' do + let(:mail_key) { reply_key } + end + end + end + end end context 'when we cannot find a capable handler' do diff --git a/spec/lib/gitlab/email/service_desk/custom_email_spec.rb b/spec/lib/gitlab/email/service_desk/custom_email_spec.rb index bba1ca1c8be..0905283c24a 100644 --- a/spec/lib/gitlab/email/service_desk/custom_email_spec.rb +++ b/spec/lib/gitlab/email/service_desk/custom_email_spec.rb @@ -6,10 +6,9 @@ RSpec.describe Gitlab::Email::ServiceDesk::CustomEmail, feature_category: :servi let(:reply_key) { 'b7721fc7e8419911a8bea145236a0519' } let(:custom_email) { 'support@example.com' } let(:email_with_reply_key) { 'support+b7721fc7e8419911a8bea145236a0519@example.com' } + let_it_be(:project) { create(:project) } describe '.reply_address' do - let_it_be(:project) { create(:project) } - subject(:reply_address) { described_class.reply_address(nil, nil) } it { is_expected.to be nil } @@ -34,4 +33,46 @@ RSpec.describe Gitlab::Email::ServiceDesk::CustomEmail, feature_category: :servi end end end + + describe '.key_from_reply_address' do + let(:email) { email_with_reply_key } + + subject(:reply_address) { described_class.key_from_reply_address(email) } + + it { is_expected.to be nil } + + context 'with service_desk_setting' do + let_it_be_with_refind(:setting) do + create(:service_desk_setting, project: project, add_external_participants_from_cc: true) + end + + it { is_expected.to be nil } + + context 'with custom email' do + let!(:credential) { create(:service_desk_custom_email_credential, project: project) } + let!(:verification) { create(:service_desk_custom_email_verification, :finished, project: project) } + + before do + project.reset + setting.update!(custom_email: 'support@example.com', custom_email_enabled: true) + end + + it { is_expected.to eq reply_key } + + context 'when feature flag service_desk_custom_email is disabled' do + before do + stub_feature_flags(service_desk_custom_email: false) + end + + it { is_expected.to be nil } + end + end + end + + context 'without reply key' do + let(:email) { custom_email } + + it { is_expected.to be nil } + end + end end diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/gitlab_settings_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/gitlab_settings_metric_spec.rb new file mode 100644 index 00000000000..26210b9febf --- /dev/null +++ b/spec/lib/gitlab/usage/metrics/instrumentations/gitlab_settings_metric_spec.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Gitlab::Usage::Metrics::Instrumentations::GitlabSettingsMetric, feature_category: :service_ping do + describe 'settings metric' do + using RSpec::Parameterized::TableSyntax + + where(:setting_value, :expected_value) do + false | false + true | true + end + + with_them do + before do + stub_application_setting(gravatar_enabled: setting_value) + end + + it_behaves_like 'a correct instrumented metric value', { + time_frame: 'none', + options: { + setting_method: 'gravatar_enabled' + } + } + end + end +end diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb index 861585fc916..25a032ec183 100644 --- a/spec/lib/gitlab/usage_data_spec.rb +++ b/spec/lib/gitlab/usage_data_spec.rb @@ -571,18 +571,13 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures, feature_category: :servic subject { described_class.features_usage_data_ce } it 'gathers feature usage data', :aggregate_failures do - expect(subject[:instance_auto_devops_enabled]).to eq(Gitlab::CurrentSettings.auto_devops_enabled?) expect(subject[:mattermost_enabled]).to eq(Gitlab.config.mattermost.enabled) - expect(subject[:signup_enabled]).to eq(Gitlab::CurrentSettings.allow_signup?) expect(subject[:ldap_enabled]).to eq(Gitlab.config.ldap.enabled) - expect(subject[:gravatar_enabled]).to eq(Gitlab::CurrentSettings.gravatar_enabled?) expect(subject[:omniauth_enabled]).to eq(Gitlab::Auth.omniauth_enabled?) expect(subject[:reply_by_email_enabled]).to eq(Gitlab::Email::IncomingEmail.enabled?) expect(subject[:container_registry_enabled]).to eq(Gitlab.config.registry.enabled) expect(subject[:dependency_proxy_enabled]).to eq(Gitlab.config.dependency_proxy.enabled) expect(subject[:gitlab_shared_runners_enabled]).to eq(Gitlab.config.gitlab_ci.shared_runners_enabled) - expect(subject[:grafana_link_enabled]).to eq(Gitlab::CurrentSettings.grafana_enabled?) - expect(subject[:gitpod_enabled]).to eq(Gitlab::CurrentSettings.gitpod_enabled?) end context 'with embedded Prometheus' do @@ -598,34 +593,6 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures, feature_category: :servic expect(subject[:prometheus_enabled]).to eq(false) end end - - context 'with embedded grafana' do - it 'returns true when embedded grafana is enabled' do - stub_application_setting(grafana_enabled: true) - - expect(subject[:grafana_link_enabled]).to eq(true) - end - - it 'returns false when embedded grafana is disabled' do - stub_application_setting(grafana_enabled: false) - - expect(subject[:grafana_link_enabled]).to eq(false) - end - end - - context 'with Gitpod' do - it 'returns true when is enabled' do - stub_application_setting(gitpod_enabled: true) - - expect(subject[:gitpod_enabled]).to eq(true) - end - - it 'returns false when is disabled' do - stub_application_setting(gitpod_enabled: false) - - expect(subject[:gitpod_enabled]).to eq(false) - end - end end describe '.components_usage_data' do diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index d3c32da2842..d6efdc954e8 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -6133,4 +6133,29 @@ RSpec.describe MergeRequest, factory_default: :keep, feature_category: :code_rev it { is_expected.to eq(false) } end end + + describe '#allow_merge_without_pipeline?' do + let(:merge_request) { build_stubbed(:merge_request) } + + subject(:result) { merge_request.allow_merge_without_pipeline? } + + before do + allow(merge_request.project) + .to receive(:allow_merge_without_pipeline?) + .with(inherit_group_setting: true) + .and_return(allow_merge_without_pipeline?) + end + + context 'when associated project allow_merge_without_pipeline? returns true' do + let(:allow_merge_without_pipeline?) { true } + + it { is_expected.to eq(true) } + end + + context 'when associated project allow_merge_without_pipeline? returns false' do + let(:allow_merge_without_pipeline?) { false } + + it { is_expected.to eq(false) } + end + end end diff --git a/spec/requests/api/graphql/mutations/ci/catalog/resources/destroy_spec.rb b/spec/requests/api/graphql/mutations/ci/catalog/resources/destroy_spec.rb new file mode 100644 index 00000000000..3b278f973b7 --- /dev/null +++ b/spec/requests/api/graphql/mutations/ci/catalog/resources/destroy_spec.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'CatalogResourceDestroy', feature_category: :pipeline_composition do + include GraphqlHelpers + + let_it_be(:current_user) { create(:user) } + let_it_be(:project) { create(:project, :catalog_resource_with_components) } + let_it_be(:catalog_resource) { create(:ci_catalog_resource, project: project) } + + let(:mutation) do + variables = { + project_path: project.full_path + } + graphql_mutation(:catalog_resources_destroy, variables, + <<-QL.strip_heredoc + errors + QL + ) + end + + context 'when unauthorized' do + it_behaves_like 'a mutation that returns a top-level access error' + end + + context 'when authorized' do + before do + catalog_resource.project.add_owner(current_user) + end + + it 'destroys the catalog resource' do + expect(project.catalog_resource).to eq(catalog_resource) + + post_graphql_mutation(mutation, current_user: current_user) + + expect(project.reload.catalog_resource).to be_nil + expect_graphql_errors_to_be_empty + end + end +end diff --git a/spec/requests/api/graphql/mutations/ci/catalog/unpublish_spec.rb b/spec/requests/api/graphql/mutations/ci/catalog/resources/unpublish_spec.rb index 07465777263..07465777263 100644 --- a/spec/requests/api/graphql/mutations/ci/catalog/unpublish_spec.rb +++ b/spec/requests/api/graphql/mutations/ci/catalog/resources/unpublish_spec.rb diff --git a/spec/requests/api/project_attributes.yml b/spec/requests/api/project_attributes.yml index 165ea7bf66e..96c711738c4 100644 --- a/spec/requests/api/project_attributes.yml +++ b/spec/requests/api/project_attributes.yml @@ -151,6 +151,7 @@ project_setting: - legacy_open_source_license_available - prevent_merge_without_jira_issue - only_allow_merge_if_all_status_checks_passed + - allow_merge_without_pipeline - warn_about_potentially_unwanted_characters - previous_default_branch - project_id diff --git a/spec/services/ci/catalog/resources/destroy_service_spec.rb b/spec/services/ci/catalog/resources/destroy_service_spec.rb new file mode 100644 index 00000000000..da5ba7ad0bc --- /dev/null +++ b/spec/services/ci/catalog/resources/destroy_service_spec.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Ci::Catalog::Resources::DestroyService, feature_category: :pipeline_composition do + let_it_be(:project) { create(:project, :catalog_resource_with_components) } + let_it_be(:catalog_resource) { create(:ci_catalog_resource, project: project) } + let_it_be(:user) { create(:user) } + + let(:service) { described_class.new(project, user) } + + before do + stub_licensed_features(ci_namespace_catalog: true) + end + + describe '#execute' do + context 'with an unauthorized user' do + it 'raises an AccessDeniedError' do + expect { service.execute(catalog_resource) }.to raise_error(Gitlab::Access::AccessDeniedError) + end + end + + context 'with an authorized user' do + before_all do + project.add_owner(user) + end + + it 'destroys a catalog resource' do + expect(project.catalog_resource).to eq(catalog_resource) + + response = service.execute(catalog_resource) + + expect(project.reload.catalog_resource).to be_nil + expect(response.status).to be(:success) + end + end + end +end diff --git a/spec/support/helpers/database/duplicate_indexes.yml b/spec/support/helpers/database/duplicate_indexes.yml index c16e7e85cfa..8ffbd5aa38b 100644 --- a/spec/support/helpers/database/duplicate_indexes.yml +++ b/spec/support/helpers/database/duplicate_indexes.yml @@ -103,13 +103,6 @@ member_tasks: members: index_members_on_member_namespace_id_compound: - index_members_on_member_namespace_id -merge_requests: - index_merge_requests_on_author_id_and_created_at: - - index_merge_requests_on_author_id - index_merge_requests_on_author_id_and_id: - - index_merge_requests_on_author_id - index_merge_requests_on_author_id_and_target_project_id: - - index_merge_requests_on_author_id ml_candidate_params: index_ml_candidate_params_on_candidate_id_on_name: - index_ml_candidate_params_on_candidate_id diff --git a/spec/support/helpers/features/invite_members_modal_helpers.rb b/spec/support/helpers/features/invite_members_modal_helpers.rb index deb75cffe0d..c40e060bc8e 100644 --- a/spec/support/helpers/features/invite_members_modal_helpers.rb +++ b/spec/support/helpers/features/invite_members_modal_helpers.rb @@ -2,6 +2,8 @@ module Features module InviteMembersModalHelpers + include ListboxHelpers + def invite_member(names, role: 'Guest', expires_at: nil) click_on 'Invite members' @@ -63,7 +65,10 @@ module Features end def choose_options(role, expires_at) - select role, from: 'Select a role' + page.within role_dropdown_selector do + toggle_listbox + select_listbox_item(role, exact_text: true) + end fill_in 'YYYY-MM-DD', with: expires_at.strftime('%Y-%m-%d') if expires_at end @@ -72,6 +77,10 @@ module Features click_link "Groups" end + def role_dropdown_selector + '[data-testid="access-level-dropdown"]' + end + def group_dropdown_selector '[data-testid="group-select-dropdown"]' end diff --git a/spec/support/helpers/usage_data_helpers.rb b/spec/support/helpers/usage_data_helpers.rb index 3b8c0b42fe8..8f17e44ed74 100644 --- a/spec/support/helpers/usage_data_helpers.rb +++ b/spec/support/helpers/usage_data_helpers.rb @@ -78,9 +78,7 @@ module UsageDataHelpers counts recorded_at mattermost_enabled - signup_enabled ldap_enabled - gravatar_enabled omniauth_enabled reply_by_email_enabled container_registry_enabled diff --git a/yarn.lock b/yarn.lock index 689d0b669a6..eefa0a7f453 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1913,14 +1913,14 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@sentry-internal/tracing@7.79.0": - version "7.79.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.79.0.tgz#db99820e93e15bf4d990f1b270a1d1c2a69fd564" - integrity sha512-Mf9Bd0OrZ24h1qZpvmz9IRnfORMGYNYC1xWBBFpIR1AauEDX89x+mJwIOrUc4KKAAAwt73shrJv1QA8QOm4E3g== +"@sentry-internal/tracing@7.80.0": + version "7.80.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.80.0.tgz#f9a6c0456b3cbf4a53c986a0b9208572d80e0756" + integrity sha512-P1Ab9gamHLsbH9D82i1HY8xfq9dP8runvc4g50AAd6OXRKaJ45f2KGRZUmnMEVqBQ7YoPYp2LFMkrhNYbcZEoQ== dependencies: - "@sentry/core" "7.79.0" - "@sentry/types" "7.79.0" - "@sentry/utils" "7.79.0" + "@sentry/core" "7.80.0" + "@sentry/types" "7.80.0" + "@sentry/utils" "7.80.0" "@sentry/core@5.30.0": version "5.30.0" @@ -1933,13 +1933,13 @@ "@sentry/utils" "5.30.0" tslib "^1.9.3" -"@sentry/core@7.79.0": - version "7.79.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.79.0.tgz#08871bd686afd58125f43421d3dcb65a3b9208b0" - integrity sha512-9vG7SfOcJNJNiqlqg4MuHDUCaSf2ZXpv3eZYRPbBkgPGr8X1ekrSABpOK+6kBNvbtKxfWVTWbLpAA6xU+cwnVw== +"@sentry/core@7.80.0": + version "7.80.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.80.0.tgz#7b8a460c19160b81ade20080333189f1a80c1410" + integrity sha512-nJiiymdTSEyI035/rdD3VOq6FlOZ2wWLR5bit9LK8a3rzHU3UXkwScvEo6zYgs0Xp1sC0yu1S9+0BEiYkmi29A== dependencies: - "@sentry/types" "7.79.0" - "@sentry/utils" "7.79.0" + "@sentry/types" "7.80.0" + "@sentry/utils" "7.80.0" "@sentry/hub@5.30.0": version "5.30.0" @@ -1959,25 +1959,25 @@ "@sentry/types" "5.30.0" tslib "^1.9.3" -"@sentry/replay@7.79.0": - version "7.79.0" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.79.0.tgz#53c658e5a51698bc32019be167427b8692e2a2b7" - integrity sha512-vF79NxWGYfoD0hnIkdgUQqedoMcRHHp5UAfZlxhpQzJf4TnbOjollp63AvOrfd38osSG2d3E5kTUU9xs/zKhBQ== +"@sentry/replay@7.80.0": + version "7.80.0" + resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.80.0.tgz#0626d85af1d8573038d52ae9e244e3e95fa47385" + integrity sha512-wWnpuJq3OaDLp1LutE4oxWXnau04fvwuzBjuaFvOXOV+pB/kn+pDPuVOC5+FH/RMRZ5ftwX5+dF6fojfcLVGCg== dependencies: - "@sentry-internal/tracing" "7.79.0" - "@sentry/core" "7.79.0" - "@sentry/types" "7.79.0" - "@sentry/utils" "7.79.0" + "@sentry-internal/tracing" "7.80.0" + "@sentry/core" "7.80.0" + "@sentry/types" "7.80.0" + "@sentry/utils" "7.80.0" "@sentry/types@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== -"@sentry/types@7.79.0": - version "7.79.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.79.0.tgz#b47c53a3f8b9057aac820fe99e1154949aac934d" - integrity sha512-3tV32+v/DF8w7kD0p3kLWtgVTVdFL39oGY02+vz//rjWg/vzeqSE95mCYKm5pUfd6cPETX/8dunCiuTBQIkTHQ== +"@sentry/types@7.80.0": + version "7.80.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.80.0.tgz#f6896de2d231a7f8d814cf1c981c474240e96d8a" + integrity sha512-4bpMO+2jWiWLDa8zbTASWWNLWe6yhjfPsa7/6VH5y9x1NGtL8oRbqUsTgsvjF3nmeHEMkHQsC8NHPaQ/ibFmZQ== "@sentry/utils@5.30.0": version "5.30.0" @@ -1987,12 +1987,12 @@ "@sentry/types" "5.30.0" tslib "^1.9.3" -"@sentry/utils@7.79.0": - version "7.79.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.79.0.tgz#c410b6c0e3032dbc9e708177555c70bdb8d1f63b" - integrity sha512-tUTlb6PvfZawqBmBK9CPXflqrZDXHKWoX3fve2zLK6W0FSpIMOO4TH8PBqkHBFs0ZgF/bnv/bsM4z7uEAlAtzg== +"@sentry/utils@7.80.0": + version "7.80.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.80.0.tgz#5bd682fa9a382eea952d4fa3628f0f33e4240ff3" + integrity sha512-XbBCEl6uLvE50ftKwrEo6XWdDaZXHXu+kkHXTPWQEcnbvfZKLuG9V0Hxtxxq3xQgyWmuF05OH1GcqYqiO+v5Yg== dependencies: - "@sentry/types" "7.79.0" + "@sentry/types" "7.80.0" "@sinclair/typebox@^0.24.1": version "0.24.40" @@ -11775,16 +11775,16 @@ send@0.17.2: "@sentry/utils" "5.30.0" tslib "^1.9.3" -"sentrybrowser@npm:@sentry/browser@7.79.0": - version "7.79.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.79.0.tgz#d05460161774642f37e4f53ee6006551aae49fed" - integrity sha512-gWbWEElF61uZeTFLIZz3NMyCkAzBDOpMAogEbVu2GX91SHKB7GXlE//INnS/R5wfE5j/CFaZc53mzzoIuMy1sA== +"sentrybrowser@npm:@sentry/browser@7.80.0": + version "7.80.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.80.0.tgz#385fb59ac1d52b67919087f3d7044575ae0abbdd" + integrity sha512-Ngwjc+yyf/aH5q7iQM1LeDNlhM1Ilt4ZLUogTghZR/guwNWmCtk3OHcjOLz7fxBBj9wGFUc2pHPyeYM6bQhrEw== dependencies: - "@sentry-internal/tracing" "7.79.0" - "@sentry/core" "7.79.0" - "@sentry/replay" "7.79.0" - "@sentry/types" "7.79.0" - "@sentry/utils" "7.79.0" + "@sentry-internal/tracing" "7.80.0" + "@sentry/core" "7.80.0" + "@sentry/replay" "7.80.0" + "@sentry/types" "7.80.0" + "@sentry/utils" "7.80.0" serialize-javascript@^2.1.2: version "2.1.2" |