Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-11-12 15:33:44 +00:00
parent 9d5c1efbd1
commit 4b68995570
161 changed files with 1416 additions and 761 deletions

View File

@ -31,7 +31,7 @@ default:
.default-ruby-variables: &default-ruby-variables
RUBY_VERSION: "${RUBY_VERSION_DEFAULT}"
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB_RUBY3_1"
OMNIBUS_GITLAB_CACHE_EDITION: "GITLAB_RUBY3_2"
.next-ruby-variables: &next-ruby-variables
RUBY_VERSION: "${RUBY_VERSION_NEXT}"

View File

@ -2,5 +2,4 @@
Database/AvoidInheritanceColumn:
Exclude:
- 'app/models/event.rb'
- 'app/models/integration.rb'
- 'lib/gitlab/background_migration/backfill_project_repositories.rb'

View File

@ -30,7 +30,6 @@ Database/AvoidUsingPluckWithoutLimit:
- 'app/models/event_collection.rb'
- 'app/models/group.rb'
- 'app/models/incident_management/timeline_event_tag.rb'
- 'app/models/integration.rb'
- 'app/models/integrations/base_chat_notification.rb'
- 'app/models/integrations/slack_workspace/api_scope.rb'
- 'app/models/integrations/slack_workspace/integration_api_scope.rb'

View File

@ -3477,7 +3477,6 @@ Gitlab/BoundedContexts:
- 'ee/app/services/vulnerability_issue_links/delete_service.rb'
- 'ee/app/services/vulnerability_merge_request_links/create_service.rb'
- 'ee/app/services/vulnerability_scanners/list_service.rb'
- 'ee/app/uploaders/ee/object_storage.rb'
- 'ee/app/validators/ee/json_schema_validator.rb'
- 'ee/app/validators/ldap_filter_validator.rb'
- 'ee/app/validators/password/complexity_validator.rb'

View File

@ -5,7 +5,6 @@ Gitlab/DocumentationLinks/Link:
Exclude:
- '**/*.haml'
- 'app/helpers/releases_helper.rb'
- 'app/models/integration.rb'
- 'app/presenters/clusters/cluster_presenter.rb'
- 'app/presenters/commit_status_presenter.rb'
- 'app/presenters/key_presenter.rb'
@ -20,7 +19,6 @@ Gitlab/DocumentationLinks/Link:
- 'ee/spec/lib/gitlab/llm/embeddings/utils/base_content_parser_spec.rb'
- 'ee/spec/support/shared_contexts/secrets_check_shared_contexts.rb'
- 'lib/backup/tasks/database.rb'
- 'lib/gitlab/security/features.rb'
- 'lib/system_check/helpers.rb'
- 'spec/mailers/emails/pages_domains_spec.rb'
- 'spec/presenters/clusters/cluster_presenter_spec.rb'

View File

@ -34,7 +34,6 @@ Gitlab/FeatureFlagWithoutActor:
- 'app/models/concerns/counter_attribute.rb'
- 'app/models/concerns/reset_on_column_errors.rb'
- 'app/models/concerns/web_hooks/auto_disabling.rb'
- 'app/models/integration.rb'
- 'app/models/merge_request.rb'
- 'app/models/namespace.rb'
- 'app/models/note.rb'
@ -122,7 +121,6 @@ Gitlab/FeatureFlagWithoutActor:
- 'ee/app/views/projects/settings/merge_requests/_merge_trains_settings.html.haml'
- 'ee/app/workers/search/index_curation_worker.rb'
- 'ee/app/workers/search/zoekt/scheduling_worker.rb'
- 'ee/app/workers/security/scan_execution_policies/create_pipeline_worker.rb'
- 'ee/app/workers/zoekt/indexer_worker.rb'
- 'ee/lib/api/code_suggestions.rb'
- 'ee/lib/api/epics.rb'

View File

@ -1,7 +1,6 @@
---
Gitlab/NoCodeCoverageComment:
Exclude:
- 'app/models/integration.rb'
- 'app/services/ci/job_artifacts/destroy_batch_service.rb'
- 'app/workers/database/batched_background_migration/single_database_worker.rb'
- 'ee/app/models/concerns/geo/replicable_model.rb'

View File

@ -73,7 +73,6 @@ Gitlab/NoFindInWorkers:
- 'ee/app/workers/ci/runners/export_usage_csv_worker.rb'
- 'ee/app/workers/compliance_management/chain_of_custody_report_worker.rb'
- 'ee/app/workers/compliance_management/framework_export_mailer_worker.rb'
- 'ee/app/workers/compliance_management/pending_status_check_worker.rb'
- 'ee/app/workers/compliance_management/project_framework_export_mailer_worker.rb'
- 'ee/app/workers/compliance_management/standards_adherence_export_mailer_worker.rb'
- 'ee/app/workers/compliance_management/update_default_framework_worker.rb'

View File

@ -5,7 +5,6 @@ Gitlab/StrongMemoizeAttr:
- 'app/controllers/concerns/wiki_actions.rb'
- 'app/controllers/jira_connect/application_controller.rb'
- 'app/controllers/jwt_controller.rb'
- 'app/controllers/oauth/authorizations_controller.rb'
- 'app/controllers/projects/analytics/cycle_analytics/stages_controller.rb'
- 'app/controllers/projects/boards_controller.rb'
- 'app/controllers/projects/compare_controller.rb'
@ -63,7 +62,6 @@ Gitlab/StrongMemoizeAttr:
- 'app/models/ci/job_artifact.rb'
- 'app/models/ci/pipeline.rb'
- 'app/models/ci/processable.rb'
- 'app/models/ci/runner.rb'
- 'app/models/clusters/cluster.rb'
- 'app/models/commit.rb'
- 'app/models/commit_collection.rb'
@ -222,13 +220,13 @@ Gitlab/StrongMemoizeAttr:
- 'ee/app/controllers/ee/groups/settings/repository_controller.rb'
- 'ee/app/controllers/ee/groups_controller.rb'
- 'ee/app/controllers/ee/repositories/git_http_controller.rb'
- 'ee/app/controllers/gitlab_subscriptions/subscriptions_controller.rb'
- 'ee/app/controllers/groups/audit_events_controller.rb'
- 'ee/app/controllers/groups/epic_boards_controller.rb'
- 'ee/app/controllers/groups/push_rules_controller.rb'
- 'ee/app/controllers/groups/todos_controller.rb'
- 'ee/app/controllers/projects/audit_events_controller.rb'
- 'ee/app/controllers/projects/subscriptions_controller.rb'
- 'ee/app/controllers/gitlab_subscriptions/subscriptions_controller.rb'
- 'ee/app/finders/approval_rules/group_finder.rb'
- 'ee/app/finders/concerns/epics/with_access_check.rb'
- 'ee/app/finders/ee/issues_finder.rb'

View File

@ -69,7 +69,6 @@ Layout/ClassStructure:
- 'app/models/gpg_key.rb'
- 'app/models/hooks/web_hook.rb'
- 'app/models/identity.rb'
- 'app/models/integration.rb'
- 'app/models/integrations/base_chat_notification.rb'
- 'app/models/integrations/base_ci.rb'
- 'app/models/integrations/base_issue_tracker.rb'
@ -253,7 +252,6 @@ Layout/ClassStructure:
- 'ee/app/services/security/security_orchestration_policies/on_demand_scan_pipeline_configuration_service.rb'
- 'ee/app/services/security/training_providers/base_url_service.rb'
- 'ee/app/validators/password/complexity_validator.rb'
- 'ee/app/workers/analytics/cycle_analytics/reaggregation_worker.rb'
- 'ee/app/workers/app_sec/container_scanning/scan_image_worker.rb'
- 'ee/app/workers/compliance_management/framework_export_mailer_worker.rb'
- 'ee/app/workers/compliance_management/project_framework_export_mailer_worker.rb'

View File

@ -71,9 +71,6 @@ Layout/LineBreakAfterFinalMixin:
- 'ee/app/services/product_analytics/initialize_stack_service.rb'
- 'ee/app/services/vulnerabilities/bulk_dismiss_service.rb'
- 'ee/app/workers/active_user_count_threshold_worker.rb'
- 'ee/app/workers/analytics/cycle_analytics/consistency_worker.rb'
- 'ee/app/workers/analytics/cycle_analytics/incremental_worker.rb'
- 'ee/app/workers/analytics/cycle_analytics/reaggregation_worker.rb'
- 'ee/app/workers/analytics/value_stream_dashboard/count_worker.rb'
- 'ee/app/workers/arkose/blocked_users_report_worker.rb'
- 'ee/app/workers/elastic_indexing_control_worker.rb'

View File

@ -58,8 +58,6 @@ Layout/LineContinuationSpacing:
- 'ee/spec/graphql/mutations/requirements_management/export_requirements_spec.rb'
- 'ee/spec/helpers/ee/labels_helper_spec.rb'
- 'ee/spec/helpers/push_rules_helper_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb'
- 'ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb'
- 'ee/spec/lib/gitlab/git_access_spec.rb'
- 'ee/spec/mailers/ee/emails/identity_verification_spec.rb'
- 'ee/spec/requests/api/graphql/mutations/epics/create_spec.rb'

View File

@ -193,9 +193,6 @@ Layout/LineEndStringConcatenationIndentation:
- 'ee/lib/system_check/geo/ssh_port_check.rb'
- 'ee/lib/tasks/gitlab/custom_roles/check_docs_task.rb'
- 'ee/lib/tasks/gitlab/geo.rake'
- 'ee/spec/components/namespaces/combined_storage_users/non_owner_alert_component_spec.rb'
- 'ee/spec/components/namespaces/combined_storage_users/owner_alert_component_spec.rb'
- 'ee/spec/components/namespaces/free_user_cap/enforcement_alert_component_spec.rb'
- 'ee/spec/components/namespaces/free_user_cap/enforcement_at_limit_alert_component_spec.rb'
- 'ee/spec/components/namespaces/free_user_cap/usage_quota_alert_component_spec.rb'
- 'ee/spec/components/namespaces/free_user_cap/usage_quota_trial_alert_component_spec.rb'
@ -225,12 +222,10 @@ Layout/LineEndStringConcatenationIndentation:
- 'ee/spec/helpers/users/identity_verification_helper_spec.rb'
- 'ee/spec/lib/banzai/filter/issuable_reference_expansion_filter_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/parsers/security/validators/schema_validator_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/status/build/manual_spec.rb'
- 'ee/spec/lib/ee/gitlab/namespace_storage_size_error_message_spec.rb'
- 'ee/spec/lib/environments/protected_environment_authorization_rule_changes_auditor_spec.rb'
- 'ee/spec/lib/gitlab/ci/config/entry/secret_spec.rb'
- 'ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb'
- 'ee/spec/lib/gitlab/ci/yaml_processor_spec.rb'
- 'ee/spec/lib/gitlab/database/desired_sharding_key_spec.rb'
- 'ee/spec/lib/gitlab/geo/every_repository_type_replicated_spec.rb'

View File

@ -119,7 +119,6 @@ Layout/LineLength:
- 'app/helpers/gitpod_helper.rb'
- 'app/helpers/groups/group_members_helper.rb'
- 'app/helpers/groups_helper.rb'
- 'app/helpers/ide_helper.rb'
- 'app/helpers/import_helper.rb'
- 'app/helpers/issuables_helper.rb'
- 'app/helpers/labels_helper.rb'

View File

