From 4a0777f245a9f5d55644beb3eb44bb7d751cab36 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 17 Jun 2024 12:21:35 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .rubocop_todo/layout/array_alignment.yml | 14 ---------- .../javascripts/issues/list/constants.js | 18 +++++++++++++ app/assets/javascripts/issues/list/utils.js | 2 ++ .../components/merge_requests_list_app.vue | 16 ++++++++++++ .../queries/get_merge_requests.query.graphql | 4 +++ .../work_item_attributes_wrapper.vue | 2 +- .../components/work_item_detail.vue | 8 +++--- .../javascripts/work_items/router/routes.js | 2 +- .../stylesheets/highlight/_white_base.scss | 17 ++++++++++++ .../admin/application_settings_controller.rb | 4 +-- .../groups/work_items_controller.rb | 2 +- app/controllers/groups_controller.rb | 2 +- app/controllers/profiles_controller.rb | 2 +- .../projects/incidents_controller.rb | 2 +- app/controllers/projects/issues_controller.rb | 2 +- app/controllers/projects/labels_controller.rb | 4 +-- .../projects/protected_branches_controller.rb | 6 ++--- .../projects/settings/ci_cd_controller.rb | 2 +- .../projects/work_items_controller.rb | 2 +- app/controllers/projects_controller.rb | 4 +-- app/controllers/users_controller.rb | 4 +-- .../concerns/issues/sort_arguments.rb | 8 +++--- .../types/permission_types/merge_request.rb | 6 ++--- app/helpers/merge_requests_helper.rb | 2 +- app/helpers/submodule_helper.rb | 4 +-- app/models/ci/bridge.rb | 6 ++--- app/models/ci/build.rb | 14 +++++----- .../concerns/ci/partitionable/switch.rb | 2 +- app/models/group.rb | 4 +-- app/models/project.rb | 4 +-- app/services/work_items/update_service.rb | 4 +++ ...k_items_mvc_2.yml => work_items_alpha.yml} | 10 +++---- doc/api/graphql/reference/index.md | 8 +++--- doc/development/documentation/metadata.md | 17 ++++++++++++ doc/install/aws/index.md | 18 ++++++------- doc/install/relative_url.md | 2 +- doc/install/requirements.md | 2 +- doc/integration/saml.md | 3 +++ .../index.md | 2 +- .../set_up_gitlab_google_integration/index.md | 10 +++---- doc/tutorials/setup_steps/index.md | 2 +- doc/user/analytics/analytics_dashboards.md | 6 ++--- .../api_fuzzing/troubleshooting.md | 4 +-- .../checks/os_command_injection_check.md | 2 +- .../configuration/index.md | 4 +-- .../container_scanning/index.md | 25 ++++++++++++++++++ .../index.md | 26 +------------------ .../coverage_fuzzing/index.md | 4 +-- .../application_security/sast/analyzers.md | 20 +++++++------- doc/user/group/saml_sso/group_sync.md | 17 ++++++++++-- .../group/value_stream_analytics/index.md | 6 +++-- .../harbor_container_registry/index.md | 6 ++--- doc/user/product_analytics/index.md | 4 +-- doc/user/profile/account/delete_account.md | 2 +- doc/user/profile/comment_templates.md | 4 +-- doc/user/profile/index.md | 2 +- .../integrations/gitlab_slack_application.md | 10 +++---- doc/user/project/integrations/squash_tm.md | 12 ++++----- .../project/merge_requests/approvals/rules.md | 6 ++--- .../repository/mirror/troubleshooting.md | 2 +- .../project/repository/signed_commits/x509.md | 2 +- doc/user/project/service_desk/configure.md | 3 ++- locale/gitlab.pot | 3 +++ .../merge_requests_list_app_spec.js | 5 ++++ .../notes/work_item_note_actions_spec.js | 2 +- .../components/notes/work_item_note_spec.js | 4 +-- .../components/work_item_actions_spec.js | 2 +- .../work_item_attributes_wrapper_spec.js | 8 +++--- .../components/work_item_detail_spec.js | 14 +++++----- .../work_item_notifications_widget_spec.js | 2 +- spec/frontend/work_items/router_spec.js | 6 ++--- spec/models/group_spec.rb | 6 ++--- spec/models/project_spec.rb | 6 ++--- 73 files changed, 282 insertions(+), 190 deletions(-) rename config/feature_flags/development/{work_items_mvc_2.yml => work_items_alpha.yml} (67%) diff --git a/.rubocop_todo/layout/array_alignment.yml b/.rubocop_todo/layout/array_alignment.yml index e59b2fff75a..ed0e05722fd 100644 --- a/.rubocop_todo/layout/array_alignment.yml +++ b/.rubocop_todo/layout/array_alignment.yml @@ -2,20 +2,6 @@ # Cop supports --autocorrect. Layout/ArrayAlignment: Exclude: - - 'app/controllers/admin/application_settings_controller.rb' - - 'app/controllers/profiles_controller.rb' - - 'app/controllers/projects/labels_controller.rb' - - 'app/controllers/projects/protected_branches_controller.rb' - - 'app/controllers/projects/settings/ci_cd_controller.rb' - - 'app/controllers/projects_controller.rb' - - 'app/controllers/users_controller.rb' - - 'app/graphql/resolvers/concerns/issues/sort_arguments.rb' - - 'app/graphql/types/permission_types/merge_request.rb' - - 'app/helpers/merge_requests_helper.rb' - - 'app/helpers/submodule_helper.rb' - - 'app/models/ci/bridge.rb' - - 'app/models/ci/build.rb' - - 'app/models/concerns/ci/partitionable/switch.rb' - 'app/models/deploy_token.rb' - 'app/models/dev_ops_report/metric.rb' - 'app/models/integrations/microsoft_teams.rb' diff --git a/app/assets/javascripts/issues/list/constants.js b/app/assets/javascripts/issues/list/constants.js index a6850c8bdc9..7aae0a325c3 100644 --- a/app/assets/javascripts/issues/list/constants.js +++ b/app/assets/javascripts/issues/list/constants.js @@ -12,6 +12,7 @@ import { OPERATOR_AFTER, OPERATOR_BEFORE, TOKEN_TYPE_ASSIGNEE, + TOKEN_TYPE_REVIEWER, TOKEN_TYPE_AUTHOR, TOKEN_TYPE_CONFIDENTIAL, TOKEN_TYPE_CONTACT, @@ -234,6 +235,23 @@ export const filtersMap = { }, }, }, + [TOKEN_TYPE_REVIEWER]: { + [API_PARAM]: { + [NORMAL_FILTER]: 'reviewerUsername', + [SPECIAL_FILTER]: 'reviewerWildcardId', + [ALTERNATIVE_FILTER]: 'reviewerId', + }, + [URL_PARAM]: { + [OPERATOR_IS]: { + [NORMAL_FILTER]: 'reviewer_username', + [SPECIAL_FILTER]: 'reviewer_id', + [ALTERNATIVE_FILTER]: 'reviewer_username', + }, + [OPERATOR_NOT]: { + [NORMAL_FILTER]: 'not[reviewer_username]', + }, + }, + }, [TOKEN_TYPE_MILESTONE]: { [API_PARAM]: { [NORMAL_FILTER]: 'milestoneTitle', diff --git a/app/assets/javascripts/issues/list/utils.js b/app/assets/javascripts/issues/list/utils.js index 7d8886e0480..15085321e0b 100644 --- a/app/assets/javascripts/issues/list/utils.js +++ b/app/assets/javascripts/issues/list/utils.js @@ -11,6 +11,7 @@ import { OPERATOR_AFTER, OPERATORS_TO_GROUP, TOKEN_TYPE_ASSIGNEE, + TOKEN_TYPE_REVIEWER, TOKEN_TYPE_AUTHOR, TOKEN_TYPE_DRAFT, TOKEN_TYPE_CONFIDENTIAL, @@ -326,6 +327,7 @@ const wildcardTokens = [ TOKEN_TYPE_RELEASE, TOKEN_TYPE_EPIC, TOKEN_TYPE_ASSIGNEE, + TOKEN_TYPE_REVIEWER, TOKEN_TYPE_WEIGHT, ]; diff --git a/app/assets/javascripts/merge_requests/list/components/merge_requests_list_app.vue b/app/assets/javascripts/merge_requests/list/components/merge_requests_list_app.vue index f51ccc04059..482578217a0 100644 --- a/app/assets/javascripts/merge_requests/list/components/merge_requests_list_app.vue +++ b/app/assets/javascripts/merge_requests/list/components/merge_requests_list_app.vue @@ -25,6 +25,8 @@ import { TOKEN_TYPE_SOURCE_BRANCH, TOKEN_TITLE_ASSIGNEE, TOKEN_TYPE_ASSIGNEE, + TOKEN_TITLE_REVIEWER, + TOKEN_TYPE_REVIEWER, TOKEN_TITLE_MILESTONE, TOKEN_TYPE_MILESTONE, } from '~/vue_shared/components/filtered_search_bar/constants'; @@ -191,6 +193,20 @@ export default { multiSelect: false, unique: true, }, + { + type: TOKEN_TYPE_REVIEWER, + title: TOKEN_TITLE_REVIEWER, + icon: 'user', + token: UserToken, + dataType: 'user', + operators: OPERATORS_IS, + fullPath: this.fullPath, + isProject: true, + recentSuggestionsStorageKey: `${this.fullPath}-merge-requests-recent-tokens-reviewer`, + preloadedUsers, + multiSelect: false, + unique: true, + }, { type: TOKEN_TYPE_AUTHOR, title: TOKEN_TITLE_AUTHOR, diff --git a/app/assets/javascripts/merge_requests/list/queries/get_merge_requests.query.graphql b/app/assets/javascripts/merge_requests/list/queries/get_merge_requests.query.graphql index 2b8d9409916..ea81f5ea2ba 100644 --- a/app/assets/javascripts/merge_requests/list/queries/get_merge_requests.query.graphql +++ b/app/assets/javascripts/merge_requests/list/queries/get_merge_requests.query.graphql @@ -9,6 +9,8 @@ query getMergeRequests( $state: MergeRequestState $assigneeUsernames: String $assigneeWildcardId: AssigneeWildcardId + $reviewerUsername: String + $reviewerWildcardId: ReviewerWildcardId $authorUsername: String $draft: Boolean $milestoneTitle: String @@ -27,6 +29,8 @@ query getMergeRequests( state: $state assigneeUsername: $assigneeUsernames assigneeWildcardId: $assigneeWildcardId + reviewerUsername: $reviewerUsername + reviewerWildcardId: $reviewerWildcardId authorUsername: $authorUsername draft: $draft milestoneTitle: $milestoneTitle diff --git a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue index 3fcefbfe0ae..f85cc80f23f 100644 --- a/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue +++ b/app/assets/javascripts/work_items/components/work_item_attributes_wrapper.vue @@ -125,7 +125,7 @@ export default { return this.workItem?.author; }, workItemDevelopment() { - return this.isWidgetPresent(WIDGET_TYPE_DEVELOPMENT) && this.glFeatures.workItemsMvc2; + return this.isWidgetPresent(WIDGET_TYPE_DEVELOPMENT) && this.glFeatures.workItemsAlpha; }, }, methods: { diff --git a/app/assets/javascripts/work_items/components/work_item_detail.vue b/app/assets/javascripts/work_items/components/work_item_detail.vue index 0497c5cd649..a58fb53564f 100644 --- a/app/assets/javascripts/work_items/components/work_item_detail.vue +++ b/app/assets/javascripts/work_items/components/work_item_detail.vue @@ -197,8 +197,8 @@ export default { isDiscussionLocked() { return this.workItemNotes?.discussionLocked; }, - workItemsMvc2Enabled() { - return this.glFeatures.workItemsMvc2; + workItemsAlphaEnabled() { + return this.glFeatures.workItemsAlpha; }, newTodoAndNotificationsEnabled() { return this.glFeatures.notificationsTodosButtons; @@ -279,7 +279,7 @@ export default { return { 'sm:!gl-block': !this.parentWorkItem, 'gl-hidden sm:!gl-block gl-mt-3': this.parentWorkItem, - 'editable-wi-title': this.workItemsMvc2Enabled, + 'editable-wi-title': this.workItemsAlphaEnabled, }; }, shouldShowEditButton() { @@ -356,7 +356,7 @@ export default { }); }, openInModal({ event, modalWorkItem, context }) { - if (!this.workItemsMvc2Enabled || context === LINKED_ITEMS_ANCHOR) { + if (!this.workItemsAlphaEnabled || context === LINKED_ITEMS_ANCHOR) { return; } diff --git a/app/assets/javascripts/work_items/router/routes.js b/app/assets/javascripts/work_items/router/routes.js index 8d562c8880c..2d219bc48ea 100644 --- a/app/assets/javascripts/work_items/router/routes.js +++ b/app/assets/javascripts/work_items/router/routes.js @@ -24,7 +24,7 @@ function getRoutes() { }, ]; - if (gon.features?.workItemsMvc2) { + if (gon.features?.workItemsAlpha) { routes.unshift({ path: '/new', name: 'createWorkItem', diff --git a/app/assets/stylesheets/highlight/_white_base.scss b/app/assets/stylesheets/highlight/_white_base.scss index c672d66cdc7..92b7a66d23f 100644 --- a/app/assets/stylesheets/highlight/_white_base.scss +++ b/app/assets/stylesheets/highlight/_white_base.scss @@ -331,6 +331,7 @@ $white-gc-bg: #eaf2f5; .ge { font-style: italic; } .gr { color: $white-gr; } + .hljs-section, .gh { color: $white-gh; font-weight: $gl-font-weight-bold; } @@ -344,12 +345,15 @@ $white-gc-bg: #eaf2f5; } } + .hljs-quote, .go { color: $white-go; } .gp { color: $white-gp; } .gs { font-weight: $gl-font-weight-bold; } .gu { color: $white-gu; font-weight: $gl-font-weight-bold; } + + .hljs-quote, .gt { color: $white-gt; } .kc { font-weight: $gl-font-weight-bold; } @@ -371,8 +375,13 @@ $white-gc-bg: #eaf2f5; .na, .hljs-attr, .hljs-property, + .hljs-symbol, + .hljs-bullet, .hljs-title.function_ { color: $white-na; } + .hljs-symbol, + .hljs-link { text-decoration: underline; } + .nb, .hljs-title.class_, .hljs-literal { color: $white-nb; } @@ -402,6 +411,8 @@ $white-gc-bg: #eaf2f5; .mi, .hljs-number { color: $white-mi; } .mo { color: $white-mo; } + + .hljs-code, .sb { color: $white-sb; } .sc { color: $white-sc; } .sd { color: $white-sd; } @@ -409,6 +420,8 @@ $white-gc-bg: #eaf2f5; .se { color: $white-se; } .sh { color: $white-sh; } .si { color: $white-si; } + + .hljs-link, .sx { color: $white-sx; } .sr { color: $white-sr; } @@ -423,4 +436,8 @@ $white-gc-bg: #eaf2f5; .gc { color: $white-gc-color; background-color: $white-gc-bg; } + + .hljs-strong { font-weight: bold; } + + .hljs-emphasis { font-style: italic; } } diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 4078f03a914..94f9af0f1fd 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -37,8 +37,8 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController feature_category :error_tracking, [:reset_error_tracking_access_token] VALID_SETTING_PANELS = %w[general repository - ci_cd reporting metrics_and_profiling - network preferences].freeze + ci_cd reporting metrics_and_profiling + network preferences].freeze # The current size of a sidekiq job's jid is 24 characters. The size of the # jid is an internal detail of Sidekiq, and they do not guarantee that it'll diff --git a/app/controllers/groups/work_items_controller.rb b/app/controllers/groups/work_items_controller.rb index 6e12f0ea13a..8653d0e02ae 100644 --- a/app/controllers/groups/work_items_controller.rb +++ b/app/controllers/groups/work_items_controller.rb @@ -8,7 +8,7 @@ module Groups push_frontend_feature_flag(:notifications_todos_buttons) push_force_frontend_feature_flag(:work_items, group&.work_items_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_beta, group&.work_items_beta_feature_flag_enabled?) - push_force_frontend_feature_flag(:work_items_mvc_2, group&.work_items_mvc_2_feature_flag_enabled?) + push_force_frontend_feature_flag(:work_items_alpha, group&.work_items_alpha_feature_flag_enabled?) end def index diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index fbb27eb2523..8ec7f893103 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -39,7 +39,7 @@ class GroupsController < Groups::ApplicationController push_frontend_feature_flag(:frontend_caching, group) push_force_frontend_feature_flag(:work_items, group.work_items_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_beta, group.work_items_beta_feature_flag_enabled?) - push_force_frontend_feature_flag(:work_items_mvc_2, group.work_items_mvc_2_feature_flag_enabled?) + push_force_frontend_feature_flag(:work_items_alpha, group.work_items_alpha_feature_flag_enabled?) push_frontend_feature_flag(:issues_grid_view) push_frontend_feature_flag(:group_multi_select_tokens, group) end diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 4ed64c531ea..5fcda8e8be9 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -11,7 +11,7 @@ class ProfilesController < Profiles::ApplicationController end feature_category :user_profile, [:reset_incoming_email_token, :reset_feed_token, - :reset_static_object_token, :update_username] + :reset_static_object_token, :update_username] def reset_incoming_email_token Users::UpdateService.new(current_user, user: @user).execute! do |user| diff --git a/app/controllers/projects/incidents_controller.rb b/app/controllers/projects/incidents_controller.rb index 52bfbd8f64c..e050c0c76ae 100644 --- a/app/controllers/projects/incidents_controller.rb +++ b/app/controllers/projects/incidents_controller.rb @@ -9,7 +9,7 @@ class Projects::IncidentsController < Projects::ApplicationController before_action do push_force_frontend_feature_flag(:work_items, @project&.work_items_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_beta, @project&.work_items_beta_feature_flag_enabled?) - push_force_frontend_feature_flag(:work_items_mvc_2, @project&.work_items_mvc_2_feature_flag_enabled?) + push_force_frontend_feature_flag(:work_items_alpha, @project&.work_items_alpha_feature_flag_enabled?) push_frontend_feature_flag(:notifications_todos_buttons, current_user) end diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index f2b7e4d7532..3e224a7882c 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -64,7 +64,7 @@ class Projects::IssuesController < Projects::ApplicationController before_action only: :show do push_frontend_feature_flag(:work_items_beta, project&.group) push_force_frontend_feature_flag(:work_items_beta, project&.work_items_beta_feature_flag_enabled?) - push_force_frontend_feature_flag(:work_items_mvc_2, project&.work_items_mvc_2_feature_flag_enabled?) + push_force_frontend_feature_flag(:work_items_alpha, project&.work_items_alpha_feature_flag_enabled?) push_frontend_feature_flag(:epic_widget_edit_confirmation, project) push_frontend_feature_flag(:display_work_item_epic_issue_sidebar, project) end diff --git a/app/controllers/projects/labels_controller.rb b/app/controllers/projects/labels_controller.rb index 9d643548144..0d8876a822c 100644 --- a/app/controllers/projects/labels_controller.rb +++ b/app/controllers/projects/labels_controller.rb @@ -8,8 +8,8 @@ class Projects::LabelsController < Projects::ApplicationController before_action :find_labels, only: [:index, :set_priorities, :remove_priority, :toggle_subscription] before_action :authorize_read_label! before_action :authorize_admin_labels!, only: [:new, :create, :edit, :update, - :generate, :destroy, :remove_priority, - :set_priorities] + :generate, :destroy, :remove_priority, + :set_priorities] before_action :authorize_admin_group_labels!, only: [:promote] respond_to :js, :html diff --git a/app/controllers/projects/protected_branches_controller.rb b/app/controllers/projects/protected_branches_controller.rb index b212a55bb8b..9145074d824 100644 --- a/app/controllers/projects/protected_branches_controller.rb +++ b/app/controllers/projects/protected_branches_controller.rb @@ -27,9 +27,9 @@ class Projects::ProtectedBranchesController < Projects::ProtectedRefsController def protected_ref_params(*attrs) attrs = ([:name, - :allow_force_push, - { merge_access_levels_attributes: access_level_attributes, - push_access_levels_attributes: access_level_attributes }] + attrs).uniq + :allow_force_push, + { merge_access_levels_attributes: access_level_attributes, + push_access_levels_attributes: access_level_attributes }] + attrs).uniq params.require(:protected_branch).permit(attrs) end diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb index 8efae6f8a1d..23f43002b96 100644 --- a/app/controllers/projects/settings/ci_cd_controller.rb +++ b/app/controllers/projects/settings/ci_cd_controller.rb @@ -165,7 +165,7 @@ module Projects @ref = params[:ref] || @project.default_branch_or_main @badges = [Gitlab::Ci::Badge::Pipeline::Status, - Gitlab::Ci::Badge::Coverage::Report] + Gitlab::Ci::Badge::Coverage::Report] @badges.map! do |badge| badge.new(@project, @ref).metadata diff --git a/app/controllers/projects/work_items_controller.rb b/app/controllers/projects/work_items_controller.rb index 3e874ecc0bd..fcdaf042d76 100644 --- a/app/controllers/projects/work_items_controller.rb +++ b/app/controllers/projects/work_items_controller.rb @@ -11,7 +11,7 @@ class Projects::WorkItemsController < Projects::ApplicationController push_frontend_feature_flag(:notifications_todos_buttons) push_force_frontend_feature_flag(:work_items, project&.work_items_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_beta, project&.work_items_beta_feature_flag_enabled?) - push_force_frontend_feature_flag(:work_items_mvc_2, project&.work_items_mvc_2_feature_flag_enabled?) + push_force_frontend_feature_flag(:work_items_alpha, project&.work_items_alpha_feature_flag_enabled?) end feature_category :team_planning diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 9e8f3567bb4..f9501d4bea1 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -52,7 +52,7 @@ class ProjectsController < Projects::ApplicationController push_force_frontend_feature_flag(:work_items, @project&.work_items_feature_flag_enabled?) push_force_frontend_feature_flag(:work_items_beta, @project&.work_items_beta_feature_flag_enabled?) - push_force_frontend_feature_flag(:work_items_mvc_2, @project&.work_items_mvc_2_feature_flag_enabled?) + push_force_frontend_feature_flag(:work_items_alpha, @project&.work_items_alpha_feature_flag_enabled?) end layout :determine_layout @@ -73,7 +73,7 @@ class ProjectsController < Projects::ApplicationController # TODO: Set high urgency for #show https://gitlab.com/gitlab-org/gitlab/-/issues/334444 urgency :low, [:refs, :show, :toggle_star, :transfer, :archive, :destroy, :update, :create, - :activity, :edit, :new, :export, :remove_export, :generate_new_export, :download_export] + :activity, :edit, :new, :export, :remove_export, :generate_new_export, :download_export] urgency :high, [:unfoldered_environment_names] diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0e15ed9b89b..55a50f5b3f5 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -32,8 +32,8 @@ class UsersController < ApplicationController end feature_category :user_profile, [:show, :activity, :groups, :projects, :contributed, :starred, - :followers, :following, :calendar, :calendar_activities, - :exists, :activity, :follow, :unfollow, :ssh_keys] + :followers, :following, :calendar, :calendar_activities, + :exists, :activity, :follow, :unfollow, :ssh_keys] feature_category :source_code_management, [:snippets, :gpg_keys] diff --git a/app/graphql/resolvers/concerns/issues/sort_arguments.rb b/app/graphql/resolvers/concerns/issues/sort_arguments.rb index 3b13b080761..525a070bc12 100644 --- a/app/graphql/resolvers/concerns/issues/sort_arguments.rb +++ b/app/graphql/resolvers/concerns/issues/sort_arguments.rb @@ -5,10 +5,10 @@ module Issues extend ActiveSupport::Concern NON_STABLE_CURSOR_SORTS = %i[priority_asc priority_desc - popularity_asc popularity_desc - label_priority_asc label_priority_desc - milestone_due_asc milestone_due_desc - escalation_status_asc escalation_status_desc].freeze + popularity_asc popularity_desc + label_priority_asc label_priority_desc + milestone_due_asc milestone_due_desc + escalation_status_asc escalation_status_desc].freeze included do argument :sort, Types::IssueSortEnum, diff --git a/app/graphql/types/permission_types/merge_request.rb b/app/graphql/types/permission_types/merge_request.rb index a5fa63b20b0..911b5e44275 100644 --- a/app/graphql/types/permission_types/merge_request.rb +++ b/app/graphql/types/permission_types/merge_request.rb @@ -9,9 +9,9 @@ module Types present_using MergeRequestPresenter PERMISSION_FIELDS = %i[push_to_source_branch - remove_source_branch - cherry_pick_on_current_merge_request - revert_on_current_merge_request].freeze + remove_source_branch + cherry_pick_on_current_merge_request + revert_on_current_merge_request].freeze abilities :read_merge_request, :admin_merge_request, :update_merge_request, :create_note diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index 717a1867df9..12f04e69d2e 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -124,7 +124,7 @@ module MergeRequestsHelper return if merge_request.can_allow_collaboration?(current_user) minimum_visibility = [merge_request.target_project.visibility_level, - merge_request.source_project.visibility_level].min + merge_request.source_project.visibility_level].min if minimum_visibility < Gitlab::VisibilityLevel::INTERNAL _('Not available for private projects') diff --git a/app/helpers/submodule_helper.rb b/app/helpers/submodule_helper.rb index c8dd7f59b43..981c6f1f051 100644 --- a/app/helpers/submodule_helper.rb +++ b/app/helpers/submodule_helper.rb @@ -51,7 +51,7 @@ module SubmoduleHelper return [nil, nil] unless project.present? && namespace.present? gitlab_hosts = [Gitlab.config.gitlab.url, - Gitlab.config.gitlab_shell.ssh_path_prefix] + Gitlab.config.gitlab_shell.ssh_path_prefix] matching_host = gitlab_hosts.find do |host| url.start_with?(host) @@ -83,7 +83,7 @@ module SubmoduleHelper def self_url?(url, namespace, project) url_no_dotgit = url.chomp('.git') return true if url_no_dotgit == [Gitlab.config.gitlab.url, '/', namespace, '/', - project].join('') + project].join('') url_with_dotgit = "#{url_no_dotgit}.git" url_with_dotgit == Gitlab::RepositoryUrlBuilder.build([namespace, '/', project].join('')) diff --git a/app/models/ci/bridge.rb b/app/models/ci/bridge.rb index cded11a78a5..6f02a37b6cd 100644 --- a/app/models/ci/bridge.rb +++ b/app/models/ci/bridge.rb @@ -78,9 +78,9 @@ module Ci def self.clone_accessors %i[pipeline project ref tag options name - allow_failure stage stage_idx - yaml_variables when environment description needs_attributes - scheduling_type ci_stage partition_id].freeze + allow_failure stage stage_idx + yaml_variables when environment description needs_attributes + scheduling_type ci_stage partition_id].freeze end def inherit_status_from_downstream!(pipeline) diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index c9091047de8..d9f9c10aa54 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -229,11 +229,11 @@ module Ci def clone_accessors %i[pipeline project ref tag options name - allow_failure stage stage_idx trigger_request - yaml_variables when environment coverage_regex - description tag_list protected needs_attributes - job_variables_attributes resource_group scheduling_type - ci_stage partition_id id_tokens interruptible].freeze + allow_failure stage stage_idx trigger_request + yaml_variables when environment coverage_regex + description tag_list protected needs_attributes + job_variables_attributes resource_group scheduling_type + ci_stage partition_id id_tokens interruptible].freeze end def supported_keyset_orderings @@ -839,8 +839,8 @@ module Ci def steps [Gitlab::Ci::Build::Step.from_commands(self), - Gitlab::Ci::Build::Step.from_release(self), - Gitlab::Ci::Build::Step.from_after_script(self)].compact + Gitlab::Ci::Build::Step.from_release(self), + Gitlab::Ci::Build::Step.from_after_script(self)].compact end def runtime_hooks diff --git a/app/models/concerns/ci/partitionable/switch.rb b/app/models/concerns/ci/partitionable/switch.rb index cf7f08e8238..1bda40f859f 100644 --- a/app/models/concerns/ci/partitionable/switch.rb +++ b/app/models/concerns/ci/partitionable/switch.rb @@ -11,7 +11,7 @@ module Ci # include the table name. # SWAPABLE_METHODS = %i[table_name quoted_table_name arel_table - predicate_builder cached_find_by_statement].freeze + predicate_builder cached_find_by_statement].freeze included do |base| partitioned = Class.new(base) do diff --git a/app/models/group.rb b/app/models/group.rb index 607fe193b07..cd32bffcd5d 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -927,8 +927,8 @@ class Group < Namespace feature_flag_enabled_for_self_or_ancestor?(:work_items_beta, type: :beta) end - def work_items_mvc_2_feature_flag_enabled? - feature_flag_enabled_for_self_or_ancestor?(:work_items_mvc_2) + def work_items_alpha_feature_flag_enabled? + feature_flag_enabled_for_self_or_ancestor?(:work_items_alpha) end def work_items_rolledup_dates_feature_flag_enabled? diff --git a/app/models/project.rb b/app/models/project.rb index 236da1ca1bd..2923c845d93 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -3229,8 +3229,8 @@ class Project < ApplicationRecord group&.work_items_beta_feature_flag_enabled? || Feature.enabled?(:work_items_beta, type: :beta) end - def work_items_mvc_2_feature_flag_enabled? - group&.work_items_mvc_2_feature_flag_enabled? || Feature.enabled?(:work_items_mvc_2) + def work_items_alpha_feature_flag_enabled? + group&.work_items_alpha_feature_flag_enabled? || Feature.enabled?(:work_items_alpha) end def enqueue_record_project_target_platforms diff --git a/app/services/work_items/update_service.rb b/app/services/work_items/update_service.rb index 021e4ebf12e..d82aec4fb64 100644 --- a/app/services/work_items/update_service.rb +++ b/app/services/work_items/update_service.rb @@ -102,6 +102,10 @@ module WorkItems Gitlab::EventStore.publish(event) end end + + def parent + container + end end end diff --git a/config/feature_flags/development/work_items_mvc_2.yml b/config/feature_flags/development/work_items_alpha.yml similarity index 67% rename from config/feature_flags/development/work_items_mvc_2.yml rename to config/feature_flags/development/work_items_alpha.yml index 871c3d3a82c..a9df5b50651 100644 --- a/config/feature_flags/development/work_items_mvc_2.yml +++ b/config/feature_flags/development/work_items_alpha.yml @@ -1,8 +1,8 @@ --- -name: work_items_mvc_2 -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/89028 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/363030 -milestone: '15.1' +name: work_items_alpha +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/155990 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/360927 +milestone: '17.2' type: development group: group::project management -default_enabled: false +default_enabled: false \ No newline at end of file diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index ff67e000b87..1cf2a45b313 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -22910,7 +22910,7 @@ Returns [`WorkItemStateCountsType`](#workitemstatecountstype). | `search` | [`String`](#string) | Search query for title or description. | | `sort` | [`WorkItemSort`](#workitemsort) | Sort work items by criteria. | | `state` | [`IssuableState`](#issuablestate) | Current state of the work item. | -| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_mvc_2` is disabled. | +| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_alpha` is disabled. | | `types` | [`[IssueType!]`](#issuetype) | Filter work items by the given work item types. | ##### `Group.workItemTypes` @@ -22957,7 +22957,7 @@ four standard [pagination arguments](#pagination-arguments): | `search` | [`String`](#string) | Search query for title or description. | | `sort` | [`WorkItemSort`](#workitemsort) | Sort work items by criteria. | | `state` | [`IssuableState`](#issuablestate) | Current state of the work item. | -| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_mvc_2` is disabled. | +| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_alpha` is disabled. | | `types` | [`[IssueType!]`](#issuetype) | Filter work items by the given work item types. | ### `GroupAuditEventNamespaceFilter` @@ -29225,7 +29225,7 @@ Returns [`WorkItemStateCountsType`](#workitemstatecountstype). | `search` | [`String`](#string) | Search query for title or description. | | `sort` | [`WorkItemSort`](#workitemsort) | Sort work items by criteria. | | `state` | [`IssuableState`](#issuablestate) | Current state of the work item. | -| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_mvc_2` is disabled. | +| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_alpha` is disabled. | | `types` | [`[IssueType!]`](#issuetype) | Filter work items by the given work item types. | ##### `Project.workItemTypes` @@ -29270,7 +29270,7 @@ four standard [pagination arguments](#pagination-arguments): | `search` | [`String`](#string) | Search query for title or description. | | `sort` | [`WorkItemSort`](#workitemsort) | Sort work items by criteria. | | `state` | [`IssuableState`](#issuablestate) | Current state of the work item. | -| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_mvc_2` is disabled. | +| `statusWidget` | [`StatusFilterInput`](#statusfilterinput) | Input for status widget filter. Ignored if `work_items_alpha` is disabled. | | `types` | [`[IssueType!]`](#issuetype) | Filter work items by the given work item types. | ### `ProjectCiCdSetting` diff --git a/doc/development/documentation/metadata.md b/doc/development/documentation/metadata.md index 1d9aa87a005..b836e0177ba 100644 --- a/doc/development/documentation/metadata.md +++ b/doc/development/documentation/metadata.md @@ -70,6 +70,23 @@ For other pages, descriptions are not actively maintained. However, if you want use a short description of what the page is about. See the Google [Best practices for creating quality meta descriptions](https://developers.google.com/search/docs/appearance/snippet#meta-descriptions) for tips. +## Avoid pages being added to global navigation + +If a specific page shouldn't be added to the global navigation (have an entry added to +[`navigation.yaml`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/content/_data/navigation.yaml)), add +the following to the page's metadata: + +```yaml +ignore_in_report: true +``` + +When this metadata is set on a page: + +- The [`pages_not_in_nav.js`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/scripts/pages_not_in_nav.js) + script ignores the page when processing the documentation. +- Technical writers doing the Technical Writing team's monthly tasks aren't prompted to add the page to the global + navigation. + ## Additional metadata The following metadata is optional and is not actively maintained. diff --git a/doc/install/aws/index.md b/doc/install/aws/index.md index b7489b1b263..58d264e8f7c 100644 --- a/doc/install/aws/index.md +++ b/doc/install/aws/index.md @@ -307,15 +307,15 @@ On the Route 53 dashboard, select **Hosted zones** in the left navigation bar: 1. Select an existing hosted zone or, if you do not already have one for your domain, select **Create Hosted Zone**, enter your domain name, and select **Create**. 1. Select **Create record** and provide the following values: - 1. **Name:** Use the domain name (the default value) or enter a subdomain. - 1. **Type:** Select **A - IPv4 address**. - 1. **Alias:** Defaults to **disabled**. Enable this option. - 1. **Route traffic to:** Select **Alias to Network Load Balancer**. - 1. **Region:** Select the region where the Network Load Balancer resides. - 1. **Choose network load balancer:** Select the Network Load Balancer we created earlier. - 1. **Routing Policy:** We use **Simple** but you can choose a different policy based on your use case. - 1. **Evaluate Target Health:** We set this to **No** but you can choose to have the load balancer route traffic based on target health. - 1. Select **Create**. + 1. **Name:** Use the domain name (the default value) or enter a subdomain. + 1. **Type:** Select **A - IPv4 address**. + 1. **Alias:** Defaults to **disabled**. Enable this option. + 1. **Route traffic to:** Select **Alias to Network Load Balancer**. + 1. **Region:** Select the region where the Network Load Balancer resides. + 1. **Choose network load balancer:** Select the Network Load Balancer we created earlier. + 1. **Routing Policy:** We use **Simple** but you can choose a different policy based on your use case. + 1. **Evaluate Target Health:** We set this to **No** but you can choose to have the load balancer route traffic based on target health. + 1. Select **Create**. 1. If you registered your domain through Route 53, you're done. If you used a different domain registrar, you must update your DNS records with your domain registrar. You must: 1. Select **Hosted zones** and select the domain you added above. 1. You see a list of `NS` records. From your domain registrar's administrator panel, add each of these as `NS` records to your domain's DNS records. These steps may vary between domain registrars. If you're stuck, Google **"name of your registrar" add DNS records** and you should find a help article specific to your domain registrar. diff --git a/doc/install/relative_url.md b/doc/install/relative_url.md index 2a32e977aea..3f56264314a 100644 --- a/doc/install/relative_url.md +++ b/doc/install/relative_url.md @@ -128,7 +128,7 @@ To disable the relative URL: 1. Remove `/home/git/gitlab/config/initializers/relative_url.rb` 1. Follow the same as above starting from 2. and set up the - GitLab URL to one that doesn't contain a relative path. + GitLab URL to one that doesn't contain a relative path.