summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-07 09:07:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-07 09:07:12 +0000
commit8228f6e154ed6b1884fab3fe5dc79a0552662d1b (patch)
treebcfe383894ebbf8578de1844f9c6ce39a1f88f99
parenta95f7ad8b8331e972ce2e82247679fec7a918565 (diff)
downloadgitlab-ce-8228f6e154ed6b1884fab3fe5dc79a0552662d1b.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.rubocop_todo/style/if_unless_modifier.yml19
-rw-r--r--app/assets/javascripts/graphql_shared/possible_types.json3
-rw-r--r--app/channels/graphql_channel.rb4
-rw-r--r--app/controllers/admin/application_settings_controller.rb12
-rw-r--r--app/controllers/admin/projects_controller.rb8
-rw-r--r--app/controllers/admin/users_controller.rb14
-rw-r--r--app/controllers/application_controller.rb12
-rw-r--r--app/controllers/concerns/controller_with_cross_project_access_check.rb4
-rw-r--r--app/controllers/concerns/cycle_analytics_params.rb5
-rw-r--r--app/controllers/concerns/enforces_two_factor_authentication.rb4
-rw-r--r--app/controllers/concerns/issuable_actions.rb16
-rw-r--r--app/controllers/concerns/issuable_collections.rb4
-rw-r--r--app/controllers/concerns/issues_calendar.rb4
-rw-r--r--app/controllers/concerns/labels_as_hash.rb4
-rw-r--r--app/controllers/concerns/metrics/dashboard/prometheus_api_proxy.rb4
-rw-r--r--app/controllers/concerns/metrics_dashboard.rb4
-rw-r--r--app/controllers/concerns/notes_actions.rb4
-rw-r--r--app/controllers/concerns/oauth_applications.rb4
-rw-r--r--app/controllers/concerns/paginated_collection.rb4
-rw-r--r--app/controllers/concerns/record_user_last_activity.rb1
-rw-r--r--app/controllers/concerns/sorting_preference.rb4
-rw-r--r--app/views/admin/hook_logs/show.html.haml4
-rw-r--r--app/views/admin/projects/show.html.haml2
-rw-r--r--db/docs/work_item_progresses.yml10
-rw-r--r--db/migrate/20221121091238_add_work_item_progress.rb18
-rw-r--r--db/schema_migrations/202211210912381
-rw-r--r--db/structure.sql13
-rw-r--r--doc/api/graphql/reference/index.md13
-rw-r--r--doc/tutorials/index.md5
-rw-r--r--doc/tutorials/move_personal_project_to_a_group.md32
-rw-r--r--doc/user/namespace/index.md12
-rw-r--r--lib/gitlab/database/gitlab_schemas.yml1
-rw-r--r--locale/gitlab.pot3
-rw-r--r--qa/qa/resource/runner.rb19
-rw-r--r--qa/qa/service/docker_run/base.rb6
-rw-r--r--qa/qa/service/docker_run/gitlab_runner.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb25
-rw-r--r--spec/features/projects/activity/rss_spec.rb2
-rw-r--r--spec/features/projects/activity/user_sees_activity_spec.rb2
-rw-r--r--spec/features/projects/activity/user_sees_design_activity_spec.rb2
-rw-r--r--spec/features/projects/activity/user_sees_design_comment_spec.rb2
-rw-r--r--spec/features/projects/activity/user_sees_private_activity_spec.rb2
-rw-r--r--spec/features/projects/artifacts/file_spec.rb2
-rw-r--r--spec/features/projects/artifacts/raw_spec.rb2
-rw-r--r--spec/features/projects/artifacts/user_browses_artifacts_spec.rb2
-rw-r--r--spec/features/projects/artifacts/user_downloads_artifacts_spec.rb2
-rw-r--r--spec/features/projects/badges/coverage_spec.rb2
-rw-r--r--spec/features/projects/badges/list_spec.rb2
-rw-r--r--spec/features/projects/badges/pipeline_badge_spec.rb2
-rw-r--r--spec/features/projects/blobs/blame_spec.rb2
-rw-r--r--spec/features/projects/blobs/blob_line_permalink_updater_spec.rb2
-rw-r--r--spec/features/projects/blobs/blob_show_spec.rb2
-rw-r--r--spec/features/projects/blobs/edit_spec.rb2
-rw-r--r--spec/features/projects/blobs/shortcuts_blob_spec.rb2
-rw-r--r--spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb2
-rw-r--r--spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb2
-rw-r--r--spec/features/projects/branches/download_buttons_spec.rb2
-rw-r--r--spec/features/projects/branches/new_branch_ref_dropdown_spec.rb2
-rw-r--r--spec/features/projects/branches/user_creates_branch_spec.rb2
-rw-r--r--spec/features/projects/branches/user_deletes_branch_spec.rb2
-rw-r--r--spec/features/projects/branches/user_views_branches_spec.rb2
-rw-r--r--spec/features/projects/ci/editor_spec.rb2
-rw-r--r--spec/features/projects/ci/lint_spec.rb2
-rw-r--r--spec/features/projects/clusters/gcp_spec.rb2
-rw-r--r--spec/features/projects/clusters/user_spec.rb2
-rw-r--r--spec/features/projects/commit/builds_spec.rb2
-rw-r--r--spec/features/projects/commit/cherry_pick_spec.rb2
-rw-r--r--spec/features/projects/commit/comments/user_adds_comment_spec.rb2
-rw-r--r--spec/features/projects/commit/comments/user_deletes_comments_spec.rb2
-rw-r--r--spec/features/projects/commit/comments/user_edits_comments_spec.rb2
-rw-r--r--spec/features/projects/commit/diff_notes_spec.rb2
-rw-r--r--spec/features/projects/commit/mini_pipeline_graph_spec.rb2
-rw-r--r--spec/features/projects/commit/user_comments_on_commit_spec.rb2
-rw-r--r--spec/features/projects/commit/user_reverts_commit_spec.rb2
-rw-r--r--spec/features/projects/commit/user_views_user_status_on_commit_spec.rb2
-rw-r--r--spec/features/projects/commits/multi_view_diff_spec.rb2
-rw-r--r--spec/features/projects/commits/rss_spec.rb2
-rw-r--r--spec/features/projects/commits/user_browses_commits_spec.rb2
-rw-r--r--spec/features/projects/confluence/user_views_confluence_page_spec.rb2
79 files changed, 212 insertions, 180 deletions
diff --git a/.rubocop_todo/style/if_unless_modifier.yml b/.rubocop_todo/style/if_unless_modifier.yml
index ea1c2a141f0..5804fda39e1 100644
--- a/.rubocop_todo/style/if_unless_modifier.yml
+++ b/.rubocop_todo/style/if_unless_modifier.yml
@@ -2,25 +2,6 @@
# Cop supports --autocorrect.
Style/IfUnlessModifier:
Exclude:
- - 'app/channels/graphql_channel.rb'
- - 'app/controllers/admin/application_settings_controller.rb'
- - 'app/controllers/admin/projects_controller.rb'
- - 'app/controllers/admin/users_controller.rb'
- - 'app/controllers/application_controller.rb'
- - 'app/controllers/concerns/controller_with_cross_project_access_check.rb'
- - 'app/controllers/concerns/cycle_analytics_params.rb'
- - 'app/controllers/concerns/enforces_two_factor_authentication.rb'
- - 'app/controllers/concerns/issuable_actions.rb'
- - 'app/controllers/concerns/issuable_collections.rb'
- - 'app/controllers/concerns/issues_calendar.rb'
- - 'app/controllers/concerns/labels_as_hash.rb'
- - 'app/controllers/concerns/metrics/dashboard/prometheus_api_proxy.rb'
- - 'app/controllers/concerns/metrics_dashboard.rb'
- - 'app/controllers/concerns/notes_actions.rb'
- - 'app/controllers/concerns/oauth_applications.rb'
- - 'app/controllers/concerns/paginated_collection.rb'
- - 'app/controllers/concerns/record_user_last_activity.rb'
- - 'app/controllers/concerns/sorting_preference.rb'
- 'app/controllers/concerns/uploads_actions.rb'
- 'app/controllers/concerns/verifies_with_email.rb'
- 'app/controllers/concerns/wiki_actions.rb'
diff --git a/app/assets/javascripts/graphql_shared/possible_types.json b/app/assets/javascripts/graphql_shared/possible_types.json
index 6106d804472..1e65558b814 100644
--- a/app/assets/javascripts/graphql_shared/possible_types.json
+++ b/app/assets/javascripts/graphql_shared/possible_types.json
@@ -151,8 +151,9 @@
"WorkItemWidgetLabels",
"WorkItemWidgetMilestone",
"WorkItemWidgetNotes",
+ "WorkItemWidgetProgress",
"WorkItemWidgetStartAndDueDate",
"WorkItemWidgetStatus",
"WorkItemWidgetWeight"
]
-}
+} \ No newline at end of file
diff --git a/app/channels/graphql_channel.rb b/app/channels/graphql_channel.rb
index d364cc2b64b..ae37be85da8 100644
--- a/app/channels/graphql_channel.rb
+++ b/app/channels/graphql_channel.rb
@@ -25,9 +25,7 @@ class GraphqlChannel < ApplicationCable::Channel # rubocop:disable Gitlab/Namesp
# Track the subscription here so we can remove it
# on unsubscribe.
- if result.context[:subscription_id]
- @subscription_ids << result.context[:subscription_id]
- end
+ @subscription_ids << result.context[:subscription_id] if result.context[:subscription_id]
transmit(payload)
end
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb
index d1a5adcea3d..b8c1bc266f7 100644
--- a/app/controllers/admin/application_settings_controller.rb
+++ b/app/controllers/admin/application_settings_controller.rb
@@ -150,9 +150,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
}
end
- if @application_setting.self_monitoring_project_id.present?
- return render status: :ok, json: self_monitoring_data
- end
+ return render status: :ok, json: self_monitoring_data if @application_setting.self_monitoring_project_id.present?
render status: :bad_request, json: {
message: _('Self-monitoring project does not exist. Please check logs ' \
@@ -236,7 +234,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
params[:application_setting][:restricted_visibility_levels]&.delete("")
if params[:application_setting].key?(:required_instance_ci_template)
- params[:application_setting][:required_instance_ci_template] = nil if params[:application_setting][:required_instance_ci_template].empty?
+ if params[:application_setting][:required_instance_ci_template].empty?
+ params[:application_setting][:required_instance_ci_template] = nil
+ end
end
remove_blank_params_for!(:elasticsearch_aws_secret_access_key, :eks_secret_access_key)
@@ -290,9 +290,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
.new(@application_setting, current_user, application_setting_params)
.execute
- if recheck_user_consent?
- session[:ask_for_usage_stats_consent] = current_user.requires_usage_stats_consent?
- end
+ session[:ask_for_usage_stats_consent] = current_user.requires_usage_stats_consent? if recheck_user_consent?
redirect_path = referer_path(request) || general_admin_application_settings_path
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb
index 3f3c3581555..9e841487508 100644
--- a/app/controllers/admin/projects_controller.rb
+++ b/app/controllers/admin/projects_controller.rb
@@ -13,9 +13,7 @@ class Admin::ProjectsController < Admin::ApplicationController
params[:sort] ||= 'latest_activity_desc'
@sort = params[:sort]
- if params[:last_repository_check_failed].present? && params[:archived].nil?
- params[:archived] = true
- end
+ params[:archived] = true if params[:last_repository_check_failed].present? && params[:archived].nil?
@projects = Admin::ProjectsFinder.new(params: params, current_user: current_user).execute
@@ -57,9 +55,7 @@ class Admin::ProjectsController < Admin::ApplicationController
namespace = Namespace.find_by(id: params[:new_namespace_id])
::Projects::TransferService.new(@project, current_user, params.dup).execute(namespace)
- if @project.errors[:new_namespace].present?
- flash[:alert] = @project.errors[:new_namespace].first
- end
+ flash[:alert] = @project.errors[:new_namespace].first if @project.errors[:new_namespace].present?
@project.reset
redirect_to admin_project_path(@project)
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 2c8b4888d5d..5f6e3f0062f 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -88,17 +88,25 @@ class Admin::UsersController < Admin::ApplicationController
end
def activate
- return redirect_back_or_admin_user(notice: _("Error occurred. A blocked user must be unblocked to be activated")) if user.blocked?
+ if user.blocked?
+ return redirect_back_or_admin_user(notice: _("Error occurred. A blocked user must be unblocked to be activated"))
+ end
user.activate
redirect_back_or_admin_user(notice: _("Successfully activated"))
end
def deactivate
- return redirect_back_or_admin_user(notice: _("Error occurred. A blocked user cannot be deactivated")) if user.blocked?
+ if user.blocked?
+ return redirect_back_or_admin_user(notice: _("Error occurred. A blocked user cannot be deactivated"))
+ end
+
return redirect_back_or_admin_user(notice: _("Successfully deactivated")) if user.deactivated?
return redirect_back_or_admin_user(notice: _("Internal users cannot be deactivated")) if user.internal?
- return redirect_back_or_admin_user(notice: _("The user you are trying to deactivate has been active in the past %{minimum_inactive_days} days and cannot be deactivated") % { minimum_inactive_days: Gitlab::CurrentSettings.deactivate_dormant_users_period }) unless user.can_be_deactivated?
+
+ unless user.can_be_deactivated?
+ return redirect_back_or_admin_user(notice: _("The user you are trying to deactivate has been active in the past %{minimum_inactive_days} days and cannot be deactivated") % { minimum_inactive_days: Gitlab::CurrentSettings.deactivate_dormant_users_period })
+ end
user.deactivate
redirect_back_or_admin_user(notice: _("Successfully deactivated"))
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 28a45606ceb..1ae05424e52 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -179,9 +179,7 @@ class ApplicationController < ActionController::Base
payload[:queue_duration_s] = request.env[::Gitlab::Middleware::RailsQueueDuration::GITLAB_RAILS_QUEUE_DURATION_KEY]
- if Feature.enabled?(:log_response_length)
- payload[:response_bytes] = response.body_parts.sum(&:bytesize)
- end
+ payload[:response_bytes] = response.body_parts.sum(&:bytesize) if Feature.enabled?(:log_response_length)
store_cloudflare_headers!(payload, request)
end
@@ -349,9 +347,7 @@ class ApplicationController < ActionController::Base
def check_password_expiration
return if session[:impersonator_id] || !current_user&.allow_password_authentication?
- if current_user&.password_expired?
- redirect_to new_profile_password_path
- end
+ redirect_to new_profile_password_path if current_user&.password_expired?
end
def active_user_check
@@ -565,9 +561,7 @@ class ApplicationController < ActionController::Base
session[:ask_for_usage_stats_consent] = current_user.requires_usage_stats_consent?
- if session[:ask_for_usage_stats_consent]
- disable_usage_stats
- end
+ disable_usage_stats if session[:ask_for_usage_stats_consent]
end
def disable_usage_stats
diff --git a/app/controllers/concerns/controller_with_cross_project_access_check.rb b/app/controllers/concerns/controller_with_cross_project_access_check.rb
index 3f72f092683..eace8e9464b 100644
--- a/app/controllers/concerns/controller_with_cross_project_access_check.rb
+++ b/app/controllers/concerns/controller_with_cross_project_access_check.rb
@@ -9,9 +9,7 @@ module ControllerWithCrossProjectAccessCheck
end
def cross_project_check
- if Gitlab::CrossProjectAccess.find_check(self)&.should_run?(self)
- authorize_cross_project_page!
- end
+ authorize_cross_project_page! if Gitlab::CrossProjectAccess.find_check(self)&.should_run?(self)
end
def authorize_cross_project_page!
diff --git a/app/controllers/concerns/cycle_analytics_params.rb b/app/controllers/concerns/cycle_analytics_params.rb
index 70bcefe339c..5199d879595 100644
--- a/app/controllers/concerns/cycle_analytics_params.rb
+++ b/app/controllers/concerns/cycle_analytics_params.rb
@@ -23,7 +23,10 @@ module CycleAnalyticsParams
opts[:from] = params[:from] || start_date(params)
opts[:to] = params[:to] if params[:to]
opts[:end_event_filter] = params[:end_event_filter] if params[:end_event_filter]
- opts[:use_aggregated_data_collector] = params[:use_aggregated_data_collector] if params[:use_aggregated_data_collector]
+ if params[:use_aggregated_data_collector]
+ opts[:use_aggregated_data_collector] = params[:use_aggregated_data_collector]
+ end
+
opts.merge!(params.slice(*::Gitlab::Analytics::CycleAnalytics::RequestParams::FINDER_PARAM_NAMES))
opts.merge!(date_range(params))
end
diff --git a/app/controllers/concerns/enforces_two_factor_authentication.rb b/app/controllers/concerns/enforces_two_factor_authentication.rb
index 28e5bfa4529..c8de041d5bd 100644
--- a/app/controllers/concerns/enforces_two_factor_authentication.rb
+++ b/app/controllers/concerns/enforces_two_factor_authentication.rb
@@ -15,9 +15,7 @@ module EnforcesTwoFactorAuthentication
# to include this in controllers inheriting from `ActionController::Metal`
# we need to add this block
- if respond_to?(:helper_method)
- helper_method :two_factor_grace_period_expired?, :two_factor_skippable?
- end
+ helper_method :two_factor_grace_period_expired?, :two_factor_skippable? if respond_to?(:helper_method)
end
def check_two_factor_requirement
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb
index a3adeff3d33..0669f051457 100644
--- a/app/controllers/concerns/issuable_actions.rb
+++ b/app/controllers/concerns/issuable_actions.rb
@@ -146,13 +146,17 @@ module IssuableActions
finder = Issuable::DiscussionsListService.new(current_user, issuable, finder_params_for_issuable)
discussion_notes = finder.execute
- response.headers['X-Next-Page-Cursor'] = finder.paginator.cursor_for_next_page if finder.paginator.present? && finder.paginator.has_next_page?
+ if finder.paginator.present? && finder.paginator.has_next_page?
+ response.headers['X-Next-Page-Cursor'] = finder.paginator.cursor_for_next_page
+ end
case issuable
when MergeRequest
render_mr_discussions(discussion_notes, discussion_serializer, discussion_cache_context)
when Issue
- render json: discussion_serializer.represent(discussion_notes, context: self) if stale?(etag: [discussion_cache_context, discussion_notes])
+ if stale?(etag: [discussion_cache_context, discussion_notes])
+ render json: discussion_serializer.represent(discussion_notes, context: self)
+ end
else
render json: discussion_serializer.represent(discussion_notes, context: self)
end
@@ -230,15 +234,11 @@ module IssuableActions
end
def authorize_destroy_issuable!
- unless can?(current_user, :"destroy_#{issuable.to_ability_name}", issuable)
- access_denied!
- end
+ access_denied! unless can?(current_user, :"destroy_#{issuable.to_ability_name}", issuable)
end
def authorize_admin_issuable!
- unless can?(current_user, :"admin_#{resource_name}", parent)
- access_denied!
- end
+ access_denied! unless can?(current_user, :"admin_#{resource_name}", parent)
end
def authorize_update_issuable!
diff --git a/app/controllers/concerns/issuable_collections.rb b/app/controllers/concerns/issuable_collections.rb
index de38d26e3fe..7b0d8cf8dcb 100644
--- a/app/controllers/concerns/issuable_collections.rb
+++ b/app/controllers/concerns/issuable_collections.rb
@@ -14,7 +14,9 @@ module IssuableCollections
private
def show_alert_if_search_is_disabled
- return if current_user || params[:search].blank? || !html_request? || Feature.disabled?(:disable_anonymous_search, type: :ops)
+ if current_user || params[:search].blank? || !html_request? || Feature.disabled?(:disable_anonymous_search, type: :ops)
+ return
+ end
flash.now[:notice] = _('You must sign in to search for specific terms.')
end
diff --git a/app/controllers/concerns/issues_calendar.rb b/app/controllers/concerns/issues_calendar.rb
index 51d6d3cf05a..692ac5e700b 100644
--- a/app/controllers/concerns/issues_calendar.rb
+++ b/app/controllers/concerns/issues_calendar.rb
@@ -16,9 +16,7 @@ module IssuesCalendar
# the content as a file (even ignoring the Content-Disposition
# header). We want to display the content inline when accessed
# from GitLab, similarly to the RSS feed.
- if request.referer&.start_with?(::Settings.gitlab.base_url)
- response.headers['Content-Type'] = 'text/plain'
- end
+ response.headers['Content-Type'] = 'text/plain' if request.referer&.start_with?(::Settings.gitlab.base_url)
end
end
end
diff --git a/app/controllers/concerns/labels_as_hash.rb b/app/controllers/concerns/labels_as_hash.rb
index e428520f709..601d3bf50eb 100644
--- a/app/controllers/concerns/labels_as_hash.rb
+++ b/app/controllers/concerns/labels_as_hash.rb
@@ -16,9 +16,7 @@ module LabelsAsHash
if already_set_labels.present?
titles = already_set_labels.map(&:title)
label_hashes.each do |hash|
- if titles.include?(hash['title'])
- hash[:set] = true
- end
+ hash[:set] = true if titles.include?(hash['title'])
end
end
end
diff --git a/app/controllers/concerns/metrics/dashboard/prometheus_api_proxy.rb b/app/controllers/concerns/metrics/dashboard/prometheus_api_proxy.rb
index 65237b552ca..ea9fd2de961 100644
--- a/app/controllers/concerns/metrics/dashboard/prometheus_api_proxy.rb
+++ b/app/controllers/concerns/metrics/dashboard/prometheus_api_proxy.rb
@@ -12,9 +12,7 @@ module Metrics::Dashboard::PrometheusApiProxy
variable_substitution_result =
proxy_variable_substitution_service.new(proxyable, permit_params).execute
- if variable_substitution_result[:status] == :error
- return error_response(variable_substitution_result)
- end
+ return error_response(variable_substitution_result) if variable_substitution_result[:status] == :error
prometheus_result = ::Prometheus::ProxyService.new(
proxyable,
diff --git a/app/controllers/concerns/metrics_dashboard.rb b/app/controllers/concerns/metrics_dashboard.rb
index 28d0692d748..d4e8e95e016 100644
--- a/app/controllers/concerns/metrics_dashboard.rb
+++ b/app/controllers/concerns/metrics_dashboard.rb
@@ -118,9 +118,7 @@ module MetricsDashboard
def decoded_params
params = metrics_dashboard_params
- if params[:dashboard_path]
- params[:dashboard_path] = CGI.unescape(params[:dashboard_path])
- end
+ params[:dashboard_path] = CGI.unescape(params[:dashboard_path]) if params[:dashboard_path]
params
end
diff --git a/app/controllers/concerns/notes_actions.rb b/app/controllers/concerns/notes_actions.rb
index 48fc92c34f9..a41e2d840ac 100644
--- a/app/controllers/concerns/notes_actions.rb
+++ b/app/controllers/concerns/notes_actions.rb
@@ -89,9 +89,7 @@ module NotesActions
# rubocop:enable Gitlab/ModuleWithInstanceVariables
def destroy
- if note.editable?
- Notes::DestroyService.new(project, current_user).execute(note)
- end
+ Notes::DestroyService.new(project, current_user).execute(note) if note.editable?
respond_to do |format|
format.js { head :ok }
diff --git a/app/controllers/concerns/oauth_applications.rb b/app/controllers/concerns/oauth_applications.rb
index b48907f7fb3..5b6fe933fda 100644
--- a/app/controllers/concerns/oauth_applications.rb
+++ b/app/controllers/concerns/oauth_applications.rb
@@ -12,9 +12,7 @@ module OauthApplications
def prepare_scopes
scopes = params.fetch(:doorkeeper_application, {}).fetch(:scopes, nil)
- if scopes
- params[:doorkeeper_application][:scopes] = scopes.join(' ')
- end
+ params[:doorkeeper_application][:scopes] = scopes.join(' ') if scopes
end
def set_created_session
diff --git a/app/controllers/concerns/paginated_collection.rb b/app/controllers/concerns/paginated_collection.rb
index fcee4493314..94a52dd0f89 100644
--- a/app/controllers/concerns/paginated_collection.rb
+++ b/app/controllers/concerns/paginated_collection.rb
@@ -10,9 +10,7 @@ module PaginatedCollection
out_of_range = collection.current_page > total_pages
- if out_of_range
- redirect_to(url_for(safe_params.merge(page: total_pages, only_path: true)))
- end
+ redirect_to(url_for(safe_params.merge(page: total_pages, only_path: true))) if out_of_range
out_of_range
end
diff --git a/app/controllers/concerns/record_user_last_activity.rb b/app/controllers/concerns/record_user_last_activity.rb
index a189d4a5c79..6ac87d8f27b 100644
--- a/app/controllers/concerns/record_user_last_activity.rb
+++ b/app/controllers/concerns/record_user_last_activity.rb
@@ -18,7 +18,6 @@ module RecordUserLastActivity
def set_user_last_activity
return unless request.get?
return if Gitlab::Database.read_only?
-
return unless current_user && current_user.last_activity_on != Date.today
Users::ActivityService.new(current_user).execute
diff --git a/app/controllers/concerns/sorting_preference.rb b/app/controllers/concerns/sorting_preference.rb
index 6278b489028..300c1d6d779 100644
--- a/app/controllers/concerns/sorting_preference.rb
+++ b/app/controllers/concerns/sorting_preference.rb
@@ -45,9 +45,7 @@ module SortingPreference
return sort_param if Gitlab::Database.read_only?
- if user_preference[field] != sort_param
- user_preference.update(field => sort_param)
- end
+ user_preference.update(field => sort_param) if user_preference[field] != sort_param
sort_param
end
diff --git a/app/views/admin/hook_logs/show.html.haml b/app/views/admin/hook_logs/show.html.haml
index 6dca0b100e4..0ccde159905 100644
--- a/app/views/admin/hook_logs/show.html.haml
+++ b/app/views/admin/hook_logs/show.html.haml
@@ -6,10 +6,10 @@
- if @hook_log.oversize?
- tooltip = _("Request data is too large")
- = render Pajamas::ButtonComponent.new(disabled: true, button_options: { class: 'float-right gl-ml-3 has-tooltip', title: tooltip }) do
+ = render Pajamas::ButtonComponent.new(disabled: true, button_options: { class: 'gl-float-right gl-ml-3 has-tooltip', title: tooltip }) do
= _("Resend Request")
- else
- = render Pajamas::ButtonComponent.new(href: retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, button_options: { class: 'float-right gl-ml-3' }) do
+ = render Pajamas::ButtonComponent.new(href: retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, button_options: { class: 'gl-float-right gl-ml-3' }) do
= _("Resend Request")
= render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log }
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
index f027f21d1d2..829e9f508e0 100644
--- a/app/views/admin/projects/show.html.haml
+++ b/app/views/admin/projects/show.html.haml
@@ -6,7 +6,7 @@
%h1.page-title.gl-font-size-h-display
= _('Project: %{name}') % { name: @project.full_name }
- = render Pajamas::ButtonComponent.new(href: edit_project_path(@project), icon: 'pencil', button_options: { class: 'float-right' }) do
+ = render Pajamas::ButtonComponent.new(href: edit_project_path(@project), icon: 'pencil', button_options: { class: 'gl-float-right' }) do
= _('Edit')
%hr
- if @project.last_repository_check_failed?
diff --git a/db/docs/work_item_progresses.yml b/db/docs/work_item_progresses.yml
new file mode 100644
index 00000000000..881e5d879e3
--- /dev/null
+++ b/db/docs/work_item_progresses.yml
@@ -0,0 +1,10 @@
+---
+table_name: work_item_progresses
+classes:
+- WorkItems::Progress
+feature_categories:
+- team_planning
+description: The progress of a Work Item.
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/104591/
+milestone: '15.7'
+gitlab_schema: gitlab_main
diff --git a/db/migrate/20221121091238_add_work_item_progress.rb b/db/migrate/20221121091238_add_work_item_progress.rb
new file mode 100644
index 00000000000..0e306bf7332
--- /dev/null
+++ b/db/migrate/20221121091238_add_work_item_progress.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class AddWorkItemProgress < Gitlab::Database::Migration[2.0]
+ enable_lock_retries!
+
+ def up
+ create_table :work_item_progresses, id: false do |t|
+ t.timestamps_with_timezone null: false
+ t.references :issue, primary_key: true, index: false, default: nil,
+ foreign_key: { on_delete: :cascade, to_table: :issues }
+ t.integer :progress, default: 0, limit: 2, null: false
+ end
+ end
+
+ def down
+ drop_table :work_item_progresses
+ end
+end
diff --git a/db/schema_migrations/20221121091238 b/db/schema_migrations/20221121091238
new file mode 100644
index 00000000000..d042656a9c2
--- /dev/null
+++ b/db/schema_migrations/20221121091238
@@ -0,0 +1 @@
+065c3eb12275fda5806d5c5674ae95ef99a78752c0417dd97534b6f4e2337c06 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index f7523d18f6b..e0733d9e421 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -23448,6 +23448,13 @@ CREATE SEQUENCE work_item_parent_links_id_seq
ALTER SEQUENCE work_item_parent_links_id_seq OWNED BY work_item_parent_links.id;
+CREATE TABLE work_item_progresses (
+ created_at timestamp with time zone NOT NULL,
+ updated_at timestamp with time zone NOT NULL,
+ issue_id bigint NOT NULL,
+ progress smallint DEFAULT 0 NOT NULL
+);
+
CREATE TABLE work_item_types (
id bigint NOT NULL,
base_type smallint DEFAULT 0 NOT NULL,
@@ -27026,6 +27033,9 @@ ALTER TABLE ONLY work_item_hierarchy_restrictions
ALTER TABLE ONLY work_item_parent_links
ADD CONSTRAINT work_item_parent_links_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY work_item_progresses
+ ADD CONSTRAINT work_item_progresses_pkey PRIMARY KEY (issue_id);
+
ALTER TABLE ONLY work_item_types
ADD CONSTRAINT work_item_types_pkey PRIMARY KEY (id);
@@ -34755,6 +34765,9 @@ ALTER TABLE ONLY cluster_projects
ALTER TABLE ONLY project_pages_metadata
ADD CONSTRAINT fk_rails_8c28a61485 FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE;
+ALTER TABLE ONLY work_item_progresses
+ ADD CONSTRAINT fk_rails_8c584bfb37 FOREIGN KEY (issue_id) REFERENCES issues(id) ON DELETE CASCADE;
+
ALTER TABLE ONLY packages_conan_metadata
ADD CONSTRAINT fk_rails_8c68cfec8b FOREIGN KEY (package_id) REFERENCES packages_packages(id) ON DELETE CASCADE;
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index b35beec5ea6..73aaa3a3b17 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -20798,6 +20798,17 @@ four standard [pagination arguments](#connection-pagination-arguments):
| ---- | ---- | ----------- |
| <a id="workitemwidgetnotesdiscussionsfilter"></a>`filter` | [`NotesFilterType`](#notesfiltertype) | Type of notes collection: ALL_NOTES, ONLY_COMMENTS, ONLY_ACTIVITY. |
+### `WorkItemWidgetProgress`
+
+Represents a progress widget.
+
+#### Fields
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| <a id="workitemwidgetprogressprogress"></a>`progress` | [`Int`](#int) | Progress of the work item. |
+| <a id="workitemwidgetprogresstype"></a>`type` | [`WorkItemWidgetType`](#workitemwidgettype) | Widget type. |
+
### `WorkItemWidgetStartAndDueDate`
Represents a start and due date widget.
@@ -22960,6 +22971,7 @@ Type of a work item widget.
| <a id="workitemwidgettypelabels"></a>`LABELS` | Labels widget. |
| <a id="workitemwidgettypemilestone"></a>`MILESTONE` | Milestone widget. |
| <a id="workitemwidgettypenotes"></a>`NOTES` | Notes widget. |
+| <a id="workitemwidgettypeprogress"></a>`PROGRESS` | Progress widget. |
| <a id="workitemwidgettypestart_and_due_date"></a>`START_AND_DUE_DATE` | Start And Due Date widget. |
| <a id="workitemwidgettypestatus"></a>`STATUS` | Status widget. |
| <a id="workitemwidgettypeweight"></a>`WEIGHT` | Weight widget. |
@@ -24257,6 +24269,7 @@ Implementations:
- [`WorkItemWidgetLabels`](#workitemwidgetlabels)
- [`WorkItemWidgetMilestone`](#workitemwidgetmilestone)
- [`WorkItemWidgetNotes`](#workitemwidgetnotes)
+- [`WorkItemWidgetProgress`](#workitemwidgetprogress)
- [`WorkItemWidgetStartAndDueDate`](#workitemwidgetstartandduedate)
- [`WorkItemWidgetStatus`](#workitemwidgetstatus)
- [`WorkItemWidgetWeight`](#workitemwidgetweight)
diff --git a/doc/tutorials/index.md b/doc/tutorials/index.md
index 8e03029e501..c1b538bafbe 100644
--- a/doc/tutorials/index.md
+++ b/doc/tutorials/index.md
@@ -94,13 +94,12 @@ can help you manage and configure your instance.
| Topic | Description | Good for beginners |
|-------|-------------|--------------------|
-| [Install GitLab](../install/index.md) | Install GitLab according to your requirements.| |
+| [Install GitLab](../install/install_methods.md) | Install GitLab according to your requirements.| |
| [Get started administering GitLab](../administration/get_started.md) | Configure your organization and its authentication, then secure, monitor, and back up GitLab. | |
-| [Secure your instance](https://about.gitlab.com/blog/2020/05/20/gitlab-instance-security-best-practices/) | Implement security features for your instance. | |
## Integrate with GitLab
-GitLab [integrates](../integration/index.md) with a number of third-party services,
+GitLab [integrates](../user/project/integrations/index.md) with a number of third-party services,
enabling you to work with those services directly from GitLab.
| Topic | Description | Good for beginners |
diff --git a/doc/tutorials/move_personal_project_to_a_group.md b/doc/tutorials/move_personal_project_to_a_group.md
index c50d94c3b17..1431dc48d99 100644
--- a/doc/tutorials/move_personal_project_to_a_group.md
+++ b/doc/tutorials/move_personal_project_to_a_group.md
@@ -4,35 +4,29 @@ group: Tutorials
info: For assistance with this tutorial, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments-to-other-projects-and-subjects.
---
-# Move your personal project to a group **(FREE SAAS)**
+# Tutorial: Move your personal project to a group **(FREE SAAS)**
-This tutorial will show you how to move a personal project to a group.
+If you created a project under a [personal namespace](../user/namespace/index.md),
+you can perform common tasks, like managing issue and merge requests,
+and using source control and CI/CD.
-## Why is a group important?
+However, at some point you might outgrow your personal project and
+want to move your project to a group namespace instead. With a group namespace, you can:
-In GitLab, you use [groups](../user/group/index.md)
-to manage one or more related projects at the same time.
-A group gives you some great benefits. For example, you can:
-
-- Manage permissions for your projects.
-- View all of the issues and merge requests for the projects in the group.
-- View all unique users in your namespace, across all projects.
+- Give a group of users access to your project, rather than adding users one-by-one.
+- View all issues and merge requests for all projects in the group.
+- View all unique users in the group namespace, across all projects.
- Manage usage quotas.
-- Start a trial or upgrade to a paid tier. This option is important if you're
+- Start a trial or upgrade to a paid subscription tier. This option is important if you're
impacted by the [changes to user limits](https://about.gitlab.com/blog/2022/03/24/efficient-free-tier/),
and need more users.
-However, if you're working in a [personal project](../user/project/working_with_projects.md#view-personal-projects),
-you can't use these features. Personal projects are created under your
-[personal namespace](../user/namespace/index.md). They're not part of a group,
-so you can't get any of the benefits and features of a group.
-
-But don't worry! You can move your existing personal project to a group.
-The next steps show you how.
+This tutorial shows you how to move your project from a personal namespace
+to a group namespace.
## Steps
-Here's an overview of what we're going to do:
+Here's an overview of the steps:
1. [Create a group](#create-a-group).
1. [Move your project to a group](#move-your-project-to-a-group).
diff --git a/doc/user/namespace/index.md b/doc/user/namespace/index.md
index 260eb7ea421..7d26600cc38 100644
--- a/doc/user/namespace/index.md
+++ b/doc/user/namespace/index.md
@@ -13,18 +13,18 @@ which means you can use the same name for projects in different namespaces.
GitLab has two types of namespaces:
-- A *Personal* namespace, which is based on your username and provided to you when you create your account.
- - If you change your username, the project and namespace URLs in your account also change. Before you change your username,
- read about [repository redirects](../project/repository/index.md#what-happens-when-a-repository-path-changes).
+- A *personal* namespace, which is based on your username and provided to you when you create your account.
- You cannot create subgroups in a personal namespace.
- Groups in your namespace do not inherit your namespace permissions and group features.
- - All the *Personal Projects* created fall under the scope of this namespace.
+ - All the projects you create are under the scope of this namespace.
+ - If you change your username, the project and namespace URLs in your account also change. Before you change your username,
+ read about [repository redirects](../project/repository/index.md#what-happens-when-a-repository-path-changes).
-- A *group* or *subgroup* namespace:
+- A *group* or *subgroup* namespace, which is based on the group or subgroup name:
- You can create multiple subgroups to manage multiple projects.
- - You can change the URL of group and subgroup namespaces.
- You can configure settings specifically for each subgroup and project in the namespace.
- When you create a subgroup, it inherits some of the parent group settings. You can view these in the subgroup **Settings**.
+ - You can change the URL of group and subgroup namespaces.
## Determine which type of namespace you're viewing
diff --git a/lib/gitlab/database/gitlab_schemas.yml b/lib/gitlab/database/gitlab_schemas.yml
index 9b47214146a..96588c20bbf 100644
--- a/lib/gitlab/database/gitlab_schemas.yml
+++ b/lib/gitlab/database/gitlab_schemas.yml
@@ -601,6 +601,7 @@ web_hooks: :gitlab_main
wiki_page_meta: :gitlab_main
wiki_page_slugs: :gitlab_main
work_item_parent_links: :gitlab_main
+work_item_progresses: :gitlab_main
work_item_types: :gitlab_main
work_item_hierarchy_restrictions: :gitlab_main
x509_certificates: :gitlab_main
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index a879bb8b976..2cf744a96f0 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -37103,6 +37103,9 @@ msgstr ""
msgid "SecurityReports|All images"
msgstr ""
+msgid "SecurityReports|All projects"
+msgstr ""
+
msgid "SecurityReports|All severities"
msgstr ""
diff --git a/qa/qa/resource/runner.rb b/qa/qa/resource/runner.rb
index 77a7e06bb20..d755c73e790 100644
--- a/qa/qa/resource/runner.rb
+++ b/qa/qa/resource/runner.rb
@@ -69,14 +69,14 @@ module QA
def api_post_body; end
def not_found_by_tags?
- url = "#{api_get_path}?tag_list=#{@tags.compact.join(',')}"
+ url = "#{api_get_path}?tag_list=#{tags.compact.join(',')}"
auto_paginated_response(request_url(url)).empty?
end
def runners_list
runners_list = nil
url = tags ? "#{api_get_path}?tag_list=#{tags.compact.join(',')}" : api_get_path
- QA::Runtime::Logger.info('Looking for list of runners via API...')
+ Runtime::Logger.info('Looking for list of runners via API...')
Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1) do
runners_list = auto_paginated_response(request_url(url))
runners_list.present?
@@ -85,11 +85,24 @@ module QA
runners_list
end
+ def wait_until_online
+ Runtime::Logger.info('Waiting for runner to come online...')
+ Support::Retrier.retry_until(max_duration: 60, sleep_interval: 1) do
+ this_runner[:status] == 'online'
+ end
+ end
+
+ def restart
+ Runtime::Logger.info("Restarting runner container #{name}...")
+ @docker_container.restart
+ wait_until_online
+ end
+
private
def start_container_and_register
@docker_container = Service::DockerRun::GitlabRunner.new(name).tap do |runner|
- QA::Support::Retrier.retry_on_exception(sleep_interval: 5) do
+ Support::Retrier.retry_on_exception(sleep_interval: 5) do
runner.pull
end
diff --git a/qa/qa/service/docker_run/base.rb b/qa/qa/service/docker_run/base.rb
index c91f68d31a0..65ebe09eeea 100644
--- a/qa/qa/service/docker_run/base.rb
+++ b/qa/qa/service/docker_run/base.rb
@@ -77,6 +77,12 @@ module QA
def read_file(file_path)
`docker exec #{@name} /bin/cat #{file_path}`
end
+
+ def restart
+ return "Container #{@name} is not running, cannot restart." unless running?
+
+ shell "docker restart #{@name}"
+ end
end
end
end
diff --git a/qa/qa/service/docker_run/gitlab_runner.rb b/qa/qa/service/docker_run/gitlab_runner.rb
index 45ab4ceff99..7a62951a2f6 100644
--- a/qa/qa/service/docker_run/gitlab_runner.rb
+++ b/qa/qa/service/docker_run/gitlab_runner.rb
@@ -56,6 +56,12 @@ module QA
@run_untagged = false
end
+ def restart
+ super
+
+ wait_until_shell_command_matches("docker logs #{@name}", /Configuration loaded/)
+ end
+
private
def register_command
diff --git a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb
index b1ecce297c9..d30d5b43568 100644
--- a/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb
+++ b/qa/qa/specs/features/browser_ui/4_verify/pipeline/pipeline_with_image_pull_policy_spec.rb
@@ -33,10 +33,7 @@ module QA
runner.remove_via_api!
end
- context(
- 'when policy is allowed',
- quarantine: { type: :flaky, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/369397' }
- ) do
+ context 'when policy is allowed' do
let(:allowed_policies) { %w[if-not-present always never] }
where do
@@ -87,20 +84,19 @@ module QA
let(:allowed_policies) { %w[never] }
let(:pull_policies) { %w[always] }
- let(:message) do
- 'ERROR: Preparation failed: the configured PullPolicies ([always])'\
- ' are not allowed by AllowedPullPolicies ([never])'
- end
+ # The sentence seems differ from time to time,
+ # only checking portions of the sentence that matter
+ let(:text1) { 'pull_policy ([always])' }
+ let(:text2) { 'is not one of the allowed_pull_policies ([never])' }
it(
'fails job with policy not allowed message',
- testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/368853',
- quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/371420', type: :stale }
+ testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/368853'
) do
visit_job
- expect(job_log).to have_content(message),
- "Expected to find #{message} in #{job_log}, but didn't."
+ expect(job_log).to include(text1, text2),
+ "Expected to find contents #{text1} and #{text2} in #{job_log}, but didn't."
end
end
@@ -123,8 +119,7 @@ module QA
tempdir.close!
- # Give runner some time to pick up new configuration
- sleep(30)
+ runner.restart
end
def add_ci_file
@@ -154,7 +149,7 @@ module QA
def visit_job
Page::Project::Pipeline::Show.perform do |show|
- Support::Waiter.wait_until { show.completed? }
+ Support::Waiter.wait_until(max_duration: 90) { show.completed? }
show.click_job(job_name)
end
diff --git a/spec/features/projects/activity/rss_spec.rb b/spec/features/projects/activity/rss_spec.rb
index a3e511b5c22..5297f30220d 100644
--- a/spec/features/projects/activity/rss_spec.rb
+++ b/spec/features/projects/activity/rss_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Project Activity RSS' do
+RSpec.describe 'Project Activity RSS', feature_category: :projects do
let(:project) { create(:project, :public) }
let(:user) { project.first_owner }
let(:path) { activity_project_path(project) }
diff --git a/spec/features/projects/activity/user_sees_activity_spec.rb b/spec/features/projects/activity/user_sees_activity_spec.rb
index a9cdbd5c342..cfa62415c49 100644
--- a/spec/features/projects/activity/user_sees_activity_spec.rb
+++ b/spec/features/projects/activity/user_sees_activity_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Projects > Activity > User sees activity' do
+RSpec.describe 'Projects > Activity > User sees activity', feature_category: :projects do
let(:project) { create(:project, :repository, :public) }
let(:user) { project.creator }
let(:issue) { create(:issue, project: project) }
diff --git a/spec/features/projects/activity/user_sees_design_activity_spec.rb b/spec/features/projects/activity/user_sees_design_activity_spec.rb
index 70153921b82..6a51e548700 100644
--- a/spec/features/projects/activity/user_sees_design_activity_spec.rb
+++ b/spec/features/projects/activity/user_sees_design_activity_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Projects > Activity > User sees design Activity', :js do
+RSpec.describe 'Projects > Activity > User sees design Activity', :js, feature_category: :design_management do
include DesignManagementTestHelpers
let_it_be(:uploader) { create(:user) }
diff --git a/spec/features/projects/activity/user_sees_design_comment_spec.rb b/spec/features/projects/activity/user_sees_design_comment_spec.rb
index 3a8e2790858..2d333e55b13 100644
--- a/spec/features/projects/activity/user_sees_design_comment_spec.rb
+++ b/spec/features/projects/activity/user_sees_design_comment_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Projects > Activity > User sees design comment', :js do
+RSpec.describe 'Projects > Activity > User sees design comment', :js, feature_category: :design_management do
include DesignManagementTestHelpers
let_it_be(:project) { create(:project, :repository, :public) }
diff --git a/spec/features/projects/activity/user_sees_private_activity_spec.rb b/spec/features/projects/activity/user_sees_private_activity_spec.rb
index 86692bc6b4c..e0aaf1dbbc3 100644
--- a/spec/features/projects/activity/user_sees_private_activity_spec.rb
+++ b/spec/features/projects/activity/user_sees_private_activity_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Project > Activity > User sees private activity', :js do
+RSpec.describe 'Project > Activity > User sees private activity', :js, feature_category: :projects do
let(:project) { create(:project, :public) }
let(:author) { create(:user) }
let(:user) { create(:user) }
diff --git a/spec/features/projects/artifacts/file_spec.rb b/spec/features/projects/artifacts/file_spec.rb
index f97c1b0e543..fe38cbc70f1 100644
--- a/spec/features/projects/artifacts/file_spec.rb
+++ b/spec/features/projects/artifacts/file_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Artifact file', :js do
+RSpec.describe 'Artifact file', :js, feature_category: :build_artifacts do
let(:project) { create(:project, :public) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:build) { create(:ci_build, :artifacts, pipeline: pipeline) }
diff --git a/spec/features/projects/artifacts/raw_spec.rb b/spec/features/projects/artifacts/raw_spec.rb
index c10cb56a44b..544875d36e3 100644
--- a/spec/features/projects/artifacts/raw_spec.rb
+++ b/spec/features/projects/artifacts/raw_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Raw artifact' do
+RSpec.describe 'Raw artifact', feature_category: :build_artifacts do
let(:project) { create(:project, :public) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) }
diff --git a/spec/features/projects/artifacts/user_browses_artifacts_spec.rb b/spec/features/projects/artifacts/user_browses_artifacts_spec.rb
index c0d710fe186..6948a26196b 100644
--- a/spec/features/projects/artifacts/user_browses_artifacts_spec.rb
+++ b/spec/features/projects/artifacts/user_browses_artifacts_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User browses artifacts" do
+RSpec.describe "User browses artifacts", feature_category: :build_artifacts do
let(:project) { create(:project, :public) }
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) }
diff --git a/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb b/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb
index 7d6ae03e08e..48dcb95e09b 100644
--- a/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb
+++ b/spec/features/projects/artifacts/user_downloads_artifacts_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User downloads artifacts" do
+RSpec.describe "User downloads artifacts", feature_category: :build_artifacts do
let_it_be(:project) { create(:project, :repository, :public) }
let_it_be(:pipeline) { create(:ci_empty_pipeline, status: :success, sha: project.commit.id, project: project) }
let_it_be(:job) { create(:ci_build, :artifacts, :success, pipeline: pipeline) }
diff --git a/spec/features/projects/badges/coverage_spec.rb b/spec/features/projects/badges/coverage_spec.rb
index 7555e567c37..3c8b17607ca 100644
--- a/spec/features/projects/badges/coverage_spec.rb
+++ b/spec/features/projects/badges/coverage_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'test coverage badge' do
+RSpec.describe 'test coverage badge', feature_category: :code_testing do
let!(:user) { create(:user) }
let!(:project) { create(:project, :private) }
diff --git a/spec/features/projects/badges/list_spec.rb b/spec/features/projects/badges/list_spec.rb
index d1e635f11c0..e6bd4b22b0a 100644
--- a/spec/features/projects/badges/list_spec.rb
+++ b/spec/features/projects/badges/list_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'list of badges' do
+RSpec.describe 'list of badges', feature_category: :continuous_integration do
before do
user = create(:user)
project = create(:project, :repository)
diff --git a/spec/features/projects/badges/pipeline_badge_spec.rb b/spec/features/projects/badges/pipeline_badge_spec.rb
index e3a01ab6fa2..c0f5d0ffead 100644
--- a/spec/features/projects/badges/pipeline_badge_spec.rb
+++ b/spec/features/projects/badges/pipeline_badge_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Pipeline Badge' do
+RSpec.describe 'Pipeline Badge', feature_category: :continuous_integration do
let_it_be(:project) { create(:project, :repository, :public) }
let(:ref) { project.default_branch }
diff --git a/spec/features/projects/blobs/blame_spec.rb b/spec/features/projects/blobs/blame_spec.rb
index 5287d5e4f7d..27b7c6ef2d5 100644
--- a/spec/features/projects/blobs/blame_spec.rb
+++ b/spec/features/projects/blobs/blame_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'File blame', :js do
+RSpec.describe 'File blame', :js, feature_category: :projects do
include TreeHelper
let_it_be(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb
index 9b0edcd09d2..48ee39dad19 100644
--- a/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb
+++ b/spec/features/projects/blobs/blob_line_permalink_updater_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Blob button line permalinks (BlobLinePermalinkUpdater)', :js do
+RSpec.describe 'Blob button line permalinks (BlobLinePermalinkUpdater)', :js, feature_category: :projects do
include TreeHelper
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/projects/blobs/blob_show_spec.rb b/spec/features/projects/blobs/blob_show_spec.rb
index 03680f681ba..cbac5cdac39 100644
--- a/spec/features/projects/blobs/blob_show_spec.rb
+++ b/spec/features/projects/blobs/blob_show_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'File blob', :js do
+RSpec.describe 'File blob', :js, feature_category: :projects do
include MobileHelpers
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb
index 5587b8abab3..9ef7f6f6e85 100644
--- a/spec/features/projects/blobs/edit_spec.rb
+++ b/spec/features/projects/blobs/edit_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Editing file blob', :js do
+RSpec.describe 'Editing file blob', :js, feature_category: :projects do
include Spec::Support::Helpers::Features::SourceEditorSpecHelpers
include TreeHelper
include BlobSpecHelpers
diff --git a/spec/features/projects/blobs/shortcuts_blob_spec.rb b/spec/features/projects/blobs/shortcuts_blob_spec.rb
index 64d643aa102..03276a737da 100644
--- a/spec/features/projects/blobs/shortcuts_blob_spec.rb
+++ b/spec/features/projects/blobs/shortcuts_blob_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Blob shortcuts', :js do
+RSpec.describe 'Blob shortcuts', :js, feature_category: :projects do
include TreeHelper
let(:project) { create(:project, :public, :repository) }
let(:path) { project.repository.ls_files(project.repository.root_ref)[0] }
diff --git a/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb b/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb
index a2db5e11c7c..a497be4cbc3 100644
--- a/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb
+++ b/spec/features/projects/blobs/user_follows_pipeline_suggest_nudge_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User follows pipeline suggest nudge spec when feature is enabled', :js do
+RSpec.describe 'User follows pipeline suggest nudge spec when feature is enabled', :js, feature_category: :projects do
include CookieHelper
let(:project) { create(:project, :empty_repo) }
diff --git a/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb b/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb
index 15e7a495e60..2f67e909543 100644
--- a/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb
+++ b/spec/features/projects/blobs/user_views_pipeline_editor_button_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User views pipeline editor button on root ci config file', :js do
+RSpec.describe 'User views pipeline editor button on root ci config file', :js, feature_category: :projects do
include BlobSpecHelpers
let_it_be(:user) { create(:user) }
diff --git a/spec/features/projects/branches/download_buttons_spec.rb b/spec/features/projects/branches/download_buttons_spec.rb
index 569a93a55fc..80ccd9c1417 100644
--- a/spec/features/projects/branches/download_buttons_spec.rb
+++ b/spec/features/projects/branches/download_buttons_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Download buttons in branches page' do
+RSpec.describe 'Download buttons in branches page', feature_category: :projects do
let(:user) { create(:user) }
let(:role) { :developer }
let(:status) { 'success' }
diff --git a/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb b/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb
index 5f58e446ed9..fb68195362a 100644
--- a/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb
+++ b/spec/features/projects/branches/new_branch_ref_dropdown_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'New Branch Ref Dropdown', :js do
+RSpec.describe 'New Branch Ref Dropdown', :js, feature_category: :projects do
let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) }
let(:toggle) { find('.create-from .dropdown-menu-toggle') }
diff --git a/spec/features/projects/branches/user_creates_branch_spec.rb b/spec/features/projects/branches/user_creates_branch_spec.rb
index be236b7ca7e..bf7669e9d0c 100644
--- a/spec/features/projects/branches/user_creates_branch_spec.rb
+++ b/spec/features/projects/branches/user_creates_branch_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User creates branch', :js do
+RSpec.describe 'User creates branch', :js, feature_category: :projects do
include Spec::Support::Helpers::Features::BranchesHelpers
let_it_be(:group) { create(:group, :public) }
diff --git a/spec/features/projects/branches/user_deletes_branch_spec.rb b/spec/features/projects/branches/user_deletes_branch_spec.rb
index a89fed3a78a..92b5f176d2d 100644
--- a/spec/features/projects/branches/user_deletes_branch_spec.rb
+++ b/spec/features/projects/branches/user_deletes_branch_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User deletes branch", :js do
+RSpec.describe "User deletes branch", :js, feature_category: :projects do
include Spec::Support::Helpers::ModalHelpers
let_it_be(:user) { create(:user) }
diff --git a/spec/features/projects/branches/user_views_branches_spec.rb b/spec/features/projects/branches/user_views_branches_spec.rb
index 3f0614532f1..f0a1ba84ec6 100644
--- a/spec/features/projects/branches/user_views_branches_spec.rb
+++ b/spec/features/projects/branches/user_views_branches_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User views branches", :js do
+RSpec.describe "User views branches", :js, feature_category: :projects do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.first_owner }
diff --git a/spec/features/projects/ci/editor_spec.rb b/spec/features/projects/ci/editor_spec.rb
index c96d5f5823f..536152626af 100644
--- a/spec/features/projects/ci/editor_spec.rb
+++ b/spec/features/projects/ci/editor_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Pipeline Editor', :js do
+RSpec.describe 'Pipeline Editor', :js, feature_category: :pipeline_authoring do
include Spec::Support::Helpers::Features::SourceEditorSpecHelpers
let(:project) { create(:project_empty_repo, :public) }
diff --git a/spec/features/projects/ci/lint_spec.rb b/spec/features/projects/ci/lint_spec.rb
index 8d5f62d8a06..4fea07b18bc 100644
--- a/spec/features/projects/ci/lint_spec.rb
+++ b/spec/features/projects/ci/lint_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'CI Lint', :js do
+RSpec.describe 'CI Lint', :js, feature_category: :pipeline_authoring do
include Spec::Support::Helpers::Features::SourceEditorSpecHelpers
let_it_be(:project) { create(:project, :repository) }
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb
index 5c54b7fda7c..114182982e2 100644
--- a/spec/features/projects/clusters/gcp_spec.rb
+++ b/spec/features/projects/clusters/gcp_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Gcp Cluster', :js do
+RSpec.describe 'Gcp Cluster', :js, feature_category: :kubernetes_management do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb
index 527d038f975..34fc0a76c7f 100644
--- a/spec/features/projects/clusters/user_spec.rb
+++ b/spec/features/projects/clusters/user_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User Cluster', :js do
+RSpec.describe 'User Cluster', :js, feature_category: :kubernetes_management do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
diff --git a/spec/features/projects/commit/builds_spec.rb b/spec/features/projects/commit/builds_spec.rb
index 7b10f72006f..dfd58a99953 100644
--- a/spec/features/projects/commit/builds_spec.rb
+++ b/spec/features/projects/commit/builds_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'project commit pipelines', :js do
+RSpec.describe 'project commit pipelines', :js, feature_category: :continuous_integration do
let(:project) { create(:project, :repository) }
before do
diff --git a/spec/features/projects/commit/cherry_pick_spec.rb b/spec/features/projects/commit/cherry_pick_spec.rb
index fce9fa4fb62..dc8b84283a1 100644
--- a/spec/features/projects/commit/cherry_pick_spec.rb
+++ b/spec/features/projects/commit/cherry_pick_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Cherry-pick Commits', :js do
+RSpec.describe 'Cherry-pick Commits', :js, feature_category: :source_code_management do
let_it_be(:user) { create(:user) }
let_it_be(:sha) { '7d3b0f7cff5f37573aea97cebfd5692ea1689924' }
diff --git a/spec/features/projects/commit/comments/user_adds_comment_spec.rb b/spec/features/projects/commit/comments/user_adds_comment_spec.rb
index a470215186b..c53ac27bb5f 100644
--- a/spec/features/projects/commit/comments/user_adds_comment_spec.rb
+++ b/spec/features/projects/commit/comments/user_adds_comment_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User adds a comment on a commit", :js do
+RSpec.describe "User adds a comment on a commit", :js, feature_category: :source_code_management do
include Spec::Support::Helpers::Features::NotesHelpers
include RepoHelpers
diff --git a/spec/features/projects/commit/comments/user_deletes_comments_spec.rb b/spec/features/projects/commit/comments/user_deletes_comments_spec.rb
index 9059f9e4857..a1e7ddb4d6e 100644
--- a/spec/features/projects/commit/comments/user_deletes_comments_spec.rb
+++ b/spec/features/projects/commit/comments/user_deletes_comments_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User deletes comments on a commit", :js do
+RSpec.describe "User deletes comments on a commit", :js, feature_category: :source_code_management do
include Spec::Support::Helpers::Features::NotesHelpers
include Spec::Support::Helpers::ModalHelpers
include RepoHelpers
diff --git a/spec/features/projects/commit/comments/user_edits_comments_spec.rb b/spec/features/projects/commit/comments/user_edits_comments_spec.rb
index 8ac15c9cb7f..9019a981a18 100644
--- a/spec/features/projects/commit/comments/user_edits_comments_spec.rb
+++ b/spec/features/projects/commit/comments/user_edits_comments_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User edits a comment on a commit", :js do
+RSpec.describe "User edits a comment on a commit", :js, feature_category: :source_code_management do
include Spec::Support::Helpers::Features::NotesHelpers
include RepoHelpers
diff --git a/spec/features/projects/commit/diff_notes_spec.rb b/spec/features/projects/commit/diff_notes_spec.rb
index 6cebff1cc9a..f29e0803f61 100644
--- a/spec/features/projects/commit/diff_notes_spec.rb
+++ b/spec/features/projects/commit/diff_notes_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Commit diff', :js do
+RSpec.describe 'Commit diff', :js, feature_category: :source_code_management do
include RepoHelpers
let(:user) { create(:user) }
diff --git a/spec/features/projects/commit/mini_pipeline_graph_spec.rb b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
index 417e14e2376..3611efd1477 100644
--- a/spec/features/projects/commit/mini_pipeline_graph_spec.rb
+++ b/spec/features/projects/commit/mini_pipeline_graph_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Mini Pipeline Graph in Commit View', :js do
+RSpec.describe 'Mini Pipeline Graph in Commit View', :js, feature_category: :source_code_management do
let(:project) { create(:project, :public, :repository) }
context 'when commit has pipelines' do
diff --git a/spec/features/projects/commit/user_comments_on_commit_spec.rb b/spec/features/projects/commit/user_comments_on_commit_spec.rb
index a7f23f093a3..66a407b5ff6 100644
--- a/spec/features/projects/commit/user_comments_on_commit_spec.rb
+++ b/spec/features/projects/commit/user_comments_on_commit_spec.rb
@@ -2,7 +2,7 @@
require "spec_helper"
-RSpec.describe "User comments on commit", :js do
+RSpec.describe "User comments on commit", :js, feature_category: :source_code_management do
include Spec::Support::Helpers::Features::NotesHelpers
include Spec::Support::Helpers::ModalHelpers
include RepoHelpers
diff --git a/spec/features/projects/commit/user_reverts_commit_spec.rb b/spec/features/projects/commit/user_reverts_commit_spec.rb
index 1c6cf5eb258..8c7b8e6ba32 100644
--- a/spec/features/projects/commit/user_reverts_commit_spec.rb
+++ b/spec/features/projects/commit/user_reverts_commit_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User reverts a commit', :js do
+RSpec.describe 'User reverts a commit', :js, feature_category: :source_code_management do
include RepoHelpers
let_it_be(:user) { create(:user) }
diff --git a/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb b/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb
index cc3c70e66ce..5670ed17eba 100644
--- a/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb
+++ b/spec/features/projects/commit/user_views_user_status_on_commit_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Project > Commit > View user status' do
+RSpec.describe 'Project > Commit > View user status', feature_category: :source_code_management do
include RepoHelpers
let_it_be(:project) { create(:project, :repository) }
diff --git a/spec/features/projects/commits/multi_view_diff_spec.rb b/spec/features/projects/commits/multi_view_diff_spec.rb
index c0e48b7b86c..b178a1c2171 100644
--- a/spec/features/projects/commits/multi_view_diff_spec.rb
+++ b/spec/features/projects/commits/multi_view_diff_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.shared_examples "no multiple viewers" do |commit_ref|
+RSpec.shared_examples "no multiple viewers", feature_category: :source_code_management do |commit_ref|
let(:ref) { commit_ref }
it "does not display multiple diff viewers" do
diff --git a/spec/features/projects/commits/rss_spec.rb b/spec/features/projects/commits/rss_spec.rb
index b521bb865ae..49da0727fbd 100644
--- a/spec/features/projects/commits/rss_spec.rb
+++ b/spec/features/projects/commits/rss_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Project Commits RSS' do
+RSpec.describe 'Project Commits RSS', feature_category: :source_code_management do
let(:user) { create(:user) }
let(:project) { create(:project, :repository, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:path) { project_commits_path(project, :master) }
diff --git a/spec/features/projects/commits/user_browses_commits_spec.rb b/spec/features/projects/commits/user_browses_commits_spec.rb
index 2719316c5dc..d3437b4af18 100644
--- a/spec/features/projects/commits/user_browses_commits_spec.rb
+++ b/spec/features/projects/commits/user_browses_commits_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User browses commits' do
+RSpec.describe 'User browses commits', feature_category: :source_code_management do
include RepoHelpers
let(:user) { create(:user) }
diff --git a/spec/features/projects/confluence/user_views_confluence_page_spec.rb b/spec/features/projects/confluence/user_views_confluence_page_spec.rb
index 49e7839f16c..c1ce6ea4536 100644
--- a/spec/features/projects/confluence/user_views_confluence_page_spec.rb
+++ b/spec/features/projects/confluence/user_views_confluence_page_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User views the Confluence page' do
+RSpec.describe 'User views the Confluence page', feature_category: :integrations do
let_it_be(:user) { create(:user) }
let(:project) { create(:project, :public) }