@ -1,14 +1,16 @@
---
# Cop supports --autocorrect.
Lint/RedundantCopDisableDirective:
# Offense count: 58
# Offense count: 62
# Temporarily disabled due to too many offenses
Enabled: false
Exclude:
- 'app/controllers/concerns/enforces_two_factor_authentication.rb'
- 'app/controllers/groups/milestones_controller.rb'
- 'app/models/concerns/integrations/base/integration.rb'
- 'app/models/work_items/type.rb'
- 'app/policies/issue_policy.rb'
- 'app/services/ci/runners/set_runner_associated_projects_service.rb'
- 'app/services/work_items/data_sync/clone_service.rb'
- 'app/services/work_items/data_sync/move_service.rb'
- 'app/workers/authorized_project_update/user_refresh_over_user_range_worker.rb'
@ -17,8 +19,10 @@ Lint/RedundantCopDisableDirective:
- 'db/migrate/20241024204816_create_partitioned_ci_runner_managers.rb'
- 'db/post_migrate/20241021163518_drop_user_canonical_emails_table.rb'
- 'ee/app/controllers/ee/projects/settings/ci_cd_controller.rb'
- 'ee/app/models/ee/audit_events/project_audit_event.rb'
- 'ee/app/services/search/zoekt/routing_service.rb'
- 'ee/app/services/security/token_revocation_service.rb'
- 'ee/app/services/vulnerabilities/statistics/adjustment_service.rb'
- 'ee/db/geo/migrate/20210504143244_add_verification_to_merge_request_diff_registry.rb'
- 'ee/spec/features/groups/settings/domain_verification_spec.rb'
- 'ee/spec/features/projects/mirror_spec.rb'

View File

@ -14,5 +14,4 @@ Performance/FlatMap:
- 'lib/gitlab/diff/file_collection/base.rb'
- 'lib/gitlab/instrumentation/redis_cluster_validator.rb'
- 'lib/gitlab/testing/request_inspector_middleware.rb'
- 'lib/gitlab/usage_data_counters/hll_redis_counter.rb'
- 'qa/qa/tools/ci/non_empty_suites.rb'

View File

@ -83,7 +83,6 @@ Rails/Date:
- 'ee/spec/models/ci/minutes/namespace_monthly_usage_spec.rb'
- 'ee/spec/models/dora/performance_score_spec.rb'
- 'ee/spec/models/ee/group_spec.rb'
- 'ee/spec/models/ee/user_spec.rb'
- 'ee/spec/models/epic_spec.rb'
- 'ee/spec/models/geo_node_status_spec.rb'
- 'ee/spec/models/gitlab_subscription_spec.rb'
@ -200,7 +199,6 @@ Rails/Date:
- 'spec/models/project_daily_statistic_spec.rb'
- 'spec/models/user_custom_attribute_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/models/work_items/widgets/start_and_due_date_spec.rb'
- 'spec/requests/api/api_spec.rb'
- 'spec/requests/api/ci/runner/jobs_artifacts_spec.rb'
- 'spec/requests/api/graphql/ci/catalog/resource_spec.rb'

View File

@ -106,7 +106,6 @@ Rails/Pluck:
- 'lib/gitlab/merge_requests/message_generator.rb'
- 'lib/gitlab/sidekiq_config/cli_methods.rb'
- 'lib/gitlab/sql/pattern.rb'
- 'lib/gitlab/usage_data_counters/hll_redis_counter.rb'
- 'lib/gitlab/zentao/client.rb'
- 'lib/security/ci_configuration/sast_build_action.rb'
- 'lib/tasks/gitlab/info.rake'
@ -124,7 +123,6 @@ Rails/Pluck:
- 'spec/controllers/projects/autocomplete_sources_controller_spec.rb'
- 'spec/controllers/projects/environments_controller_spec.rb'
- 'spec/controllers/projects/feature_flags_controller_spec.rb'
- 'spec/controllers/projects/issues_controller_spec.rb'
- 'spec/controllers/projects/jobs_controller_spec.rb'
- 'spec/controllers/projects/pipelines/tests_controller_spec.rb'
- 'spec/controllers/projects/releases_controller_spec.rb'

View File

@ -263,6 +263,7 @@ Rails/StrongParams:
- 'ee/app/controllers/ee/repositories/git_http_controller.rb'
- 'ee/app/controllers/ee/sessions_controller.rb'
- 'ee/app/controllers/ee/users_controller.rb'
- 'ee/app/controllers/gitlab_subscriptions/subscriptions_controller.rb'
- 'ee/app/controllers/gitlab_subscriptions/trials_controller.rb'
- 'ee/app/controllers/groups/analytics/application_controller.rb'
- 'ee/app/controllers/groups/analytics/ci_cd_analytics_controller.rb'
@ -323,6 +324,5 @@ Rails/StrongParams:
- 'ee/app/controllers/security/projects_controller.rb'
- 'ee/app/controllers/smartcard_controller.rb'
- 'ee/app/controllers/subscriptions/groups_controller.rb'
- 'ee/app/controllers/gitlab_subscriptions/subscriptions_controller.rb'
- 'ee/app/controllers/users/base_identity_verification_controller.rb'
- 'ee/app/controllers/users/registrations_identity_verification_controller.rb'

View File

@ -311,7 +311,6 @@ RSpec/BeEq:
- 'ee/spec/models/vulnerabilities/finding_signature_spec.rb'
- 'ee/spec/models/vulnerabilities/finding_spec.rb'
- 'ee/spec/models/vulnerabilities/read_spec.rb'
- 'ee/spec/models/work_items/widgets/start_and_due_date_spec.rb'
- 'ee/spec/policies/ee/policy_actor_spec.rb'
- 'ee/spec/policies/group_policy_spec.rb'
- 'ee/spec/policies/project_policy_spec.rb'
@ -1082,7 +1081,6 @@ RSpec/BeEq:
- 'spec/models/application_setting_spec.rb'
- 'spec/models/attr_encrypted_patches_spec.rb'
- 'spec/models/audit_events/group_audit_event_spec.rb'
- 'spec/models/audit_events/project_audit_event_spec.rb'
- 'spec/models/authentication_event_spec.rb'
- 'spec/models/batched_git_ref_updates/deletion_spec.rb'
- 'spec/models/blob_spec.rb'
@ -1225,7 +1223,6 @@ RSpec/BeEq:
- 'spec/models/work_items/widgets/assignees_spec.rb'
- 'spec/models/work_items/widgets/hierarchy_spec.rb'
- 'spec/models/work_items/widgets/notifications_spec.rb'
- 'spec/models/work_items/widgets/start_and_due_date_spec.rb'
- 'spec/presenters/blob_presenter_spec.rb'
- 'spec/presenters/blobs/unfold_presenter_spec.rb'
- 'spec/presenters/commit_presenter_spec.rb'

View File

@ -11,6 +11,7 @@ RSpec/BeforeAllRoleAssignment:
- 'ee/spec/controllers/ee/groups_controller_spec.rb'
- 'ee/spec/controllers/ee/projects/autocomplete_sources_controller_spec.rb'
- 'ee/spec/controllers/ee/projects/jobs_controller_spec.rb'
- 'ee/spec/controllers/gitlab_subscriptions/subscriptions_controller_spec.rb'
- 'ee/spec/controllers/groups/analytics/coverage_reports_controller_spec.rb'
- 'ee/spec/controllers/groups/analytics/productivity_analytics_controller_spec.rb'
- 'ee/spec/controllers/groups/analytics/repository_analytics_controller_spec.rb'
@ -54,7 +55,6 @@ RSpec/BeforeAllRoleAssignment:
- 'ee/spec/controllers/projects_controller_spec.rb'
- 'ee/spec/controllers/registrations/groups_controller_spec.rb'
- 'ee/spec/controllers/security/projects_controller_spec.rb'
- 'ee/spec/controllers/gitlab_subscriptions/subscriptions_controller_spec.rb'
- 'ee/spec/features/admin/admin_sends_notification_spec.rb'
- 'ee/spec/features/analytics/code_analytics_spec.rb'
- 'ee/spec/features/analytics/group_analytics_spec.rb'

View File

@ -283,7 +283,6 @@ RSpec/ContextWording:
- 'ee/spec/lib/ee/gitlab/checks/push_rules/commit_check_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/config/entry/needs_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/matching/runner_matcher_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/templates/templates_spec.rb'
- 'ee/spec/lib/ee/gitlab/cleanup/orphan_job_artifact_files_batch_spec.rb'
- 'ee/spec/lib/ee/gitlab/cleanup/orphan_job_artifact_files_spec.rb'
@ -1489,7 +1488,6 @@ RSpec/ContextWording:
- 'spec/lib/gitlab/ci/ansi2html_spec.rb'
- 'spec/lib/gitlab/ci/ansi2json/style_spec.rb'
- 'spec/lib/gitlab/ci/ansi2json_spec.rb'
- 'spec/lib/gitlab/ci/badge/pipeline/status_spec.rb'
- 'spec/lib/gitlab/ci/badge/release/template_spec.rb'
- 'spec/lib/gitlab/ci/build/policy/refs_spec.rb'
- 'spec/lib/gitlab/ci/build/prerequisite/factory_spec.rb'

View File

@ -20,7 +20,6 @@ RSpec/ExampleWithoutDescription:
- 'ee/spec/finders/security/related_pipelines_finder_spec.rb'
- 'ee/spec/finders/security/scan_result_policies/findings_finder_spec.rb'
- 'ee/spec/finders/security/vulnerability_reads_finder_spec.rb'
- 'ee/spec/finders/users/add_on_trial_eligible_namespaces_finder_spec.rb'
- 'ee/spec/graphql/ee/resolvers/projects_resolver_spec.rb'
- 'ee/spec/graphql/ee/types/permission_types/deployment_spec.rb'
- 'ee/spec/graphql/resolvers/security/project_security_exclusion_resolver_spec.rb'

View File

@ -2,9 +2,9 @@
RSpec/ExpectInHook:
Exclude:
- 'ee/spec/controllers/ee/projects/merge_requests/content_controller_spec.rb'
- 'ee/spec/controllers/gitlab_subscriptions/subscriptions_controller_spec.rb'
- 'ee/spec/controllers/groups/analytics/productivity_analytics_controller_spec.rb'
- 'ee/spec/controllers/groups/seat_usage_controller_spec.rb'
- 'ee/spec/controllers/gitlab_subscriptions/subscriptions_controller_spec.rb'
- 'ee/spec/features/boards/new_issue_spec.rb'
- 'ee/spec/features/projects/feature_flags/user_creates_feature_flag_spec.rb'
- 'ee/spec/features/projects/feature_flags/user_deletes_feature_flag_spec.rb'

View File

@ -473,7 +473,6 @@ RSpec/FeatureCategory:
- 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_in_batch_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/pipeline/chain/validate/external_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/status/build/manual_spec.rb'
- 'ee/spec/lib/ee/gitlab/cleanup/orphan_job_artifact_files_spec.rb'
- 'ee/spec/lib/ee/gitlab/database_spec.rb'
@ -573,7 +572,6 @@ RSpec/FeatureCategory:
- 'ee/spec/lib/gitlab/ci/parsers/security/dast_spec.rb'
- 'ee/spec/lib/gitlab/ci/parsers/security/validators/default_branch_image_validator_spec.rb'
- 'ee/spec/lib/gitlab/ci/pipeline/chain/create_cross_database_associations_spec.rb'
- 'ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb'
- 'ee/spec/lib/gitlab/ci/reports/coverage_fuzzing/report_spec.rb'
- 'ee/spec/lib/gitlab/ci/reports/license_scanning/license_spec.rb'
- 'ee/spec/lib/gitlab/ci/reports/license_scanning/reports_comparer_spec.rb'
@ -988,7 +986,6 @@ RSpec/FeatureCategory:
- 'ee/spec/serializers/vulnerability_note_entity_spec.rb'
- 'ee/spec/services/admin/email_service_spec.rb'
- 'ee/spec/services/alert_management/extract_alert_payload_fields_service_spec.rb'
- 'ee/spec/services/analytics/cycle_analytics/aggregator_service_spec.rb'
- 'ee/spec/services/analytics/cycle_analytics/value_streams/update_service_spec.rb'
- 'ee/spec/services/analytics/devops_adoption/enabled_namespaces/bulk_delete_service_spec.rb'
- 'ee/spec/services/analytics/devops_adoption/enabled_namespaces/bulk_find_or_create_service_spec.rb'
@ -2119,9 +2116,7 @@ RSpec/FeatureCategory:
- 'spec/lib/gitlab/cache/helpers_spec.rb'
- 'spec/lib/gitlab/cache/request_cache_spec.rb'
- 'spec/lib/gitlab/cache_spec.rb'
- 'spec/lib/gitlab/changelog/committer_spec.rb'
- 'spec/lib/gitlab/changelog/generator_spec.rb'
- 'spec/lib/gitlab/changelog/release_spec.rb'
- 'spec/lib/gitlab/chat/output_spec.rb'
- 'spec/lib/gitlab/chat/responder/base_spec.rb'
- 'spec/lib/gitlab/chat_name_token_spec.rb'
@ -3347,7 +3342,6 @@ RSpec/FeatureCategory:
- 'spec/models/concerns/faster_cache_keys_spec.rb'
- 'spec/models/concerns/featurable_spec.rb'
- 'spec/models/concerns/feature_gate_spec.rb'
- 'spec/models/concerns/file_store_mounter_spec.rb'
- 'spec/models/concerns/from_except_spec.rb'
- 'spec/models/concerns/from_intersect_spec.rb'
- 'spec/models/concerns/from_set_operator_spec.rb'
@ -3438,7 +3432,6 @@ RSpec/FeatureCategory:
- 'spec/models/group_deploy_keys_group_spec.rb'
- 'spec/models/group_deploy_token_spec.rb'
- 'spec/models/group_import_state_spec.rb'
- 'spec/models/group_label_spec.rb'
- 'spec/models/groups/feature_setting_spec.rb'
- 'spec/models/hooks/active_hook_filter_spec.rb'
- 'spec/models/identity_spec.rb'
@ -3536,7 +3529,6 @@ RSpec/FeatureCategory:
- 'spec/models/project_custom_attribute_spec.rb'
- 'spec/models/project_deploy_token_spec.rb'
- 'spec/models/project_import_data_spec.rb'
- 'spec/models/project_label_spec.rb'
- 'spec/models/projects/build_artifacts_size_refresh_spec.rb'
- 'spec/models/projects/ci_feature_usage_spec.rb'
- 'spec/models/projects/project_topic_spec.rb'

View File

@ -18,6 +18,7 @@ RSpec/NamedSubject:
- 'ee/spec/controllers/ee/profiles/preferences_controller_spec.rb'
- 'ee/spec/controllers/ee/registrations_controller_spec.rb'
- 'ee/spec/controllers/ee/root_controller_spec.rb'
- 'ee/spec/controllers/gitlab_subscriptions/subscriptions_controller_spec.rb'
- 'ee/spec/controllers/groups/analytics/cycle_analytics/summary_controller_spec.rb'
- 'ee/spec/controllers/groups/analytics/productivity_analytics_controller_spec.rb'
- 'ee/spec/controllers/groups/analytics/repository_analytics_controller_spec.rb'
@ -54,7 +55,6 @@ RSpec/NamedSubject:
- 'ee/spec/controllers/registrations/welcome_controller_spec.rb'
- 'ee/spec/controllers/security/projects_controller_spec.rb'
- 'ee/spec/controllers/sitemap_controller_spec.rb'
- 'ee/spec/controllers/gitlab_subscriptions/subscriptions_controller_spec.rb'
- 'ee/spec/db/production/license_spec.rb'
- 'ee/spec/features/projects/pipelines/pipeline_spec.rb'
- 'ee/spec/features/user_sees_marketing_header_spec.rb'
@ -280,7 +280,6 @@ RSpec/NamedSubject:
- 'ee/spec/lib/ee/gitlab/ci/config/entry/need_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/config/entry/needs_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/parsers/security/validators/schema_validator_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/templates/templates_spec.rb'
- 'ee/spec/lib/ee/gitlab/elastic/helper_spec.rb'
- 'ee/spec/lib/ee/gitlab/group_search_results_spec.rb'
@ -354,7 +353,6 @@ RSpec/NamedSubject:
- 'ee/spec/lib/gitlab/ci/parsers/license_compliance/license_scanning_spec.rb'
- 'ee/spec/lib/gitlab/ci/parsers/metrics/generic_spec.rb'
- 'ee/spec/lib/gitlab/ci/pipeline/chain/create_cross_database_associations_spec.rb'
- 'ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb'
- 'ee/spec/lib/gitlab/ci/reports/coverage_fuzzing/report_spec.rb'
- 'ee/spec/lib/gitlab/ci/reports/license_scanning/dependency_spec.rb'
- 'ee/spec/lib/gitlab/ci/reports/license_scanning/license_spec.rb'
@ -2583,7 +2581,6 @@ RSpec/NamedSubject:
- 'spec/models/packages/dependency_link_spec.rb'
- 'spec/models/packages/dependency_spec.rb'
- 'spec/models/packages/npm/metadata_cache_spec.rb'
- 'spec/models/packages/nuget/metadatum_spec.rb'
- 'spec/models/packages/package_file_spec.rb'
- 'spec/models/packages/package_spec.rb'
- 'spec/models/packages/rpm/repository_file_spec.rb'
@ -2678,7 +2675,6 @@ RSpec/NamedSubject:
- 'spec/requests/api/ci/pipelines_spec.rb'
- 'spec/requests/api/ci/resource_groups_spec.rb'
- 'spec/requests/api/ci/runner/jobs_artifacts_spec.rb'
- 'spec/requests/api/ci/runner/runners_delete_spec.rb'
- 'spec/requests/api/commit_statuses_spec.rb'
- 'spec/requests/api/composer_packages_spec.rb'
- 'spec/requests/api/container_repositories_spec.rb'

View File

@ -38,7 +38,6 @@ RSpec/VerifiedDoubles:
- 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_in_batch_spec.rb'
- 'ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/matching/runner_matcher_spec.rb'
- 'ee/spec/lib/ee/gitlab/ci/pipeline/quota/size_spec.rb'
- 'ee/spec/lib/ee/gitlab/etag_caching/router/rails_spec.rb'
- 'ee/spec/lib/ee/gitlab/gon_helper_spec.rb'
- 'ee/spec/lib/elastic/latest/config_shared_examples.rb'
@ -51,7 +50,6 @@ RSpec/VerifiedDoubles:
- 'ee/spec/lib/gitlab/auth/otp/session_enforcer_spec.rb'
- 'ee/spec/lib/gitlab/authority_analyzer_spec.rb'
- 'ee/spec/lib/gitlab/cache_spec.rb'
- 'ee/spec/lib/gitlab/ci/pipeline/chain/limit/size_spec.rb'
- 'ee/spec/lib/gitlab/code_owners/groups_loader_spec.rb'
- 'ee/spec/lib/gitlab/code_owners/users_loader_spec.rb'
- 'ee/spec/lib/gitlab/custom_file_templates_spec.rb'

View File

@ -204,7 +204,6 @@ SidekiqLoadBalancing/WorkerDataConsistency:
- 'app/workers/propagate_integration_worker.rb'
- 'app/workers/rebase_worker.rb'
- 'app/workers/releases/create_evidence_worker.rb'
- 'app/workers/releases/manage_evidence_worker.rb'
- 'app/workers/releases/publish_event_worker.rb'
- 'app/workers/remote_mirror_notification_worker.rb'
- 'app/workers/remove_expired_group_links_worker.rb'
@ -245,7 +244,6 @@ SidekiqLoadBalancing/WorkerDataConsistency:
- 'app/workers/update_external_pull_requests_worker.rb'
- 'app/workers/update_head_pipeline_for_merge_request_worker.rb'
- 'app/workers/update_highest_role_worker.rb'
- 'app/workers/update_merge_requests_worker.rb'
- 'app/workers/update_project_statistics_worker.rb'
- 'app/workers/upload_checksum_worker.rb'
- 'app/workers/users/deactivate_dormant_users_worker.rb'

View File

@ -8,8 +8,6 @@ Style/IfUnlessModifier:
- 'app/helpers/merge_requests_helper.rb'
- 'app/helpers/nav_helper.rb'
- 'app/helpers/page_layout_helper.rb'
- 'app/helpers/preferences_helper.rb'
- 'app/helpers/projects_helper.rb'
- 'app/helpers/releases_helper.rb'
- 'app/helpers/routing/artifacts_helper.rb'
- 'app/helpers/search_helper.rb'
@ -19,9 +17,7 @@ Style/IfUnlessModifier:
- 'app/helpers/tab_helper.rb'
- 'app/helpers/timeboxes_helper.rb'
- 'app/helpers/webpack_helper.rb'
- 'app/helpers/wiki_helper.rb'
- 'app/helpers/x509_helper.rb'
- 'app/mailers/emails/members.rb'
- 'app/mailers/emails/merge_requests.rb'
- 'app/models/ability.rb'
- 'app/models/concerns/ci/artifactable.rb'
@ -287,7 +283,6 @@ Style/IfUnlessModifier:
- 'ee/app/serializers/ee/blob_entity.rb'
- 'ee/app/serializers/linked_epic_issue_entity.rb'
- 'ee/app/serializers/vulnerabilities/finding_serializer.rb'
- 'ee/app/services/analytics/cycle_analytics/validations.rb'
- 'ee/app/services/app_sec/dast/pipelines/find_latest_service.rb'
- 'ee/app/services/app_sec/dast/profiles/build_config_service.rb'
- 'ee/app/services/app_sec/dast/profiles/create_associations_service.rb'

View File

@ -155,12 +155,10 @@ Style/InlineDisableAnnotation:
- 'app/graphql/graphql_triggers.rb'
- 'app/graphql/mutations/issues/update.rb'
- 'app/graphql/mutations/projects/sync_fork.rb'
- 'app/graphql/mutations/releases/create.rb'
- 'app/graphql/mutations/work_items/export.rb'
- 'app/graphql/resolvers/base_resolver.rb'
- 'app/graphql/resolvers/ci/runner_groups_resolver.rb'
- 'app/graphql/resolvers/ci/runner_job_count_resolver.rb'
- 'app/graphql/resolvers/ci/runner_owner_project_resolver.rb'
- 'app/graphql/resolvers/ci/runner_projects_resolver.rb'
- 'app/graphql/resolvers/commit_pipelines_resolver.rb'
- 'app/graphql/resolvers/concerns/caching_array_resolver.rb'
@ -551,7 +549,6 @@ Style/InlineDisableAnnotation:
- 'app/services/ci/resource_groups/assign_resource_from_resource_group_service.rb'
- 'app/services/ci/runners/bulk_delete_runners_service.rb'
- 'app/services/ci/runners/reconcile_existing_runner_versions_service.rb'
- 'app/services/ci/runners/set_runner_associated_projects_service.rb'
- 'app/services/ci/stuck_builds/drop_helpers.rb'
- 'app/services/ci/stuck_builds/drop_pending_service.rb'
- 'app/services/ci/track_failed_build_service.rb'
@ -1362,9 +1359,6 @@ Style/InlineDisableAnnotation:
- 'ee/app/workers/adjourned_project_deletion_worker.rb'
- 'ee/app/workers/adjourned_projects_deletion_cron_worker.rb'
- 'ee/app/workers/admin_emails_worker.rb'
- 'ee/app/workers/analytics/cycle_analytics/consistency_worker.rb'
- 'ee/app/workers/analytics/cycle_analytics/incremental_worker.rb'
- 'ee/app/workers/analytics/cycle_analytics/reaggregation_worker.rb'
- 'ee/app/workers/analytics/devops_adoption/create_all_snapshots_worker.rb'
- 'ee/app/workers/analytics/devops_adoption/create_snapshot_worker.rb'
- 'ee/app/workers/analytics/value_stream_dashboard/count_worker.rb'
@ -1504,7 +1498,6 @@ Style/InlineDisableAnnotation:
- 'ee/lib/ee/api/helpers/members_helpers.rb'
- 'ee/lib/ee/api/internal/base.rb'
- 'ee/lib/ee/api/project_milestones.rb'
- 'ee/lib/ee/api/projects.rb'
- 'ee/lib/ee/api/settings.rb'
- 'ee/lib/ee/banzai/filter/references/epic_reference_filter.rb'
- 'ee/lib/ee/banzai/reference_parser/epic_parser.rb'
@ -1845,7 +1838,6 @@ Style/InlineDisableAnnotation:
- 'lib/gitlab/background_migration/backfill_project_repositories.rb'
- 'lib/gitlab/background_migration/batched_migration_job.rb'
- 'lib/gitlab/background_migration/batching_strategies/backfill_project_namespace_per_group_batching_strategy.rb'
- 'lib/gitlab/background_migration/batching_strategies/primary_key_batching_strategy.rb'
- 'lib/gitlab/background_migration/delete_invalid_epic_issues.rb'
- 'lib/gitlab/background_migration/delete_orphans_approval_project_rules2.rb'
- 'lib/gitlab/background_migration/fix_projects_without_prometheus_service.rb'
@ -2151,7 +2143,6 @@ Style/InlineDisableAnnotation:
- 'qa/qa/page/component/issuable/sidebar.rb'
- 'qa/qa/page/component/new_snippet.rb'
- 'qa/qa/page/file/show.rb'
- 'qa/qa/page/merge_request/show.rb'
- 'qa/qa/page/project/activity.rb'
- 'qa/qa/page/project/issue/index.rb'
- 'qa/qa/page/project/secure/configuration_form.rb'

View File

@ -11,7 +11,6 @@ Style/NumberedParameters:
- 'app/models/active_session.rb'
- 'app/models/bulk_imports/entity.rb'
- 'app/models/hooks/web_hook.rb'
- 'app/models/integration.rb'
- 'app/models/integrations/clickup.rb'
- 'app/models/integrations/datadog.rb'
- 'app/models/integrations/youtrack.rb'

View File

@ -1 +1 @@
a3b447448698d44d0c93138fa68c1877c5bab70e
7608c9704fb3dd503b9a7c18ea8d1a7ed6bdd02f

View File

@ -1 +1 @@
0c8b611421eb6b88b57d0e821305c2a56c453c25
59a9a4683512829b6ec9c9819b78d42e8e02f091

View File

@ -1 +1 @@
17af60d3c2af0b548781cda116c11b54640ff125
7b7b6cfb6ab5617de9c1e573438b2e602e4837db

View File

@ -74,7 +74,7 @@ const defaultClient = createDefaultClient(
{
cacheConfig: {
dataIdFromObject: (object) => {
// eslint-disable-next-line no-underscore-dangle, @gitlab/require-i18n-strings
// eslint-disable-next-line no-underscore-dangle
if (object.__typename === 'Design') {
return object.id && object.image ? `${object.id}-${object.image}` : uniqueId();
}

View File

@ -55,8 +55,6 @@ export const extractDesignNoteId = (urlHash) => {
*/
export const designUploadOptimisticResponse = (files) => {
const designs = files.map((file) => ({
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Design',
id: -uniqueId(),
image: '',
@ -99,8 +97,6 @@ export const designUploadOptimisticResponse = (files) => {
}));
return {
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
designManagementUpload: {
__typename: 'DesignManagementUploadPayload',
@ -117,8 +113,6 @@ export const designUploadOptimisticResponse = (files) => {
* @param {Object} position
*/
export const repositionImageDiffNoteOptimisticResponse = (note, { position }) => ({
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
repositionImageDiffNote: {
__typename: 'RepositionImageDiffNotePayload',
@ -138,8 +132,6 @@ export const repositionImageDiffNoteOptimisticResponse = (note, { position }) =>
* @param {Array} designs
*/
export const moveDesignOptimisticResponse = (designs) => ({
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
designManagementMove: {
__typename: 'DesignManagementMovePayload',
@ -178,7 +170,7 @@ const createTodoGid = (todoId) => {
export const createPendingTodo = (todoId) => {
return {
__typename: 'Todo', // eslint-disable-line @gitlab/require-i18n-strings
__typename: 'Todo',
id: createTodoGid(todoId),
};
};

View File

@ -1,7 +1,6 @@
// this file is based on https://github.com/apollographql/apollo-cache-persist/blob/master/examples/react-native/src/utils/persistence/persistenceMapper.ts
// with some heavy refactororing
/* eslint-disable @gitlab/require-i18n-strings */
/* eslint-disable no-underscore-dangle */
/* eslint-disable no-param-reassign */
/* eslint-disable dot-notation */

View File

@ -10,6 +10,9 @@ import {
GlFilteredSearchToken,
GlDisclosureDropdown,
GlDisclosureDropdownItem,
GlAlert,
GlLink,
GlSprintf,
} from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { s__, __, sprintf } from '~/locale';
@ -32,7 +35,7 @@ import {
PLACEHOLDER_TAB_AWAITING,
PLACEHOLDER_TAB_REASSIGNED,
} from '~/import_entities/import_groups/constants';
import { helpPagePath } from '~/helpers/help_page_helper';
import FilteredSearchBar from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue';
import {
FILTERED_SEARCH_TERM,
@ -56,6 +59,9 @@ export default {
GlButton,
GlDisclosureDropdown,
GlDisclosureDropdownItem,
GlAlert,
GlLink,
GlSprintf,
FilteredSearchBar,
PlaceholdersTable,
CsvUploadModal,
@ -271,6 +277,9 @@ export default {
this.sort = sort;
},
},
helpUrl: helpPagePath('user/project/import/index', {
anchor: 'security-considerations',
}),
uploadCsvModalId: UPLOAD_CSV_PLACEHOLDERS_MODAL_ID,
keepAllAsPlaceholderModalId: KEEP_ALL_AS_PLACEHOLDER_MODAL_ID,
PLACEHOLDER_USER_REASSIGNED_STATUS_OPTIONS,
@ -279,6 +288,19 @@ export default {
<template>
<div>
<gl-alert variant="warning" :dismissible="false" class="mt-3">
<gl-sprintf
:message="
s__(
'UserMapping|Contribution and membership reassignment cannot be undone. Incorrect reassignment %{linkStart}poses a security risk%{linkEnd}, so check carefully before you reassign.',
)
"
>
<template #link="{ content }">
<gl-link :href="$options.helpUrl" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>
</gl-alert>
<gl-tabs
v-model="selectedTabIndex"
nav-class="gl-grow gl-items-center gl-mt-3"

View File

@ -1,5 +1,4 @@
export const updateGroupPackagesSettingsOptimisticResponse = (changes) => ({
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
updateNamespacePackageSettings: {
__typename: 'UpdateNamespacePackageSettingsPayload',
@ -11,7 +10,6 @@ export const updateGroupPackagesSettingsOptimisticResponse = (changes) => ({
});
export const updateGroupDependencyProxySettingsOptimisticResponse = (changes) => ({
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
updateDependencyProxySettings: {
__typename: 'UpdateDependencyProxySettingsPayload',
@ -23,7 +21,6 @@ export const updateGroupDependencyProxySettingsOptimisticResponse = (changes) =>
});
export const updateDependencyProxyImageTtlGroupPolicyOptimisticResponse = (changes) => ({
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
updateDependencyProxyImageTtlGroupPolicy: {
__typename: 'UpdateDependencyProxyImageTtlGroupPolicyPayload',

View File

@ -30,9 +30,7 @@ initFilePickers();
initConfirmDanger();
initSettingsPanels();
initTransferGroupForm();
dirtySubmitFactory(
document.querySelectorAll('.js-general-settings-form, .js-general-permissions-form'),
);
dirtySubmitFactory(document.querySelectorAll('.js-general-settings-form'));
mountBadgeSettings(GROUP_BADGE);
// Initialize Subgroups selector

View File

@ -20,7 +20,7 @@ import {
NEW_BRANCH_IN_FORK,
} from '../constants';
const MODAL_TITLE = __('Create New Directory');
const MODAL_TITLE = __('Create new directory');
const PRIMARY_OPTIONS_TEXT = __('Create directory');
const DIR_LABEL = __('Directory name');
const ERROR_MESSAGE = __('Error creating new directory. Please try again.');

View File

@ -9,7 +9,7 @@ export const COMMIT_BATCH_SIZE = 25; // we request commit data in batches of 25
export const SECONDARY_OPTIONS_TEXT = __('Cancel');
export const COMMIT_LABEL = __('Commit message');
export const TARGET_BRANCH_LABEL = __('Target branch');
export const TOGGLE_CREATE_MR_LABEL = __('Start a new merge request with these changes');
export const TOGGLE_CREATE_MR_LABEL = __('Create a merge request for this change');
export const NEW_BRANCH_IN_FORK = __(
'GitLab will create a branch in your fork and start a merge request.',
);

View File

@ -1,8 +1,6 @@
import produce from 'immer';
export const updateSecurityTrainingOptimisticResponse = (changes) => ({
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
securityTrainingUpdate: {
__typename: 'SecurityTrainingUpdatePayload',

View File

@ -121,7 +121,6 @@ export default {
});
},
optimisticResponse: {
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
mergeRequestSetDraft: {
__typename: 'MergeRequestSetWipPayload',

View File

@ -34,6 +34,11 @@ export default {
required: false,
default: '',
},
description: {
type: String,
required: false,
default: '',
},
inputName: {
type: String,
required: true,
@ -126,6 +131,7 @@ export default {
<template>
<entity-select
:label="label"
:description="description"
:input-name="inputName"
:input-id="inputId"
:initial-selection="initialSelection"

View File

@ -15,6 +15,7 @@ export const initGroupSelects = () => {
parentId: parentGroupID,
groupsFilter,
label,
description,
inputName,
inputId,
selected: initialSelection,
@ -31,6 +32,7 @@ export const initGroupSelects = () => {
return createElement(GroupSelect, {
props: {
label,
description,
inputName,
initialSelection,
parentGroupID,

View File

@ -0,0 +1,98 @@
import MetadataItem from './metadata_item.vue';
export default {
component: MetadataItem,
title: 'vue_shared/registry/metadata-item',
argTypes: {
icon: {
control: 'text',
description: 'Icon name from GitLab UI to display alongside text',
},
text: {
control: 'text',
description: 'Main text content for the metadata item',
},
link: {
control: 'text',
description: 'URL to link text to, if applicable',
},
size: {
control: { type: 'select', options: ['s', 'm', 'l', 'xl'] },
description: 'Max width of the component',
},
textTooltip: {
control: 'text',
description: 'Tooltip text to show on hover when text is truncated',
},
},
};
// Default story for displaying basic text without icon or link
export const Default = (args) => ({
components: { MetadataItem },
setup() {
return { args };
},
template: '<MetadataItem v-bind="args" />',
});
Default.args = {
text: 'Metadata item text',
};
// Story for displaying metadata item with an icon
export const WithIcon = (args) => ({
components: { MetadataItem },
setup() {
return { args };
},
template: '<MetadataItem v-bind="args" />',
});
WithIcon.args = {
icon: 'clock',
text: 'With icon example',
};
// Story for displaying metadata item as a link
export const WithLink = (args) => ({
components: { MetadataItem },
setup() {
return { args };
},
template: '<MetadataItem v-bind="args" />',
});
WithLink.args = {
text: 'GitLab Documentation',
link: '#',
};
// Story for metadata item with a tooltip on truncated text
export const WithTooltipOnTruncate = (args) => ({
components: { MetadataItem },
setup() {
return { args };
},
template: '<MetadataItem v-bind="args" />',
});
WithTooltipOnTruncate.args = {
text: 'This is a very long piece of metadata text that might be truncated.',
textTooltip: 'Detailed description of the metadata',
};
// Story for varying text sizes
export const VaryingSizes = (args) => ({
components: { MetadataItem },
setup() {
return { args };
},
template: `
<div class='gl-flex gl-flex-col'>
<MetadataItem :text="'Size S: '+args.text" size="s" />
<MetadataItem :text="'Size M: '+args.text" size="m" />
<MetadataItem :text="'Size L: '+args.text" size="l" />
<MetadataItem :text="'Size XL: '+args.text" size="xl" />
</div>
`,
});
VaryingSizes.args = {
text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
};

View File

@ -2,6 +2,13 @@
import { GlIcon, GlLink, GlTooltipDirective } from '@gitlab/ui';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
const sizeClasses = {
s: 'mw-s',
m: 'mw-m',
l: 'mw-l',
xl: 'mw-xl',
};
export default {
name: 'MetadataItem',
components: {
@ -32,7 +39,7 @@ export default {
required: false,
default: 's',
validator(value) {
return !value || ['xs', 's', 'm', 'l', 'xl'].includes(value);
return !value || ['s', 'm', 'l', 'xl'].includes(value);
},
},
textTooltip: {
@ -43,7 +50,7 @@ export default {
},
computed: {
sizeClass() {
return `mw-${this.size}`;
return sizeClasses[this.size];
},
},
};

View File

@ -1,49 +0,0 @@
/**
* Highlight.js plugin for wrapping lines in the correct classes and attributes.
* Needed to highlight a large amount of lines
*
* Plugin API: https://github.com/highlightjs/highlight.js/blob/main/docs/plugin-api.rst
*
* @param {String} content - represent highlighted line of code
* @param {number} lineNum - represent highlighted line number
* @param {Object} markLineInfo - highlighting info for the current line
*/
function markLinesWithDiv(content, lineNum, markLineInfo) {
let stepNumberSpan = '';
let stepNumberSpanNone = '';
let wrappedLine = content;
// Combines an array of step numbers into a comma-separated string
const stepNumbersArr = markLineInfo?.map((markLine) => markLine.stepNumber);
const stepNumbers = stepNumbersArr?.map(String).join(',') ?? '';
markLineInfo?.forEach((markLine) => {
stepNumberSpan +=
lineNum === markLine.startLine
? `<span id="TEXT-SPAN-MARKER${markLine.stepNumber}" class="inline-item-mark">${markLine.stepNumber}</span>`
: '';
stepNumberSpanNone +=
lineNum !== markLine.startLine
? `<span id="TEXT-SPAN-MARKER${markLine.stepNumber}" class="inline-item-mark gl-opacity-0">${markLine.stepNumber}</span>`
: '';
});
if (markLineInfo) {
const contentStartIndex = content.indexOf(content.trimStart());
wrappedLine = `${content.slice(
0,
contentStartIndex,
)}${stepNumberSpanNone}<span id="TEXT-MARKER${
stepNumbers
}-L${lineNum}" class="inline-section-marker">${stepNumberSpan}${content.slice(contentStartIndex)}</span>`;
}
return `<div class="line">${wrappedLine}</div>`;
}
export default (result, lineToMarkersInfo) => {
// eslint-disable-next-line no-param-reassign
result.value = result.value
.split(/\r?\n/)
.map((content, index) => markLinesWithDiv(content, index + 1, lineToMarkersInfo?.[index + 1]))
.join('\n');
};

View File

@ -30,8 +30,6 @@ export const designWidgetOf = (data) => findDesignWidget(data.workItem.widgets);
*/
export const designUploadOptimisticResponse = (files) => {
const designs = files.map((file) => ({
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Design',
id: -uniqueId(),
image: '',
@ -75,8 +73,6 @@ export const designUploadOptimisticResponse = (files) => {
}));
return {
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation',
designManagementUpload: {
__typename: 'DesignManagementUploadPayload',

View File

@ -103,7 +103,6 @@ export default {
if (todo.state === TODO_PENDING_STATE) {
todos.push({
// eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Todo',
id: todo.id,
});

View File

@ -573,7 +573,7 @@ export const setNewWorkItemCache = async (
id: newWorkItemPath,
fullPath,
name: newWorkItemPath,
__typename: 'Namespace', // eslint-disable-line @gitlab/require-i18n-strings
__typename: 'Namespace',
},
author: {
id: currentUserId,
@ -602,7 +602,7 @@ export const setNewWorkItemCache = async (
widgets,
__typename: 'WorkItem',
},
__typename: 'Namespace', // eslint-disable-line @gitlab/require-i18n-strings
__typename: 'Namespace',
},
},
});

View File

@ -32,6 +32,9 @@ $type-scale: (
*/
$size-scale: (
's': #{20 * $grid-size},
'l': #{40 * $grid-size},
'm': #{30 * $grid-size},
'xl': #{70 * $grid-size}
);
@each $index, $size in $size-scale {

View File

@ -12,5 +12,5 @@
-# Leverage this block to render a rich help text. To render a plain text help text,
-# prefer the `help` parameter.
- if content.present?
.gl-text-subtle.gl-mt-1
.gl-help-label
= content

View File

@ -410,7 +410,7 @@ class Admin::UsersController < Admin::ApplicationController
Gitlab::AppLogger.info(format(_("User %{current_user_username} has started impersonating %{username}"), current_user_username: current_user.username, username: user.username))
end
# method overriden in EE
# method overridden in EE
def unlock_user
update_user(&:unlock_access!)
end
@ -422,7 +422,7 @@ class Admin::UsersController < Admin::ApplicationController
@impersonation_error_text = @can_impersonate ? nil : helpers.impersonation_error_text(user, impersonation_in_progress?)
end
# method overriden in EE
# method overridden in EE
def prepare_user_for_update(user)
user.skip_reconfirmation!
user.send_only_admin_changed_your_password_notification! if admin_making_changes_for_another_user?

View File

@ -55,6 +55,7 @@ module Groups
:setup_for_company,
:jobs_to_be_done,
:crm_enabled,
:crm_source_group_id,
:enable_namespace_descendants_cache
] + [group_feature_attributes: group_feature_attributes]
end

View File

@ -15,7 +15,7 @@ class Projects::HooksController < Projects::ApplicationController
urgency :low, [:test]
def test
trigger = params.fetch(:trigger, ::ProjectHook.triggers.each_value.first.to_s)
trigger = params.fetch(:trigger, 'push_events')
result = TestHooks::ProjectService.new(hook, current_user, trigger).execute
set_hook_execution_notice(result)

View File

@ -199,23 +199,24 @@ module IntegrationsHelper
def integration_webhook_event_human_name(event)
event_i18n_map = {
repository_update_events: _('Repository update events'),
push_events: _('Push events'),
tag_push_events: s_('Webhooks|Tag push events'),
note_events: _('Comments'),
confidential_note_events: s_('Webhooks|Confidential comments'),
issues_events: s_('Webhooks|Issues events'),
confidential_issues_events: s_('Webhooks|Confidential issues events'),
subgroup_events: s_('Webhooks|Subgroup events'),
member_events: s_('Webhooks|Member events'),
merge_requests_events: s_('Webhooks|Merge request events'),
job_events: s_('Webhooks|Job events'),
pipeline_events: s_('Webhooks|Pipeline events'),
wiki_page_events: s_('Webhooks|Wiki page events'),
confidential_note_events: s_('Webhooks|Confidential comments'),
deployment_events: s_('Webhooks|Deployment events'),
feature_flag_events: s_('Webhooks|Feature flag events'),
issues_events: s_('Webhooks|Issues events'),
job_events: s_('Webhooks|Job events'),
member_events: s_('Webhooks|Member events'),
merge_requests_events: s_('Webhooks|Merge request events'),
note_events: _('Comments'),
pipeline_events: s_('Webhooks|Pipeline events'),
project_events: s_('Webhooks|Project events'),
push_events: _('Push events'),
releases_events: s_('Webhooks|Releases events'),
resource_access_token_events: s_('Webhooks|Project or group access token events')
repository_update_events: _('Repository update events'),
resource_access_token_events: s_('Webhooks|Project or group access token events'),
subgroup_events: s_('Webhooks|Subgroup events'),
tag_push_events: s_('Webhooks|Tag push events'),
wiki_page_events: s_('Webhooks|Wiki page events')
}
event_i18n_map[event] || event.to_s.humanize

View File

@ -21,7 +21,8 @@ module Enums
'cbl-mariner': 12,
wolfi: 13,
cargo: 14,
swift: 15
swift: 15,
conda: 16
}.with_indifferent_access.freeze
REACHABILITY_TYPES = {
@ -40,6 +41,7 @@ module Enums
pypi
cargo
swift
conda
].freeze
CONTAINER_SCANNING_PURL_TYPES = %w[
@ -92,6 +94,7 @@ module Enums
nuget: 'nuget',
'dotnet-core': 'nuget',
'conda-pkg': 'conda',
'conda-environment': 'conda',
'python-pkg': 'pip',
pip: 'pip',
pipenv: 'pipenv',

View File

@ -2,24 +2,25 @@
module TriggerableHooks
AVAILABLE_TRIGGERS = {
repository_update_hooks: :repository_update_events,
push_hooks: :push_events,
tag_push_hooks: :tag_push_events,
issue_hooks: :issues_events,
confidential_note_hooks: :confidential_note_events,
confidential_issue_hooks: :confidential_issues_events,
note_hooks: :note_events,
merge_request_hooks: :merge_requests_events,
job_hooks: :job_events,
pipeline_hooks: :pipeline_events,
wiki_page_hooks: :wiki_page_events,
confidential_note_hooks: :confidential_note_events,
deployment_hooks: :deployment_events,
feature_flag_hooks: :feature_flag_events,
release_hooks: :releases_events,
member_hooks: :member_events,
subgroup_hooks: :subgroup_events,
emoji_hooks: :emoji_events,
resource_access_token_hooks: :resource_access_token_events
feature_flag_hooks: :feature_flag_events,
issue_hooks: :issues_events,
job_hooks: :job_events,
member_hooks: :member_events,
merge_request_hooks: :merge_requests_events,
note_hooks: :note_events,
pipeline_hooks: :pipeline_events,
project_hooks: :project_events,
push_hooks: :push_events,
release_hooks: :releases_events,
repository_update_hooks: :repository_update_events,
resource_access_token_hooks: :resource_access_token_events,
subgroup_hooks: :subgroup_events,
tag_push_hooks: :tag_push_events,
wiki_page_hooks: :wiki_page_events
}.freeze
extend ActiveSupport::Concern

View File

@ -124,26 +124,6 @@ class CustomerRelations::Contact < ApplicationRecord
exists?(group: group)
end
def self.move_to_root_group(group)
update_query = <<~SQL
UPDATE #{CustomerRelations::IssueContact.table_name}
SET contact_id = new_contacts.id
FROM #{table_name} AS existing_contacts
JOIN #{table_name} AS new_contacts ON new_contacts.group_id = :old_group_id AND LOWER(new_contacts.email) = LOWER(existing_contacts.email)
WHERE existing_contacts.group_id = :new_group_id AND contact_id = existing_contacts.id
SQL
connection.execute(sanitize_sql([update_query, { old_group_id: group.root_ancestor.id, new_group_id: group.id }]))
dupes_query = <<~SQL
DELETE FROM #{table_name} AS existing_contacts
USING #{table_name} AS new_contacts
WHERE existing_contacts.group_id = :new_group_id AND new_contacts.group_id = :old_group_id AND LOWER(new_contacts.email) = LOWER(existing_contacts.email)
SQL
connection.execute(sanitize_sql([dupes_query, { old_group_id: group.root_ancestor.id, new_group_id: group.id }]))
where(group: group).update_all(group_id: group.root_ancestor.id)
end
def self.counts_by_state
group(:state).count
end

View File

@ -8,6 +8,7 @@ class CustomerRelations::Organization < ApplicationRecord
self.table_name = "customer_relations_organizations"
belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'group_id'
has_many :contacts
strip_attributes! :name
@ -58,26 +59,6 @@ class CustomerRelations::Organization < ApplicationRecord
.where('LOWER(name) = LOWER(?)', name)
end
def self.move_to_root_group(group)
update_query = <<~SQL
UPDATE #{CustomerRelations::Contact.table_name}
SET organization_id = new_organizations.id
FROM #{table_name} AS existing_organizations
JOIN #{table_name} AS new_organizations ON new_organizations.group_id = :old_group_id AND LOWER(new_organizations.name) = LOWER(existing_organizations.name)
WHERE existing_organizations.group_id = :new_group_id AND organization_id = existing_organizations.id
SQL
connection.execute(sanitize_sql([update_query, { old_group_id: group.root_ancestor.id, new_group_id: group.id }]))
dupes_query = <<~SQL
DELETE FROM #{table_name} AS existing_organizations
USING #{table_name} AS new_organizations
WHERE existing_organizations.group_id = :new_group_id AND new_organizations.group_id = :old_group_id AND LOWER(new_organizations.name) = LOWER(existing_organizations.name)
SQL
connection.execute(sanitize_sql([dupes_query, { old_group_id: group.root_ancestor.id, new_group_id: group.id }]))
where(group: group).update_all(group_id: group.root_ancestor.id)
end
def self.counts_by_state
default_state_counts.merge(group(:state).count)
end

View File

@ -108,7 +108,7 @@ class Group < Namespace
has_many :contacts, class_name: 'CustomerRelations::Contact', inverse_of: :group, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent
has_one :crm_settings, class_name: 'Group::CrmSettings', inverse_of: :group
# Groups for which this is the source of CRM contacts/organizations
has_many :crm_targets, class_name: 'Group::CrmSettings', inverse_of: :source_group
has_many :crm_targets, class_name: 'Group::CrmSettings', inverse_of: :source_group, foreign_key: 'source_group_id'
has_many :cluster_groups, class_name: 'Clusters::Group'
has_many :clusters, through: :cluster_groups, class_name: 'Clusters::Cluster'
@ -1075,6 +1075,18 @@ class Group < Namespace
end
strong_memoize_attr :crm_group?
def has_issues_with_contacts?
CustomerRelations::IssueContact.joins(:issue).where(issue: { project_id: Project.where(namespace_id: self_and_descendant_ids) }).exists?
end
def delete_contacts
CustomerRelations::Contact.where(group_id: id).delete_all
end
def delete_organizations
CustomerRelations::Organization.where(group_id: id).delete_all
end
private
def feature_flag_enabled_for_self_or_ancestor?(feature_flag, type: :development)

View File

@ -11,21 +11,21 @@ class ProjectHook < WebHook
self.limit_scope = :project
triggerable_hooks [
:push_hooks,
:tag_push_hooks,
:issue_hooks,
:confidential_issue_hooks,
:note_hooks,
:confidential_note_hooks,
:merge_request_hooks,
:job_hooks,
:pipeline_hooks,
:wiki_page_hooks,
:deployment_hooks,
:feature_flag_hooks,
:release_hooks,
:emoji_hooks,
:resource_access_token_hooks
:feature_flag_hooks,
:issue_hooks,
:job_hooks,
:merge_request_hooks,
:note_hooks,
:pipeline_hooks,
:push_hooks,
:release_hooks,
:resource_access_token_hooks,
:tag_push_hooks,
:wiki_page_hooks
]
belongs_to :project

View File

@ -55,5 +55,9 @@ module Namespaces
owner == user ? Gitlab::Access::OWNER : Gitlab::Access::NO_ACCESS
end
def crm_group
nil
end
end
end

View File

@ -57,7 +57,6 @@ class Packages::Package < ApplicationRecord
has_many :build_infos, inverse_of: :package
has_many :pipelines, through: :build_infos, disable_joins: true
has_many :matching_package_protection_rules, ->(package) { where(package_type: package.package_type).for_package_name(package.name) }, through: :project, source: :package_protection_rules
accepts_nested_attributes_for :maven_metadatum

View File

@ -617,7 +617,7 @@ class Project < ApplicationRecord
validates :project_feature, presence: true
validates :namespace, presence: true
validates :organization, presence: true, if: :require_organization?
validates :organization, presence: true
validates :project_namespace, presence: true, on: :create, if: -> { self.namespace }
validates :project_namespace, presence: true, on: :update, if: -> { self.project_namespace_id_changed?(to: nil) }
validates :name, uniqueness: { scope: :namespace_id }
@ -631,7 +631,7 @@ class Project < ApplicationRecord
validate :visibility_level_allowed_as_fork, if: :should_validate_visibility_level?
validate :validate_pages_https_only, if: -> { changes.has_key?(:pages_https_only) }
validate :changing_shared_runners_enabled_is_allowed
validate :parent_organization_match, if: :require_organization?
validate :parent_organization_match
validates :repository_storage, presence: true, inclusion: { in: ->(_) { Gitlab.config.repositories.storages.keys } }
validates :variables, nested_attributes_duplicates: { scope: :environment_scope }
validates :bfg_object_map, file_size: { maximum: :max_attachment_size }
@ -3426,12 +3426,6 @@ class Project < ApplicationRecord
private
def require_organization?
return false unless Feature.enabled?(:require_organization_on_project, Feature.current_request)
Gitlab::SafeRequestStore.fetch(:require_organization_on_project) { true } # rubocop:disable Style/RedundantFetchBlock -- This fetch has a different interface
end
def with_redis(&block)
Gitlab::Redis::Cache.with(&block)
end

View File

@ -13,7 +13,7 @@ class IssueSidebarBasicEntity < IssuableSidebarBasicEntity
expose :show_crm_contacts do |issuable|
current_user&.can?(:read_crm_contacts, issuable) &&
CustomerRelations::Contact.exists_for_group?(issuable.project.root_ancestor)
CustomerRelations::Contact.exists_for_group?(issuable.project.crm_group)
end
end

View File

@ -115,5 +115,9 @@ module Integrations
current_user: current_user
}
end
def project_events_data
Gitlab::HookData::ProjectBuilder.new(project).build(:create)
end
end
end

View File

@ -0,0 +1,111 @@
# frozen_string_literal: true
module CustomerRelations
class GroupMigrationService
def initialize(old_group_id, new_group_id, was_crm_source)
@old_group_id = old_group_id
@new_group_id = new_group_id
@was_crm_source = was_crm_source
end
def execute
copy_organizations
copy_contacts
update_issues
return unless @was_crm_source
old_group = Group.find_by_id(@old_group_id)
old_group.delete_contacts
old_group.delete_organizations
end
private
def execute_sql(sql, args)
sanitized_sql = ApplicationRecord.sanitize_sql([sql, args])
ApplicationRecord.connection.execute(sanitized_sql, args)
end
def copy_organizations
sql = <<~SQL
-- Insert organizations deduplicating by name
INSERT INTO #{CustomerRelations::Organization.table_name} (
group_id,
created_at,
updated_at,
state,
default_rate,
name,
description
)
SELECT
:new_group_id,
source_organizations.created_at,
source_organizations.updated_at,
source_organizations.state,
source_organizations.default_rate,
source_organizations.name,
source_organizations.description
FROM #{CustomerRelations::Organization.table_name} source_organizations
LEFT JOIN #{CustomerRelations::Organization.table_name} target_organizations
ON target_organizations.group_id = :new_group_id AND LOWER(target_organizations.name) = LOWER(source_organizations.name)
WHERE source_organizations.group_id = :old_group_id AND target_organizations.id IS NULL
SQL
execute_sql(sql, { old_group_id: @old_group_id, new_group_id: @new_group_id })
end
def copy_contacts
sql = <<~SQL
WITH org_map AS (
-- Create a mapping of old organization IDs to new organization IDs
SELECT source_organizations.id AS old_id, target_organizations.id AS new_id
FROM #{CustomerRelations::Organization.table_name} source_organizations
JOIN #{CustomerRelations::Organization.table_name} target_organizations ON target_organizations.group_id = :new_group_id AND LOWER(target_organizations.name) = LOWER(source_organizations.name)
WHERE source_organizations.group_id = :old_group_id
)
-- Insert contacts linked to the new organization, deduplicating by email
INSERT INTO #{CustomerRelations::Contact.table_name} (
group_id,
organization_id,
created_at,
updated_at,
state,
phone,
first_name,
last_name,
email,
description
)
SELECT DISTINCT
:new_group_id,
org_map.new_id,
source_contacts.created_at,
source_contacts.updated_at,
source_contacts.state,
source_contacts.phone,
source_contacts.first_name,
source_contacts.last_name,
source_contacts.email,
source_contacts.description
FROM #{CustomerRelations::Contact.table_name} source_contacts
LEFT JOIN #{CustomerRelations::Contact.table_name} target_contacts
ON target_contacts.group_id = :new_group_id AND LOWER(target_contacts.email) = LOWER(source_contacts.email)
LEFT JOIN org_map ON org_map.old_id = source_contacts.organization_id
WHERE source_contacts.group_id = :old_group_id AND target_contacts.id IS NULL
SQL
execute_sql(sql, { old_group_id: @old_group_id, new_group_id: @new_group_id })
end
def update_issues
sql = <<~SQL
UPDATE #{CustomerRelations::IssueContact.table_name}
SET contact_id = target_contacts.id
FROM #{CustomerRelations::Contact.table_name} AS source_contacts
JOIN #{CustomerRelations::Contact.table_name} AS target_contacts ON target_contacts.group_id = :new_group_id AND LOWER(target_contacts.email) = LOWER(source_contacts.email)
WHERE source_contacts.group_id = :old_group_id AND contact_id = source_contacts.id
SQL
execute_sql(sql, { old_group_id: @old_group_id, new_group_id: @new_group_id })
end
end
end

View File

@ -67,8 +67,7 @@ module Groups
update_group_attributes
ensure_ownership
update_integrations
remove_issue_contacts(old_root_ancestor_id, was_root_group)
update_crm_objects(was_root_group)
update_crm_objects
remove_namespace_commit_emails(was_root_group)
end
end
@ -112,10 +111,11 @@ module Groups
def no_permissions_to_migrate_crm?
return false unless group && @new_parent_group
return false if group.root_ancestor == @new_parent_group.root_ancestor
return false if group.crm_settings&.source_group
return false if group.crm_group == @new_parent_group.crm_group
return true if group.contacts.exists? && !current_user.can?(:admin_crm_contact, @new_parent_group.root_ancestor)
return true if group.crm_organizations.exists? && !current_user.can?(:admin_crm_organization, @new_parent_group.root_ancestor)
return true if group.crm_group.contacts.exists? && !current_user.can?(:admin_crm_contact, @new_parent_group.root_ancestor)
return true if group.crm_group.crm_organizations.exists? && !current_user.can?(:admin_crm_organization, @new_parent_group.root_ancestor)
false
end
@ -308,18 +308,13 @@ module Groups
::Ci::PendingBuild.namespace_transfer_params(group)
end
def update_crm_objects(was_root_group)
return unless was_root_group
def update_crm_objects
return unless group && new_parent_group
return if group.crm_settings&.source_group
return if group.crm_group == new_parent_group.crm_group
CustomerRelations::Contact.move_to_root_group(group)
CustomerRelations::Organization.move_to_root_group(group)
end
def remove_issue_contacts(old_root_ancestor_id, was_root_group)
return if was_root_group
return if old_root_ancestor_id == @group.root_ancestor.id
CustomerRelations::IssueContact.delete_for_group(@group)
was_crm_source = group.crm_group == group
CustomerRelations::GroupMigrationService.new(group.crm_group.id, new_parent_group.crm_group.id, was_crm_source).execute
end
def publish_event(old_root_ancestor_id)

View File

@ -23,21 +23,17 @@ module Groups
end
return false unless valid_visibility_level_change?(group, group.visibility_attribute_value(params))
return false unless valid_share_with_group_lock_change?
return false unless valid_path_change?
return false unless update_shared_runners
handle_changes
handle_namespace_settings
handle_hierarchy_cache_update
group.assign_attributes(params)
return false if group.errors.present?
begin
success = group.save
@ -157,7 +153,7 @@ module Groups
def handle_changes
handle_settings_update
handle_crm_settings_update unless params[:crm_enabled].nil?
handle_crm_settings_update
end
def handle_settings_update
@ -169,11 +165,21 @@ module Groups
end
def handle_crm_settings_update
return if params[:crm_enabled].nil? && params[:crm_source_group_id].nil?
crm_enabled = params.delete(:crm_enabled)
return if group.crm_enabled? == crm_enabled
crm_enabled = true if crm_enabled.nil?
crm_source_group_id = params.delete(:crm_source_group_id)
return if group.crm_enabled? == crm_enabled && group.crm_settings&.source_group_id == crm_source_group_id
if group.crm_settings&.source_group_id != crm_source_group_id && group.has_issues_with_contacts?
group.errors.add(:base, s_('GroupSettings|Contact source cannot be changed when issues already have contacts assigned from a different source.'))
return
end
crm_settings = group.crm_settings || group.build_crm_settings
crm_settings.enabled = crm_enabled
crm_settings.source_group_id = crm_source_group_id.presence
crm_settings.save
end

View File

@ -15,10 +15,10 @@ module Keys
return unless allowed?
if expiring_soon
create_expiring_soon_todos if Feature.enabled?(:todos_for_ssh_key_expiry, user)
create_expiring_soon_todos
trigger_expiring_soon_notification
else
create_expired_todos if Feature.enabled?(:todos_for_ssh_key_expiry, user)
create_expired_todos
trigger_expired_notification
end
end

View File

@ -136,7 +136,7 @@ module Projects
yield if block_given?
event_service.create_project(@project, current_user)
system_hook_service.execute_hooks_for(@project, :create)
execute_hooks
setup_authorizations
@ -219,6 +219,10 @@ module Projects
::Security::CiConfiguration::SastCreateService.new(@project, current_user, { initialize_with_sast: true }, commit_on_default: true).execute
end
def execute_hooks
system_hook_service.execute_hooks_for(@project, :create)
end
def repository_object_format
return Repository::FORMAT_SHA1 unless Feature.enabled?(:support_sha256_repositories, current_user)
return Repository::FORMAT_SHA256 if @repository_object_format == Repository::FORMAT_SHA256

View File

@ -41,7 +41,7 @@ module Projects
attempt_destroy(project)
system_hook_service.execute_hooks_for(project, :destroy)
execute_hooks(project)
log_info("Project \"#{project.full_path}\" was deleted")
publish_project_deleted_event_for(project)
@ -154,6 +154,10 @@ module Projects
destroy_project_related_records(project)
end
def execute_hooks(project)
system_hook_service.execute_hooks_for(project, :destroy)
end
def destroy_project_related_records(project)
log_destroy_event
trash_relation_repositories!

View File

@ -278,7 +278,7 @@ module Projects
end
def remove_issue_contacts
return unless @old_group&.root_ancestor != @new_namespace&.root_ancestor
return unless @old_group&.crm_group != @new_namespace&.crm_group
CustomerRelations::IssueContact.delete_for_project(project.id)
end

View File

@ -35,6 +35,12 @@ class SystemHooksService
Gitlab::HookData::KeyBuilder
end
builder_class.new(model).build(event)
builder = builder_class.new(model)
if builder_class == Gitlab::HookData::ProjectBuilder
builder.build(event, include_deprecated_owner: true)
else
builder.build(event)
end
end
end

View File

@ -38,6 +38,8 @@ module TestHooks
emoji_events_data
when 'resource_access_token_events'
access_tokens_events_data
when 'project_events'
project_events_data
end
end
end

View File

@ -52,6 +52,15 @@
s_('GroupSettings|Customer relations is enabled'),
checkbox_options: { checked: @group.crm_enabled? },
help_text: s_('GroupSettings|Organizations and contacts can be created and associated with issues.')
.form-group.gl-mb-3
= s_('GroupSettings|Contact source')
.js-vue-group-select{ data: {
input_name: 'group[crm_source_group_id]',
input_id: 'group_crm_source_group_id',
selected: @group.crm_settings&.source_group_id,
clearable: 'true',
description: s_("GroupSettings|The group from which to source contacts for issues in this group and it's subgroups.")
} }
- if Feature.enabled?(:group_hierarchy_optimization, @group, type: :beta)
%h5= _('Performance')
@ -61,4 +70,4 @@
checkbox_options: { checked: @group.namespace_descendants.present? },
help_text: s_('GroupSettings|Building the cache is asynchronous, happens in a background job. The cache invalidation is synchronous with strong consistency guarantees.')
= f.submit _('Save changes'), pajamas_button: true, class: 'gl-mt-3 js-dirty-submit', data: { testid: 'save-permissions-changes-button' }
= f.submit _('Save changes'), pajamas_button: true, class: 'gl-mt-3', data: { testid: 'save-permissions-changes-button' }

View File

@ -2,7 +2,7 @@
- hidden = @hidden_commit_count
- commits = Commit.decorate(commits, @project)
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, body_options: { class: 'gl-py-0'}) do |c|
= render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5'}, body_options: { class: 'gl-py-0'}, footer_options: { class: 'gl-bg-orange-50' }) do |c|
- c.with_header do
= s_('CompareRevisions|Commits on Source (%{commits_amount})').html_safe % { commits_amount: @total_commit_count }
- c.with_body do
@ -10,7 +10,8 @@
%ul.content-list
- commits.each do |commit|
= render "projects/commits/inline_commit", commit: commit, project: @project
%li.warning-row.unstyled
#{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues.
- else
%ul.content-list= render commits, project: @project, ref: @ref
- if hidden > 0
- c.with_footer do
#{number_with_delimiter(hidden)} additional commits have been omitted to prevent performance issues.

View File

@ -41,6 +41,7 @@
help_text: s_('Webhooks|A confidential issue is created, updated, closed, or reopened.')
- if @group
= render_if_exists 'groups/hooks/member_events', form: form
= render_if_exists 'groups/hooks/project_events', form: form
= render_if_exists 'groups/hooks/subgroup_events', form: form
%li.gl-pb-3
= form.gitlab_ui_checkbox_component :merge_requests_events,

View File

@ -30,7 +30,7 @@ domains:
- duo_chat
- ai_abstraction_layer
- code_suggestions # Also in CodeSuggestions
- cloud_connector # Also in CloudConnector
- cloud_connector # Also in CloudConnector
- duo_workflow
Analytics:
@ -116,6 +116,11 @@ domains:
feature_categories:
- container_registry
CustomerRelations:
description:
feature_categories:
- team_planning
DependencyProxy:
description: Dependency Proxy for container images.
feature_categories:
@ -159,7 +164,8 @@ domains:
- integrations
Issuables:
description: Common concerns between work items and merge requests such as setting milestone,
description:
Common concerns between work items and merge requests such as setting milestone,
support discussions, adding labels, etc.
feature_categories:
- team_planning
@ -369,7 +375,8 @@ domains:
# Modules from the platform layer could potentially be extracted as gems.
platform:
Gitlab:
description: Platform layer containing infrastructure and technical concerns.
description:
Platform layer containing infrastructure and technical concerns.
For example observability tools, generic base classes, utilities, database helpers, etc.
Each functionality in this layer should be isolated and extracted into gems.
Banzai:

View File

@ -1,9 +0,0 @@
---
name: batched_redis_updates_for_kubernetes_agent_events
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/497665
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/168192
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/498416
milestone: '17.5'
group: group::analytics instrumentation
type: beta
default_enabled: false

View File

@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49264
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/350460
milestone: '13.8'
type: development
group: group::respond
group: group::project_management
default_enabled: true

View File

@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130336
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/423880
milestone: '16.4'
type: development
group: group::respond
group: group::project_management
default_enabled: true

View File

@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124681
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/416343
milestone: '16.2'
type: development
group: group::respond
group: group::project_management
default_enabled: false

View File

@ -1,9 +0,0 @@
---
name: prompt_migration_generate_description
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/152429
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169982
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/500121
milestone: '17.6'
group: group::ai framework
type: experiment
default_enabled: false

View File

@ -1,9 +0,0 @@
---
name: require_organization_on_project
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/501257
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/171016
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/501373
milestone: '17.6'
group: group::tenant scale
type: gitlab_com_derisk
default_enabled: false

View File

@ -1,9 +0,0 @@
---
name: todos_for_ssh_key_expiry
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/490325
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166168
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/497334
milestone: '17.5'
group: group::personal productivity
type: gitlab_com_derisk
default_enabled: false

View File

@ -950,7 +950,7 @@ Gitlab.ee do
Settings.cron_jobs['usage_events_dump_write_buffer_cron_worker']['cron'] ||= "*/5 * * * *"
Settings.cron_jobs['usage_events_dump_write_buffer_cron_worker']['job_class'] = 'UsageEvents::DumpWriteBufferCronWorker'
Settings.cron_jobs['package_metadata_cve_enrichment_sync_worker'] ||= {}
Settings.cron_jobs['package_metadata_cve_enrichment_sync_worker']['cron'] ||= "*/5 * * * *"
Settings.cron_jobs['package_metadata_cve_enrichment_sync_worker']['cron'] ||= "0 */1 * * *"
Settings.cron_jobs['package_metadata_cve_enrichment_sync_worker']['job_class'] = 'PackageMetadata::CveEnrichmentSyncWorker'
Gitlab.com do

View File

@ -46,12 +46,13 @@ class Gitlab::Seeder::TriageOps
OTHER_LABELS = <<~LABELS.split("\n")
Community contribution
documentation
ep::contributor tooling
ep::meta
ep::metrics
ep::pipeline
ep::review-apps
ep::triage
dx::contributor tooling
dx::infrastructure
dx::meta
dx::metrics
dx::pipeline
dx::review-apps
dx::triage
master-broken::caching
master-broken::ci-config
master-broken::dependency-upgrade

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
class AddProjectEventsToWebHooks < Gitlab::Database::Migration[2.2]
milestone '17.6'
def change
add_column :web_hooks, :project_events, :boolean, null: false, default: false
end
end

View File

@ -0,0 +1,13 @@
# frozen_string_literal: true
class DropRequiresCreditCardVerificationInUserDetail < Gitlab::Database::Migration[2.2]
milestone '17.6'
def up
remove_column :user_details, :requires_credit_card_verification
end
def down
add_column :user_details, :requires_credit_card_verification, :boolean, null: false, default: false
end
end

View File

@ -0,0 +1 @@
bbe10881f3bd591e6390604c4cefe96ac105a524e3fd0478d38a793ab791d44f

View File

@ -0,0 +1 @@
759eae91023e81fc5ac9581e1be04bfa2385db5f8f285dc736b97871503d12f0

View File

@ -20508,7 +20508,6 @@ CREATE TABLE user_details (
pronunciation text,
registration_objective smallint,
phone text,
requires_credit_card_verification boolean DEFAULT false NOT NULL,
linkedin text DEFAULT ''::text NOT NULL,
twitter text DEFAULT ''::text NOT NULL,
skype text DEFAULT ''::text NOT NULL,
@ -21598,6 +21597,7 @@ CREATE TABLE web_hooks (
resource_access_token_events boolean DEFAULT false NOT NULL,
encrypted_custom_headers bytea,
encrypted_custom_headers_iv bytea,
project_events boolean DEFAULT false NOT NULL,
CONSTRAINT check_1e4d5cbdc5 CHECK ((char_length(name) <= 255)),
CONSTRAINT check_23a96ad211 CHECK ((char_length(description) <= 2048)),
CONSTRAINT check_69ef76ee0c CHECK ((char_length(custom_webhook_template) <= 4096))

View File

@ -92,20 +92,21 @@ X-Gitlab-Event: System Hook
```json
{
"created_at": "2012-07-21T07:30:54Z",
"updated_at": "2012-07-21T07:38:22Z",
"event_name": "project_create",
"name": "StoreCloud",
"owner_email": "johnsmith@example.com",
"owner_name": "John Smith",
"owners": [{
"name": "John",
"email": "user1@example.com"
}],
"path": "storecloud",
"path_with_namespace": "jsmith/storecloud",
"project_id": 74,
"project_visibility": "private"
"created_at": "2012-07-21T07:30:54Z",
"updated_at": "2012-07-21T07:38:22Z",
"event_name": "project_create",
"name": "StoreCloud",
"owner_email": "johnsmith@example.com",
"owner_name": "John Smith",
"owners": [{
"name": "John",
"email": "user1@example.com"
}],
"path": "storecloud",
"path_with_namespace": "jsmith/storecloud",
"project_id": 74,
"project_namespace_id" : 23,
"project_visibility": "private"
}
```
@ -113,20 +114,21 @@ X-Gitlab-Event: System Hook
```json
{
"created_at": "2012-07-21T07:30:58Z",
"updated_at": "2012-07-21T07:38:22Z",
"event_name": "project_destroy",
"name": "Underscore",
"owner_email": "johnsmith@example.com",
"owner_name": "John Smith",
"owners": [{
"name": "John",
"email": "user1@example.com"
}],
"path": "underscore",
"path_with_namespace": "jsmith/underscore",
"project_id": 73,
"project_visibility": "internal"
"created_at": "2012-07-21T07:30:58Z",
"updated_at": "2012-07-21T07:38:22Z",
"event_name": "project_destroy",
"name": "Underscore",
"owner_email": "johnsmith@example.com",
"owner_name": "John Smith",
"owners": [{
"name": "John",
"email": "user1@example.com"
}],
"path": "underscore",
"path_with_namespace": "jsmith/underscore",
"project_id": 73,
"project_namespace_id" : 23,
"project_visibility": "internal"
}
```
@ -147,6 +149,7 @@ X-Gitlab-Event: System Hook
"name": "John",
"email": "user1@example.com"
}],
"project_namespace_id" : 23,
"project_visibility": "internal",
"old_path_with_namespace": "jsmith/overscore"
}
@ -172,6 +175,7 @@ Refer to `group_rename` and `user_rename` for that case.
"name": "John",
"email": "user1@example.com"
}],
"project_namespace_id" : 23,
"project_visibility": "internal",
"old_path_with_namespace": "jsmith/overscore"
}
@ -181,20 +185,21 @@ Refer to `group_rename` and `user_rename` for that case.
```json
{
"created_at": "2012-07-21T07:30:54Z",
"updated_at": "2012-07-21T07:38:22Z",
"event_name": "project_update",
"name": "StoreCloud",
"owner_email": "johnsmith@example.com",
"owner_name": "John Smith",
"owners": [{
"name": "John",
"email": "user1@example.com"
}],
"path": "storecloud",
"path_with_namespace": "jsmith/storecloud",
"project_id": 74,
"project_visibility": "private"
"created_at": "2012-07-21T07:30:54Z",
"updated_at": "2012-07-21T07:38:22Z",
"event_name": "project_update",
"name": "StoreCloud",
"owner_email": "johnsmith@example.com",
"owner_name": "John Smith",
"owners": [{
"name": "John",
"email": "user1@example.com"
}],
"path": "storecloud",
"path_with_namespace": "jsmith/storecloud",
"project_id": 74,
"project_namespace_id" : 23,
"project_visibility": "private"
}
```

View File

@ -13,6 +13,7 @@ DETAILS:
**Status:** Experiment
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165157) in GitLab 17.5 [with a flag](../../administration/feature_flags.md) named `admin_agnostic_token_finder`. Disabled by default.
> - [Feed tokens added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169821) in GitLab 17.6.
FLAG:
The availability of this feature is controlled by a feature flag.
@ -35,6 +36,7 @@ Supported tokens:
- [Personal access tokens](../../user/profile/personal_access_tokens.md)
- [Deploy tokens](../../user/project/deploy_tokens/index.md)
- [Feed tokens](../../security/tokens/index.md#feed-token)
```plaintext
POST /api/v4/admin/token

View File

@ -1326,6 +1326,7 @@ four standard [pagination arguments](#pagination-arguments):
| <a id="queryvulnerabilitieshasmergerequest"></a>`hasMergeRequest` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have linked merge requests. |
| <a id="queryvulnerabilitieshasremediations"></a>`hasRemediations` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have remediations. |
| <a id="queryvulnerabilitieshasresolution"></a>`hasResolution` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have been resolved on default branch. |
| <a id="queryvulnerabilitiesidentifiername"></a>`identifierName` **{warning-solid}** | [`String`](#string) | **Introduced** in GitLab 17.6. **Status**: Experiment. Filter vulnerabilities by identifier name. Applicable only on project level when feature flag `vulnerability_identifier_name_filter` is enabled. Ignored when applied on group level or instance securitydashboard queries. |
| <a id="queryvulnerabilitiesimage"></a>`image` | [`[String!]`](#string) | Filter vulnerabilities by location image. When this filter is present, the response only matches entries for a `reportType` that includes `container_scanning`, `cluster_image_scanning`. |
| <a id="queryvulnerabilitiesowasptopten"></a>`owaspTopTen` | [`[VulnerabilityOwaspTop10!]`](#vulnerabilityowasptop10) | Filter vulnerabilities by OWASP Top 10 category. Wildcard value "NONE" also supported when feature flag `owasp_top_10_null_filtering` is enabled. "NONE" wildcard cannot be combined with other OWASP top 10 values. |
| <a id="queryvulnerabilitiesprojectid"></a>`projectId` | [`[ID!]`](#id) | Filter vulnerabilities by project. |
@ -25434,6 +25435,7 @@ four standard [pagination arguments](#pagination-arguments):
| <a id="groupvulnerabilitieshasmergerequest"></a>`hasMergeRequest` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have linked merge requests. |
| <a id="groupvulnerabilitieshasremediations"></a>`hasRemediations` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have remediations. |
| <a id="groupvulnerabilitieshasresolution"></a>`hasResolution` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have been resolved on default branch. |
| <a id="groupvulnerabilitiesidentifiername"></a>`identifierName` **{warning-solid}** | [`String`](#string) | **Introduced** in GitLab 17.6. **Status**: Experiment. Filter vulnerabilities by identifier name. Applicable only on project level when feature flag `vulnerability_identifier_name_filter` is enabled. Ignored when applied on group level or instance securitydashboard queries. |
| <a id="groupvulnerabilitiesimage"></a>`image` | [`[String!]`](#string) | Filter vulnerabilities by location image. When this filter is present, the response only matches entries for a `reportType` that includes `container_scanning`, `cluster_image_scanning`. |
| <a id="groupvulnerabilitiesowasptopten"></a>`owaspTopTen` | [`[VulnerabilityOwaspTop10!]`](#vulnerabilityowasptop10) | Filter vulnerabilities by OWASP Top 10 category. Wildcard value "NONE" also supported when feature flag `owasp_top_10_null_filtering` is enabled. "NONE" wildcard cannot be combined with other OWASP top 10 values. |
| <a id="groupvulnerabilitiesprojectid"></a>`projectId` | [`[ID!]`](#id) | Filter vulnerabilities by project. |
@ -32569,6 +32571,7 @@ four standard [pagination arguments](#pagination-arguments):
| <a id="projectvulnerabilitieshasmergerequest"></a>`hasMergeRequest` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have linked merge requests. |
| <a id="projectvulnerabilitieshasremediations"></a>`hasRemediations` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have remediations. |
| <a id="projectvulnerabilitieshasresolution"></a>`hasResolution` | [`Boolean`](#boolean) | Returns only the vulnerabilities which have been resolved on default branch. |
| <a id="projectvulnerabilitiesidentifiername"></a>`identifierName` **{warning-solid}** | [`String`](#string) | **Introduced** in GitLab 17.6. **Status**: Experiment. Filter vulnerabilities by identifier name. Applicable only on project level when feature flag `vulnerability_identifier_name_filter` is enabled. Ignored when applied on group level or instance securitydashboard queries. |
| <a id="projectvulnerabilitiesimage"></a>`image` | [`[String!]`](#string) | Filter vulnerabilities by location image. When this filter is present, the response only matches entries for a `reportType` that includes `container_scanning`, `cluster_image_scanning`. |
| <a id="projectvulnerabilitiesowasptopten"></a>`owaspTopTen` | [`[VulnerabilityOwaspTop10!]`](#vulnerabilityowasptop10) | Filter vulnerabilities by OWASP Top 10 category. Wildcard value "NONE" also supported when feature flag `owasp_top_10_null_filtering` is enabled. "NONE" wildcard cannot be combined with other OWASP top 10 values. |
| <a id="projectvulnerabilitiesprojectid"></a>`projectId` | [`[ID!]`](#id) | Filter vulnerabilities by project. |
@ -39322,6 +39325,7 @@ Values for package manager.
| <a id="packagemanagerbundler"></a>`BUNDLER` | Package manager: bundler. |
| <a id="packagemanagercomposer"></a>`COMPOSER` | Package manager: composer. |
| <a id="packagemanagerconan"></a>`CONAN` | Package manager: conan. |
| <a id="packagemanagerconda"></a>`CONDA` | Package manager: conda. |
| <a id="packagemanagergo"></a>`GO` | Package manager: go. |
| <a id="packagemanagergradle"></a>`GRADLE` | Package manager: gradle. |
| <a id="packagemanagermaven"></a>`MAVEN` | Package manager: maven. |

View File

@ -742,7 +742,7 @@ List all runners available in the group as well as its ancestor groups, includin
Prerequisites:
- You must be an administrator or have the Maintainer role of the target namespace.
- You must be an administrator or have the Maintainer role for the target namespace.
```plaintext
GET /groups/:id/runners

Some files were not shown because too many files have changed in this diff Show More