Add latest changes from gitlab-org/gitlab@master
|  | @ -27,6 +27,10 @@ export default () => { | |||
| 
 | ||||
|     if (pipelineTableViewEl.dataset.disableInitialization === undefined) { | ||||
|       const table = new Vue({ | ||||
|         provide: { | ||||
|           artifactsEndpoint: pipelineTableViewEl.dataset.artifactsEndpoint, | ||||
|           artifactsEndpointPlaceholder: pipelineTableViewEl.dataset.artifactsEndpointPlaceholder, | ||||
|         }, | ||||
|         render(createElement) { | ||||
|           return createElement(CommitPipelinesTable, { | ||||
|             props: { | ||||
|  |  | |||
|  | @ -355,6 +355,8 @@ export default class MergeRequestTabs { | |||
| 
 | ||||
|     this.commitPipelinesTable = new Vue({ | ||||
|       provide: { | ||||
|         artifactsEndpoint: pipelineTableViewEl.dataset.artifactsEndpoint, | ||||
|         artifactsEndpointPlaceholder: pipelineTableViewEl.dataset.artifactsEndpointPlaceholder, | ||||
|         targetProjectFullPath: mrWidgetData?.target_project_full_path || '', | ||||
|       }, | ||||
|       render(createElement) { | ||||
|  |  | |||
|  | @ -0,0 +1,24 @@ | |||
| query securityReportDownloadPaths( | ||||
|   $projectPath: ID! | ||||
|   $iid: String! | ||||
|   $reportTypes: [SecurityReportTypeEnum!] | ||||
| ) { | ||||
|   project(fullPath: $projectPath) { | ||||
|     mergeRequest(iid: $iid) { | ||||
|       headPipeline { | ||||
|         id | ||||
|         jobs(securityReportTypes: $reportTypes) { | ||||
|           nodes { | ||||
|             name | ||||
|             artifacts { | ||||
|               nodes { | ||||
|                 downloadPath | ||||
|                 fileType | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | @ -0,0 +1,18 @@ | |||
| query getCorpuses($projectPath: ID!, $iid: ID, $reportTypes: [SecurityReportTypeEnum!]) { | ||||
|   project(fullPath: $projectPath) { | ||||
|     pipeline(iid: $iid) { | ||||
|       id | ||||
|       jobs(securityReportTypes: $reportTypes) { | ||||
|         nodes { | ||||
|           name | ||||
|           artifacts { | ||||
|             nodes { | ||||
|               downloadPath | ||||
|               fileType | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | @ -16,7 +16,7 @@ import { | |||
| import securityReportDownloadPathsQuery from './queries/security_report_download_paths.query.graphql'; | ||||
| import store from './store'; | ||||
| import { MODULE_SAST, MODULE_SECRET_DETECTION } from './store/constants'; | ||||
| import { extractSecurityReportArtifacts } from './utils'; | ||||
| import { extractSecurityReportArtifactsFromMergeRequest } from './utils'; | ||||
| 
 | ||||
| export default { | ||||
|   store, | ||||
|  | @ -97,7 +97,7 @@ export default { | |||
|         }; | ||||
|       }, | ||||
|       update(data) { | ||||
|         return extractSecurityReportArtifacts(this.$options.reportTypes, data); | ||||
|         return extractSecurityReportArtifactsFromMergeRequest(this.$options.reportTypes, data); | ||||
|       }, | ||||
|       error(error) { | ||||
|         this.showError(error); | ||||
|  |  | |||
|  | @ -14,9 +14,7 @@ const addReportTypeIfExists = (acc, reportTypes, reportType, getName, downloadPa | |||
|   } | ||||
| }; | ||||
| 
 | ||||
| export const extractSecurityReportArtifacts = (reportTypes, data) => { | ||||
|   const jobs = data.project?.mergeRequest?.headPipeline?.jobs?.nodes ?? []; | ||||
| 
 | ||||
| const extractSecurityReportArtifacts = (reportTypes, jobs) => { | ||||
|   return jobs.reduce((acc, job) => { | ||||
|     const artifacts = job.artifacts?.nodes ?? []; | ||||
| 
 | ||||
|  | @ -41,3 +39,13 @@ export const extractSecurityReportArtifacts = (reportTypes, data) => { | |||
|     return acc; | ||||
|   }, []); | ||||
| }; | ||||
| 
 | ||||
| export const extractSecurityReportArtifactsFromPipeline = (reportTypes, data) => { | ||||
|   const jobs = data.project?.pipeline?.jobs?.nodes ?? []; | ||||
|   return extractSecurityReportArtifacts(reportTypes, jobs); | ||||
| }; | ||||
| 
 | ||||
| export const extractSecurityReportArtifactsFromMergeRequest = (reportTypes, data) => { | ||||
|   const jobs = data.project?.mergeRequest?.headPipeline?.jobs?.nodes ?? []; | ||||
|   return extractSecurityReportArtifacts(reportTypes, jobs); | ||||
| }; | ||||
|  |  | |||
|  | @ -3,6 +3,11 @@ | |||
| module Ci | ||||
|   class RunnerNamespace < ApplicationRecord | ||||
|     extend Gitlab::Ci::Model | ||||
|     include Limitable | ||||
| 
 | ||||
|     self.limit_name = 'ci_registered_group_runners' | ||||
|     self.limit_scope = :group | ||||
|     self.limit_feature_flag = :ci_runner_limits | ||||
| 
 | ||||
|     belongs_to :runner, inverse_of: :runner_namespaces | ||||
|     belongs_to :namespace, inverse_of: :runner_namespaces, class_name: '::Namespace' | ||||
|  |  | |||
|  | @ -3,6 +3,11 @@ | |||
| module Ci | ||||
|   class RunnerProject < ApplicationRecord | ||||
|     extend Gitlab::Ci::Model | ||||
|     include Limitable | ||||
| 
 | ||||
|     self.limit_name = 'ci_registered_project_runners' | ||||
|     self.limit_scope = :project | ||||
|     self.limit_feature_flag = :ci_runner_limits | ||||
| 
 | ||||
|     belongs_to :runner, inverse_of: :runner_projects | ||||
|     belongs_to :project, inverse_of: :runner_projects | ||||
|  |  | |||
|  | @ -7,6 +7,7 @@ module Limitable | |||
|   included do | ||||
|     class_attribute :limit_scope | ||||
|     class_attribute :limit_name | ||||
|     class_attribute :limit_feature_flag | ||||
|     self.limit_name = self.name.demodulize.tableize | ||||
| 
 | ||||
|     validate :validate_plan_limit_not_exceeded, on: :create | ||||
|  | @ -25,6 +26,7 @@ module Limitable | |||
|   def validate_scoped_plan_limit_not_exceeded | ||||
|     scope_relation = self.public_send(limit_scope) # rubocop:disable GitlabSecurity/PublicSend | ||||
|     return unless scope_relation | ||||
|     return if limit_feature_flag && ::Feature.disabled?(limit_feature_flag, scope_relation, default_enabled: :yaml) | ||||
| 
 | ||||
|     relation = self.class.where(limit_scope => scope_relation) | ||||
|     limits = scope_relation.actual_limits | ||||
|  |  | |||
|  | @ -13,7 +13,7 @@ class MembersPreloader | |||
|     ActiveRecord::Associations::Preloader.new.preload(members, :created_by) | ||||
|     ActiveRecord::Associations::Preloader.new.preload(members, user: :status) | ||||
|     ActiveRecord::Associations::Preloader.new.preload(members, user: :u2f_registrations) | ||||
|     ActiveRecord::Associations::Preloader.new.preload(members, user: :webauthn_registrations) | ||||
|     ActiveRecord::Associations::Preloader.new.preload(members, user: :webauthn_registrations) if Feature.enabled?(:webauthn) | ||||
|   end | ||||
| end | ||||
| 
 | ||||
|  |  | |||
|  | @ -0,0 +1,74 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module Import | ||||
|   module GitlabProjects | ||||
|     class CreateProjectFromRemoteFileService < CreateProjectFromUploadedFileService | ||||
|       FILE_SIZE_LIMIT = 10.gigabytes | ||||
|       ALLOWED_CONTENT_TYPES = ['application/gzip'].freeze | ||||
| 
 | ||||
|       validate :valid_remote_import_url? | ||||
|       validate :validate_file_size | ||||
|       validate :validate_content_type | ||||
| 
 | ||||
|       private | ||||
| 
 | ||||
|       def required_params | ||||
|         [:path, :namespace, :remote_import_url] | ||||
|       end | ||||
| 
 | ||||
|       def project_params | ||||
|         super | ||||
|           .except(:file) | ||||
|           .merge(import_export_upload: ::ImportExportUpload.new( | ||||
|             remote_import_url: params[:remote_import_url] | ||||
|           )) | ||||
|       end | ||||
| 
 | ||||
|       def valid_remote_import_url? | ||||
|         ::Gitlab::UrlBlocker.validate!( | ||||
|           params[:remote_import_url], | ||||
|           allow_localhost: allow_local_requests?, | ||||
|           allow_local_network: allow_local_requests?, | ||||
|           schemes: %w(http https) | ||||
|         ) | ||||
| 
 | ||||
|         true | ||||
|       rescue ::Gitlab::UrlBlocker::BlockedUrlError => e | ||||
|         errors.add(:base, e.message) | ||||
| 
 | ||||
|         false | ||||
|       end | ||||
| 
 | ||||
|       def allow_local_requests? | ||||
|         ::Gitlab::CurrentSettings.allow_local_requests_from_web_hooks_and_services? | ||||
|       end | ||||
| 
 | ||||
|       def validate_content_type | ||||
|         if headers['content-type'].blank? | ||||
|           errors.add(:base, "Missing 'ContentType' header") | ||||
|         elsif !ALLOWED_CONTENT_TYPES.include?(headers['content-type']) | ||||
|           errors.add(:base, "Remote file content type '%{content_type}' not allowed. (Allowed content types: %{allowed})" % { | ||||
|             content_type: headers['content-type'], | ||||
|             allowed: ALLOWED_CONTENT_TYPES.join(',') | ||||
|           }) | ||||
|         end | ||||
|       end | ||||
| 
 | ||||
|       def validate_file_size | ||||
|         if headers['content-length'].to_i == 0 | ||||
|           errors.add(:base, "Missing 'ContentLength' header") | ||||
|         elsif headers['content-length'].to_i > FILE_SIZE_LIMIT | ||||
|           errors.add(:base, 'Remote file larger than limit. (limit %{limit})' % { | ||||
|             limit: ActiveSupport::NumberHelper.number_to_human_size(FILE_SIZE_LIMIT) | ||||
|           }) | ||||
|         end | ||||
|       end | ||||
| 
 | ||||
|       def headers | ||||
|         return {} if params[:remote_import_url].blank? || !valid_remote_import_url? | ||||
| 
 | ||||
|         @headers ||= Gitlab::HTTP.head(params[:remote_import_url]).headers | ||||
|       end | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  | @ -0,0 +1,65 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| module Import | ||||
|   module GitlabProjects | ||||
|     class CreateProjectFromUploadedFileService | ||||
|       include ActiveModel::Validations | ||||
|       include ::Services::ReturnServiceResponses | ||||
| 
 | ||||
|       validate :required_params_presence | ||||
| 
 | ||||
|       def initialize(current_user, params = {}) | ||||
|         @current_user = current_user | ||||
|         @params = params.dup | ||||
|       end | ||||
| 
 | ||||
|       def execute | ||||
|         return error(errors.full_messages.first) unless valid? | ||||
|         return error(project.errors.full_messages&.first) unless project.saved? | ||||
| 
 | ||||
|         success(project) | ||||
|       rescue StandardError => e | ||||
|         error(e.message) | ||||
|       end | ||||
| 
 | ||||
|       private | ||||
| 
 | ||||
|       attr_reader :current_user, :params | ||||
| 
 | ||||
|       def error(message) | ||||
|         super(message, :bad_request) | ||||
|       end | ||||
| 
 | ||||
|       def project | ||||
|         @project ||= ::Projects::GitlabProjectsImportService.new( | ||||
|           current_user, | ||||
|           project_params, | ||||
|           params[:override] | ||||
|         ).execute | ||||
|       end | ||||
| 
 | ||||
|       def project_params | ||||
|         { | ||||
|           name: params[:name], | ||||
|           path: params[:path], | ||||
|           namespace_id: params[:namespace].id, | ||||
|           file: params[:file], | ||||
|           overwrite: params[:overwrite], | ||||
|           import_type: 'gitlab_project' | ||||
|         } | ||||
|       end | ||||
| 
 | ||||
|       def required_params | ||||
|         [:path, :namespace, :file] | ||||
|       end | ||||
| 
 | ||||
|       def required_params_presence | ||||
|         required_params | ||||
|           .select { |key| params[key].blank? } | ||||
|           .each do |missing_parameter| | ||||
|             errors.add(:base, "Parameter '#{missing_parameter}' is required") | ||||
|           end | ||||
|       end | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  | @ -1,7 +1,11 @@ | |||
| - disable_initialization = local_assigns.fetch(:disable_initialization, false) | ||||
| - artifacts_endpoint_placeholder = ':pipeline_artifacts_id' | ||||
| 
 | ||||
| #commit-pipeline-table-view{ data: { disable_initialization: disable_initialization, | ||||
|   endpoint: endpoint, | ||||
|   "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), | ||||
|   "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), | ||||
|   "project-id": @project.id, | ||||
|   "artifacts-endpoint" => downloadable_artifacts_project_pipeline_path(@project, artifacts_endpoint_placeholder, format: :json), | ||||
|   "artifacts-endpoint-placeholder" => artifacts_endpoint_placeholder, | ||||
| } } | ||||
|  |  | |||
|  | @ -0,0 +1,5 @@ | |||
| --- | ||||
| title: Add description and roll_over columns to iterations_cadences | ||||
| merge_request: 60436 | ||||
| author: | ||||
| type: added | ||||
|  | @ -0,0 +1,7 @@ | |||
| --- | ||||
| title: > | ||||
|   Create "projects/import-remote" to import a project using a remote object storage to fetch | ||||
|   the exported project | ||||
| merge_request: 59033 | ||||
| author: | ||||
| type: added | ||||
|  | @ -0,0 +1,5 @@ | |||
| --- | ||||
| title: Introduce limit to number of registered runners | ||||
| merge_request: 60157 | ||||
| author: | ||||
| type: added | ||||
|  | @ -0,0 +1,5 @@ | |||
| --- | ||||
| title: Fix artifacts dropdown for merge request and commits pipelines tables | ||||
| merge_request: 61045 | ||||
| author: | ||||
| type: fixed | ||||
|  | @ -0,0 +1,8 @@ | |||
| --- | ||||
| name: ci_runner_limits | ||||
| introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60157 | ||||
| rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/329438 | ||||
| milestone: '13.12' | ||||
| type: development | ||||
| group: group::runner | ||||
| default_enabled: false | ||||
|  | @ -0,0 +1,8 @@ | |||
| --- | ||||
| name: import_project_from_remote_file | ||||
| introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59033 | ||||
| rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/330039 | ||||
| milestone: '13.12' | ||||
| type: development | ||||
| group: group::import | ||||
| default_enabled: false | ||||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.deploy_keys | ||||
| description: | ||||
| description: Count of users creating deploy keys in last 28 days. | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.keys | ||||
| description: | ||||
| description: Count of users creating regular keys in last 28 days. | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.remote_mirrors | ||||
| description: | ||||
| description: Count of users creating projects with remote mirrors. Includes both push and pull mirrors. | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.action_monthly_active_users_project_repo | ||||
| description: | ||||
| description: Count of monthly active users who have performed any Git operation (read/write/push) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.action_monthly_active_users_git_write | ||||
| description: Aggregated value for wiki, design and project repo actions | ||||
| description: Aggregated value for wiki, design, and project repo Git write actions | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.projects_with_sectional_code_owner_rules | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.projects_with_repositories_enabled | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.protected_branches | ||||
| description: | ||||
| description: Count of users creating projects with repositories making use of at least one protected branch in last 28 days. | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +1,18 @@ | |||
| --- | ||||
| key_path: redis_hll_counters.source_code.wiki_action_monthly | ||||
| description: | ||||
| description: Count of unique actions done on a wiki (create, edit, delete) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +1,18 @@ | |||
| --- | ||||
| key_path: redis_hll_counters.source_code.design_action_monthly | ||||
| description: | ||||
| description: Count of total design actions (upload, delete, comment, reply) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +1,18 @@ | |||
| --- | ||||
| key_path: redis_hll_counters.source_code.project_action_monthly | ||||
| description: | ||||
| description: Count of unique actions done on projects and related resources (create, edit, delete, comment) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.total_number_of_path_locks | ||||
| description: '' | ||||
| product_section: '' | ||||
| product_stage: '' | ||||
| product_group: '' | ||||
| product_category: '' | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.total_number_of_locked_files | ||||
| description: '' | ||||
| product_section: '' | ||||
| product_stage: '' | ||||
| product_group: '' | ||||
| product_category: '' | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +1,18 @@ | |||
| --- | ||||
| key_path: redis_hll_counters.source_code.git_write_action_monthly | ||||
| description: '' | ||||
| product_section: '' | ||||
| product_stage: '' | ||||
| product_group: '' | ||||
| product_category: '' | ||||
| description: Count of unique Git write actions | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -0,0 +1,18 @@ | |||
| --- | ||||
| key_path: redis_hll_counters.source_code.wiki_action_weekly | ||||
| description: Count of unique actions done on a wiki (create, edit, delete) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 7d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ee | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| - premium | ||||
| - ultimate | ||||
|  | @ -0,0 +1,18 @@ | |||
| --- | ||||
| key_path: redis_hll_counters.source_code.design_action_weekly | ||||
| description: Count of total design actions (upload, delete, comment, reply) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 7d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ee | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| - premium | ||||
| - ultimate | ||||
|  | @ -0,0 +1,18 @@ | |||
| --- | ||||
| key_path: redis_hll_counters.source_code.project_action_weekly | ||||
| description: Count of unique actions done on projects and related resources (create, edit, delete, comment) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 7d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| - premium | ||||
| - ultimate | ||||
|  | @ -1,16 +1,18 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage_monthly.create.projects_enforcing_code_owner_approval | ||||
| description: | ||||
| key_path: redis_hll_counters.source_code.git_write_action_weekly | ||||
| description: Count of unique Git write actions | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: 28d | ||||
| data_source: | ||||
| time_frame: 7d | ||||
| data_source: redis_hll | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: counts.projects_with_repositories_enabled | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: counts.protected_branches | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: counts.remote_mirrors | ||||
| description: | ||||
| description: Count of total remote mirrors. Includes both push and pull mirrors | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -11,6 +11,8 @@ time_frame: all | |||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +1,18 @@ | |||
| --- | ||||
| key_path: counts.commit_comment | ||||
| description: | ||||
| description: Count of total unique commit comments. Does not include MR diff comments | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: code_review | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: database | ||||
| data_source: redis | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: counts.source_code_pushes | ||||
| description: | ||||
| description: Count of total Git push operations | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: database | ||||
| data_source: redis | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: counts.template_repositories | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.deploy_keys | ||||
| description: | ||||
| description: Count of users creating deploy keys. | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.keys | ||||
| description: | ||||
| description: Count of users creating regular keys. | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.projects_with_disable_overriding_approvers_per_merge_request | ||||
| description: | ||||
| description: Total count of projects that do not allow overriding approvers on discrete merge requests | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,10 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.projects_without_disable_overriding_approvers_per_merge_request | ||||
| description: | ||||
| description: Count of total projects that do not disable overriding approvers per discrete merge request | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,10 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.remote_mirrors | ||||
| description: | ||||
| description: Count of users creating projects with remote mirrors. | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
|  | @ -8,9 +8,11 @@ product_category: source_code_management | |||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.projects_enforcing_code_owner_approval | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.projects_with_sectional_code_owner_rules | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.projects_with_repositories_enabled | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.protected_branches | ||||
| description: | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.total_number_of_path_locks | ||||
| description: The total number of default branch locks done through the GitLab UI | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.total_number_of_locked_files | ||||
| description: The total number of exclusive file locks (through the CLI) | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +1,18 @@ | |||
| --- | ||||
| key_path: counts.protected_branches_except_default | ||||
| description: '' | ||||
| product_section: '' | ||||
| product_stage: '' | ||||
| product_group: '' | ||||
| product_category: '' | ||||
| description: Count of branches that have been protected and are not the default branch | ||||
| product_section: dev | ||||
| product_stage: create | ||||
| product_group: group::source code | ||||
| product_category: source_code_management | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: database | ||||
| distribution: | ||||
| - ce | ||||
| - ee | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
| - premium | ||||
| - ultimate | ||||
|  |  | |||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.users_using_path_locks | ||||
| description: '' | ||||
| product_section: '' | ||||
| product_stage: '' | ||||
| product_group: '' | ||||
| product_category: '' | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -1,16 +0,0 @@ | |||
| --- | ||||
| key_path: usage_activity_by_stage.create.users_using_lfs_locks | ||||
| description: '' | ||||
| product_section: '' | ||||
| product_stage: '' | ||||
| product_group: '' | ||||
| product_category: '' | ||||
| value_type: number | ||||
| status: data_available | ||||
| time_frame: all | ||||
| data_source: | ||||
| distribution: | ||||
| - ce | ||||
| tier: | ||||
| - free | ||||
| skip_validation: true | ||||
|  | @ -0,0 +1,8 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class AddRemoteImportUrlToImportExportUpload < ActiveRecord::Migration[6.0] | ||||
|   # limit is added in 20210419203018_add_remote_text_limit_to_import_url_in_import_export_upload.rb | ||||
|   def change | ||||
|     add_column :import_export_uploads, :remote_import_url, :text # rubocop:disable Migration/AddLimitToTextColumns | ||||
|   end | ||||
| end | ||||
|  | @ -0,0 +1,15 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class AddRemoteTextLimitToImportUrlInImportExportUpload < ActiveRecord::Migration[6.0] | ||||
|   include Gitlab::Database::MigrationHelpers | ||||
| 
 | ||||
|   disable_ddl_transaction! | ||||
| 
 | ||||
|   def up | ||||
|     add_text_limit :import_export_uploads, :remote_import_url, 512 | ||||
|   end | ||||
| 
 | ||||
|   def down | ||||
|     remove_text_limit :import_export_uploads, :remote_import_url | ||||
|   end | ||||
| end | ||||
|  | @ -0,0 +1,8 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class AddRunnerRegistrationToPlanLimits < ActiveRecord::Migration[6.0] | ||||
|   def change | ||||
|     add_column(:plan_limits, :ci_registered_group_runners, :integer, default: 1000, null: false) | ||||
|     add_column(:plan_limits, :ci_registered_project_runners, :integer, default: 1000, null: false) | ||||
|   end | ||||
| end | ||||
|  | @ -0,0 +1,26 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class InsertRunnerRegistrationPlanLimits < ActiveRecord::Migration[6.0] | ||||
|   include Gitlab::Database::MigrationHelpers | ||||
| 
 | ||||
|   def up | ||||
|     create_or_update_plan_limit('ci_registered_group_runners', 'free', 50) | ||||
|     create_or_update_plan_limit('ci_registered_group_runners', 'bronze', 1000) | ||||
|     create_or_update_plan_limit('ci_registered_group_runners', 'silver', 1000) | ||||
|     create_or_update_plan_limit('ci_registered_group_runners', 'gold', 1000) | ||||
| 
 | ||||
|     create_or_update_plan_limit('ci_registered_project_runners', 'free', 50) | ||||
|     create_or_update_plan_limit('ci_registered_project_runners', 'bronze', 1000) | ||||
|     create_or_update_plan_limit('ci_registered_project_runners', 'silver', 1000) | ||||
|     create_or_update_plan_limit('ci_registered_project_runners', 'gold', 1000) | ||||
|   end | ||||
| 
 | ||||
|   def down | ||||
|     %w[group project].each do |scope| | ||||
|       create_or_update_plan_limit("ci_registered_#{scope}_runners", 'free', 1000) | ||||
|       create_or_update_plan_limit("ci_registered_#{scope}_runners", 'bronze', 1000) | ||||
|       create_or_update_plan_limit("ci_registered_#{scope}_runners", 'silver', 1000) | ||||
|       create_or_update_plan_limit("ci_registered_#{scope}_runners", 'gold', 1000) | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  | @ -0,0 +1,19 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class AddDescriptionRollOverToIterationsCadences < ActiveRecord::Migration[6.0] | ||||
|   include Gitlab::Database::MigrationHelpers | ||||
| 
 | ||||
|   def up | ||||
|     with_lock_retries do | ||||
|       add_column :iterations_cadences, :roll_over, :boolean, null: false, default: false | ||||
|       add_column :iterations_cadences, :description, :text # rubocop:disable Migration/AddLimitToTextColumns | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   def down | ||||
|     with_lock_retries do | ||||
|       remove_column :iterations_cadences, :roll_over | ||||
|       remove_column :iterations_cadences, :description | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  | @ -0,0 +1,15 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| class AddTextLimitToIterationsCadencesDescription < ActiveRecord::Migration[6.0] | ||||
|   include Gitlab::Database::MigrationHelpers | ||||
| 
 | ||||
|   disable_ddl_transaction! | ||||
| 
 | ||||
|   def up | ||||
|     add_text_limit :iterations_cadences, :description, 5000 | ||||
|   end | ||||
| 
 | ||||
|   def down | ||||
|     remove_text_limit :iterations_cadences, :description | ||||
|   end | ||||
| end | ||||
|  | @ -0,0 +1 @@ | |||
| 1ca5f960c233be5d5a30632b8aaad9598c259154eee817f4d76e8f1bb3e95edb | ||||
|  | @ -0,0 +1 @@ | |||
| 94404ed645a9c8a0ee462baff98cf2d0e50aecdb71bb1515fd3a82bf1a39dfda | ||||
|  | @ -0,0 +1 @@ | |||
| c582b7dda33492e122725001200aeb470cbf4458f247728a3b2102e325c97193 | ||||
|  | @ -0,0 +1 @@ | |||
| b5e34f7827edcdf81c66250353cddc3481e39c693f983df610b8ed20c58cb65b | ||||
|  | @ -0,0 +1 @@ | |||
| 0a7bf3fe10a5eca94392a599d0736c881065a0b2c33bb383c0b91eb5ac453db9 | ||||
|  | @ -0,0 +1 @@ | |||
| 7e90e64df39205c79a67acc311cd58dd9b55d2b3919d58749e3253854f99a44a | ||||
|  | @ -13565,7 +13565,9 @@ CREATE TABLE import_export_uploads ( | |||
|     project_id integer, | ||||
|     import_file text, | ||||
|     export_file text, | ||||
|     group_id bigint | ||||
|     group_id bigint, | ||||
|     remote_import_url text, | ||||
|     CONSTRAINT check_58f0d37481 CHECK ((char_length(remote_import_url) <= 512)) | ||||
| ); | ||||
| 
 | ||||
| CREATE SEQUENCE import_export_uploads_id_seq | ||||
|  | @ -13993,6 +13995,9 @@ CREATE TABLE iterations_cadences ( | |||
|     active boolean DEFAULT true NOT NULL, | ||||
|     automatic boolean DEFAULT true NOT NULL, | ||||
|     title text NOT NULL, | ||||
|     roll_over boolean DEFAULT false NOT NULL, | ||||
|     description text, | ||||
|     CONSTRAINT check_5c5d2b44bd CHECK ((char_length(description) <= 5000)), | ||||
|     CONSTRAINT check_fedff82d3b CHECK ((char_length(title) <= 255)) | ||||
| ); | ||||
| 
 | ||||
|  | @ -16025,7 +16030,9 @@ CREATE TABLE plan_limits ( | |||
|     daily_invites integer DEFAULT 0 NOT NULL, | ||||
|     rubygems_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, | ||||
|     terraform_module_max_file_size bigint DEFAULT 1073741824 NOT NULL, | ||||
|     helm_max_file_size bigint DEFAULT 5242880 NOT NULL | ||||
|     helm_max_file_size bigint DEFAULT 5242880 NOT NULL, | ||||
|     ci_registered_group_runners integer DEFAULT 1000 NOT NULL, | ||||
|     ci_registered_project_runners integer DEFAULT 1000 NOT NULL | ||||
| ); | ||||
| 
 | ||||
| CREATE SEQUENCE plan_limits_id_seq | ||||
|  |  | |||
|  | @ -25,6 +25,10 @@ Response codes: | |||
| - `4XX`: Not accepted | ||||
| - All other codes: accepted and logged | ||||
| 
 | ||||
| ### Service Result | ||||
| 
 | ||||
| Pipelines not accepted by the external validation service aren't created or visible in pipeline lists, in either the GitLab user interface or API. Creating an unaccepted pipeline when using the GitLab user interface displays an error message that states: `Pipeline cannot be run. External validation failed` | ||||
| 
 | ||||
| ## Configuration | ||||
| 
 | ||||
| To configure external pipeline validation, add the | ||||
|  |  | |||
|  | @ -435,6 +435,32 @@ installation, run the following in the [GitLab Rails console](operations/rails_c | |||
| Plan.default.actual_limits.update!(ci_max_artifact_size_junit: 10) | ||||
| ``` | ||||
| 
 | ||||
| ### Number of registered runners per scope | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/321368) in GitLab 13.12. | ||||
| 
 | ||||
| The total number of registered runners is limited at the group and project | ||||
| levels. Each time a new runner is registered, GitLab checks these limits. A | ||||
| runner's registration fails if it exceeds the limit for the scope determined by | ||||
| the runner registration token. | ||||
| 
 | ||||
| - GitLab SaaS subscribers have different limits defined per plan, affecting all projects using that plan. | ||||
| - Self-managed GitLab Premium and Ultimate limits are defined by a default plan that affects all projects: | ||||
| 
 | ||||
|     | Runner scope                                | Default value | | ||||
|     |---------------------------------------------|---------------| | ||||
|     | `ci_registered_group_runners`               | 1000          | | ||||
|     | `ci_registered_project_runners`             | 1000          | | ||||
| 
 | ||||
|     To update these limits, run the following in the | ||||
|     [GitLab Rails console](operations/rails_console.md#starting-a-rails-console-session): | ||||
| 
 | ||||
|     ```ruby | ||||
|     # Use ci_registered_group_runners or ci_registered_project_runners | ||||
|     # depending on desired scope | ||||
|     Plan.default.actual_limits.update!(ci_registered_project_runners: 100) | ||||
|     ``` | ||||
| 
 | ||||
| ## Instance monitoring and metrics | ||||
| 
 | ||||
| ### Incident Management inbound alert limits | ||||
|  |  | |||
|  | @ -2498,9 +2498,11 @@ Input type: `IterationCadenceCreateInput` | |||
| | <a id="mutationiterationcadencecreateactive"></a>`active` | [`Boolean!`](#boolean) | Whether the iteration cadence is active. | | ||||
| | <a id="mutationiterationcadencecreateautomatic"></a>`automatic` | [`Boolean!`](#boolean) | Whether the iteration cadence should automatically generate future iterations. | | ||||
| | <a id="mutationiterationcadencecreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | | ||||
| | <a id="mutationiterationcadencecreatedescription"></a>`description` | [`String`](#string) | Description of the iteration cadence. Maximum length is 5000 characters. | | ||||
| | <a id="mutationiterationcadencecreatedurationinweeks"></a>`durationInWeeks` | [`Int`](#int) | Duration in weeks of the iterations within this cadence. | | ||||
| | <a id="mutationiterationcadencecreategrouppath"></a>`groupPath` | [`ID!`](#id) | The group where the iteration cadence is created. | | ||||
| | <a id="mutationiterationcadencecreateiterationsinadvance"></a>`iterationsInAdvance` | [`Int`](#int) | Future iterations to be created when iteration cadence is set to automatic. | | ||||
| | <a id="mutationiterationcadencecreaterollover"></a>`rollOver` | [`Boolean`](#boolean) | Whether the iteration cadence should roll over issues to the next iteration or not. | | ||||
| | <a id="mutationiterationcadencecreatestartdate"></a>`startDate` | [`Time`](#time) | Timestamp of the iteration cadence start date. | | ||||
| | <a id="mutationiterationcadencecreatetitle"></a>`title` | [`String`](#string) | Title of the iteration cadence. | | ||||
| 
 | ||||
|  | @ -2542,9 +2544,11 @@ Input type: `IterationCadenceUpdateInput` | |||
| | <a id="mutationiterationcadenceupdateactive"></a>`active` | [`Boolean`](#boolean) | Whether the iteration cadence is active. | | ||||
| | <a id="mutationiterationcadenceupdateautomatic"></a>`automatic` | [`Boolean`](#boolean) | Whether the iteration cadence should automatically generate future iterations. | | ||||
| | <a id="mutationiterationcadenceupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. | | ||||
| | <a id="mutationiterationcadenceupdatedescription"></a>`description` | [`String`](#string) | Description of the iteration cadence. Maximum length is 5000 characters. | | ||||
| | <a id="mutationiterationcadenceupdatedurationinweeks"></a>`durationInWeeks` | [`Int`](#int) | Duration in weeks of the iterations within this cadence. | | ||||
| | <a id="mutationiterationcadenceupdateid"></a>`id` | [`IterationsCadenceID!`](#iterationscadenceid) | Global ID of the iteration cadence. | | ||||
| | <a id="mutationiterationcadenceupdateiterationsinadvance"></a>`iterationsInAdvance` | [`Int`](#int) | Future iterations to be created when iteration cadence is set to automatic. | | ||||
| | <a id="mutationiterationcadenceupdaterollover"></a>`rollOver` | [`Boolean`](#boolean) | Whether the iteration cadence should roll over issues to the next iteration or not. | | ||||
| | <a id="mutationiterationcadenceupdatestartdate"></a>`startDate` | [`Time`](#time) | Timestamp of the iteration cadence start date. | | ||||
| | <a id="mutationiterationcadenceupdatetitle"></a>`title` | [`String`](#string) | Title of the iteration cadence. | | ||||
| 
 | ||||
|  | @ -9431,9 +9435,11 @@ Represents an iteration cadence. | |||
| | ---- | ---- | ----------- | | ||||
| | <a id="iterationcadenceactive"></a>`active` | [`Boolean`](#boolean) | Whether the iteration cadence is active. | | ||||
| | <a id="iterationcadenceautomatic"></a>`automatic` | [`Boolean`](#boolean) | Whether the iteration cadence should automatically generate future iterations. | | ||||
| | <a id="iterationcadencedescription"></a>`description` | [`String`](#string) | Description of the iteration cadence. Maximum length is 5000 characters. | | ||||
| | <a id="iterationcadencedurationinweeks"></a>`durationInWeeks` | [`Int`](#int) | Duration in weeks of the iterations within this cadence. | | ||||
| | <a id="iterationcadenceid"></a>`id` | [`IterationsCadenceID!`](#iterationscadenceid) | Global ID of the iteration cadence. | | ||||
| | <a id="iterationcadenceiterationsinadvance"></a>`iterationsInAdvance` | [`Int`](#int) | Future iterations to be created when iteration cadence is set to automatic. | | ||||
| | <a id="iterationcadencerollover"></a>`rollOver` | [`Boolean!`](#boolean) | Whether the iteration cadence should roll over issues to the next iteration or not. | | ||||
| | <a id="iterationcadencestartdate"></a>`startDate` | [`Time`](#time) | Timestamp of the iteration cadence start date. | | ||||
| | <a id="iterationcadencetitle"></a>`title` | [`String!`](#string) | Title of the iteration cadence. | | ||||
| 
 | ||||
|  |  | |||
|  | @ -862,7 +862,7 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `counts.commit_comment` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total unique commit comments. Does not include MR diff comments | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182004_commit_comment.yml) | ||||
| 
 | ||||
|  | @ -870,7 +870,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `counts.confidential_epics` | ||||
| 
 | ||||
|  | @ -5170,15 +5170,15 @@ Tiers: `free` | |||
| 
 | ||||
| ### `counts.projects_with_repositories_enabled` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating projects that have a matching Git repository, result of a Git push action. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216181959_projects_with_repositories_enabled.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216181959_projects_with_repositories_enabled.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `counts.projects_with_terraform_reports` | ||||
| 
 | ||||
|  | @ -5230,27 +5230,27 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `counts.protected_branches` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total protected branches | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182001_protected_branches.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182001_protected_branches.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `counts.protected_branches_except_default` | ||||
| 
 | ||||
| Missing description | ||||
| Count of branches that have been protected and are not the default branch | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182454_protected_branches_except_default.yml) | ||||
| 
 | ||||
| Group: `` | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `counts.releases` | ||||
| 
 | ||||
|  | @ -5266,7 +5266,7 @@ Tiers: `free` | |||
| 
 | ||||
| ### `counts.remote_mirrors` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total remote mirrors. Includes both push and pull mirrors | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182002_remote_mirrors.yml) | ||||
| 
 | ||||
|  | @ -5274,7 +5274,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `counts.requirement_test_reports_ci` | ||||
| 
 | ||||
|  | @ -5422,7 +5422,7 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `counts.source_code_pushes` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total Git push operations | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182006_source_code_pushes.yml) | ||||
| 
 | ||||
|  | @ -5430,7 +5430,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `counts.static_site_editor_commits` | ||||
| 
 | ||||
|  | @ -5542,15 +5542,15 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `counts.template_repositories` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total repo templates used to aggregate all file templates | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182008_template_repositories.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182008_template_repositories.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `counts.templates_asana_active` | ||||
| 
 | ||||
|  | @ -10724,6 +10724,30 @@ Status: `implemented` | |||
| 
 | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_parent_monthly` | ||||
| 
 | ||||
| Counts of MAU updating parent on epic | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210423011841_g_project_management_users_updating_epic_parent_monthly.yml) | ||||
| 
 | ||||
| Group: `group::product planning` | ||||
| 
 | ||||
| Status: `implemented` | ||||
| 
 | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_parent_weekly` | ||||
| 
 | ||||
| Counts of WAU updating parent on epic | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210423012053_g_project_management_users_updating_epic_parent_weekly.yml) | ||||
| 
 | ||||
| Group: `group::product planning` | ||||
| 
 | ||||
| Status: `implemented` | ||||
| 
 | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.epics_usage.g_project_management_users_updating_epic_titles_monthly` | ||||
| 
 | ||||
| Counts of MAU changing epic titles | ||||
|  | @ -13966,7 +13990,7 @@ Tiers: | |||
| 
 | ||||
| ### `redis_hll_counters.source_code.design_action_monthly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total design actions (upload, delete, comment, reply) | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182106_design_action_monthly.yml) | ||||
| 
 | ||||
|  | @ -13974,43 +13998,43 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.source_code.design_action_weekly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total design actions (upload, delete, comment, reply) | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216182104_design_action_weekly.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210216182104_design_action_weekly.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.source_code.git_write_action_monthly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of unique Git write actions | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216184047_git_write_action_monthly.yml) | ||||
| 
 | ||||
| Group: `` | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.source_code.git_write_action_weekly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of unique Git write actions | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216184045_git_write_action_weekly.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210216184045_git_write_action_weekly.yml) | ||||
| 
 | ||||
| Group: `` | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.source_code.i_source_code_code_intelligence_monthly` | ||||
| 
 | ||||
|  | @ -14062,7 +14086,7 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `redis_hll_counters.source_code.project_action_monthly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of unique actions done on projects and related resources (create, edit, delete, comment) | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182109_project_action_monthly.yml) | ||||
| 
 | ||||
|  | @ -14070,23 +14094,23 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.source_code.project_action_weekly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of unique actions done on projects and related resources (create, edit, delete, comment) | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216182107_project_action_weekly.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210216182107_project_action_weekly.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.source_code.wiki_action_monthly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of unique actions done on a wiki (create, edit, delete) | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182102_wiki_action_monthly.yml) | ||||
| 
 | ||||
|  | @ -14094,19 +14118,19 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.source_code.wiki_action_weekly` | ||||
| 
 | ||||
| Missing description | ||||
| Count of unique actions done on a wiki (create, edit, delete) | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_7d/20210216182100_wiki_action_weekly.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_7d/20210216182100_wiki_action_weekly.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `redis_hll_counters.terraform.p_terraform_state_api_unique_users_monthly` | ||||
| 
 | ||||
|  | @ -15096,7 +15120,7 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage.create.approval_project_rules` | ||||
| 
 | ||||
| Number of project approval rules | ||||
| Total number of project approval rules | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182030_approval_project_rules.yml) | ||||
| 
 | ||||
|  | @ -15104,7 +15128,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.approval_project_rules_with_exact_required_approvers` | ||||
| 
 | ||||
|  | @ -15144,7 +15168,7 @@ Tiers: `free` | |||
| 
 | ||||
| ### `usage_activity_by_stage.create.approval_project_rules_with_target_branch` | ||||
| 
 | ||||
| Number of project approval rules with not default target branch | ||||
| Number of project approval rules scoped to a specific repo branch. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182032_approval_project_rules_with_target_branch.yml) | ||||
| 
 | ||||
|  | @ -15152,11 +15176,11 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.deploy_keys` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating deploy keys. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182010_deploy_keys.yml) | ||||
| 
 | ||||
|  | @ -15164,11 +15188,11 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.keys` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating regular keys. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182012_keys.yml) | ||||
| 
 | ||||
|  | @ -15176,7 +15200,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.merge_requests` | ||||
| 
 | ||||
|  | @ -15240,15 +15264,15 @@ Tiers: `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage.create.projects_enforcing_code_owner_approval` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating projects that require approval by code owners for code changes. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182019_projects_enforcing_code_owner_approval.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182019_projects_enforcing_code_owner_approval.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.projects_imported_from_github` | ||||
| 
 | ||||
|  | @ -15264,7 +15288,7 @@ Tiers: `free` | |||
| 
 | ||||
| ### `usage_activity_by_stage.create.projects_with_disable_overriding_approvers_per_merge_request` | ||||
| 
 | ||||
| Missing description | ||||
| Total count of projects that do not allow overriding approvers on discrete merge requests | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182014_projects_with_disable_overriding_approvers_per_merge_request.yml) | ||||
| 
 | ||||
|  | @ -15272,35 +15296,35 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.projects_with_repositories_enabled` | ||||
| 
 | ||||
| Missing description | ||||
| Count of projects that have a matching Git repository, result of a Git push action | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182023_projects_with_repositories_enabled.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182023_projects_with_repositories_enabled.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.projects_with_sectional_code_owner_rules` | ||||
| 
 | ||||
| Missing description | ||||
| Count of projects using code owners with code owners section feature | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182021_projects_with_sectional_code_owner_rules.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182021_projects_with_sectional_code_owner_rules.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.projects_without_disable_overriding_approvers_per_merge_request` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total projects that do not disable overriding approvers per discrete merge request | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182015_projects_without_disable_overriding_approvers_per_merge_request.yml) | ||||
| 
 | ||||
|  | @ -15308,23 +15332,23 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.protected_branches` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating projects with repositories making use of at least one protected branch. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182025_protected_branches.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182025_protected_branches.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.remote_mirrors` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating projects with remote mirrors. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182017_remote_mirrors.yml) | ||||
| 
 | ||||
|  | @ -15332,7 +15356,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.snippets` | ||||
| 
 | ||||
|  | @ -15360,51 +15384,51 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage.create.total_number_of_locked_files` | ||||
| 
 | ||||
| The total number of exclusive file locks (through the CLI) | ||||
| The total number of files which have been locked via the GitLab UI | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182028_total_number_of_locked_files.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182028_total_number_of_locked_files.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.total_number_of_path_locks` | ||||
| 
 | ||||
| The total number of default branch locks done through the GitLab UI | ||||
| Number of paths/directories manually locked through the UI | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216182027_total_number_of_path_locks.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216182027_total_number_of_path_locks.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.users_using_lfs_locks` | ||||
| 
 | ||||
| Missing description | ||||
| Number of unique users who have locked files or directories using LFS via the command line | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183346_users_using_lfs_locks.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183346_users_using_lfs_locks.yml) | ||||
| 
 | ||||
| Group: `` | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.create.users_using_path_locks` | ||||
| 
 | ||||
| Missing description | ||||
| Number of users who have manually locked paths/directories through the UI | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216183344_users_using_path_locks.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_all/20210216183344_users_using_path_locks.yml) | ||||
| 
 | ||||
| Group: `` | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage.enablement.counts.geo_node_usage.git_fetch_event_count_weekly` | ||||
| 
 | ||||
|  | @ -16946,7 +16970,7 @@ Tiers: `free` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.action_monthly_active_users_git_write` | ||||
| 
 | ||||
| Aggregated value for wiki, design and project repo actions | ||||
| Aggregated value for wiki, design, and project repo Git write actions | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182041_action_monthly_active_users_git_write.yml) | ||||
| 
 | ||||
|  | @ -16954,7 +16978,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.action_monthly_active_users_ide_edit` | ||||
| 
 | ||||
|  | @ -16970,7 +16994,7 @@ Tiers: `free` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.action_monthly_active_users_project_repo` | ||||
| 
 | ||||
| Missing description | ||||
| Count of monthly active users who have performed any Git operation (read/write/push) | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182040_action_monthly_active_users_project_repo.yml) | ||||
| 
 | ||||
|  | @ -16978,7 +17002,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.action_monthly_active_users_sfe_edit` | ||||
| 
 | ||||
|  | @ -17042,7 +17066,7 @@ Tiers: `free` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.approval_project_rules` | ||||
| 
 | ||||
| Number of project approval rules | ||||
| Total number of project approval rules | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182056_approval_project_rules.yml) | ||||
| 
 | ||||
|  | @ -17050,7 +17074,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.approval_project_rules_with_exact_required_approvers` | ||||
| 
 | ||||
|  | @ -17090,7 +17114,7 @@ Tiers: `free` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.approval_project_rules_with_target_branch` | ||||
| 
 | ||||
| Number of project approval rules with not default target branch | ||||
| Number of project approval rules scoped to a specific repo branch. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182058_approval_project_rules_with_target_branch.yml) | ||||
| 
 | ||||
|  | @ -17098,11 +17122,11 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.deploy_keys` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating deploy keys in last 28 days. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182034_deploy_keys.yml) | ||||
| 
 | ||||
|  | @ -17110,11 +17134,11 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.keys` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating regular keys in last 28 days. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182036_keys.yml) | ||||
| 
 | ||||
|  | @ -17122,7 +17146,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.merge_requests` | ||||
| 
 | ||||
|  | @ -17174,7 +17198,7 @@ Tiers: `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.merge_requests_with_overridden_project_rules` | ||||
| 
 | ||||
| Number of merge requests that have local rules that have overwritten a project rule | ||||
| Number of merge requests which have overriden rules created at the project level | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182047_merge_requests_with_overridden_project_rules.yml) | ||||
| 
 | ||||
|  | @ -17182,7 +17206,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.merge_requests_with_required_codeowners` | ||||
| 
 | ||||
|  | @ -17198,15 +17222,15 @@ Tiers: `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.projects_enforcing_code_owner_approval` | ||||
| 
 | ||||
| Missing description | ||||
| Count of total projects that require approval by code owners for code changes | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182043_projects_enforcing_code_owner_approval.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182043_projects_enforcing_code_owner_approval.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.projects_imported_from_github` | ||||
| 
 | ||||
|  | @ -17234,27 +17258,27 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.projects_with_repositories_enabled` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating projects that have a matching Git repository, result of a Git push action, for last 28 days. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182049_projects_with_repositories_enabled.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182049_projects_with_repositories_enabled.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.projects_with_sectional_code_owner_rules` | ||||
| 
 | ||||
| Missing description | ||||
| Count of projects using code owners with code owners section feature | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182045_projects_with_sectional_code_owner_rules.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182045_projects_with_sectional_code_owner_rules.yml) | ||||
| 
 | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.projects_without_disable_overriding_approvers_per_merge_request` | ||||
| 
 | ||||
|  | @ -17270,7 +17294,7 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.protected_branches` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating projects with repositories making use of at least one protected branch in last 28 days. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182051_protected_branches.yml) | ||||
| 
 | ||||
|  | @ -17278,11 +17302,11 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.remote_mirrors` | ||||
| 
 | ||||
| Missing description | ||||
| Count of users creating projects with remote mirrors. Includes both push and pull mirrors. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216182038_remote_mirrors.yml) | ||||
| 
 | ||||
|  | @ -17290,7 +17314,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `free`, `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.snippets` | ||||
| 
 | ||||
|  | @ -17318,31 +17342,31 @@ Tiers: `free`, `premium`, `ultimate` | |||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.total_number_of_locked_files` | ||||
| 
 | ||||
| Missing description | ||||
| The total number of files which have been locked via the GitLab UI | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183614_total_number_of_locked_files.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183614_total_number_of_locked_files.yml) | ||||
| 
 | ||||
| Group: `` | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.total_number_of_path_locks` | ||||
| 
 | ||||
| Missing description | ||||
| Number of paths/directories manually locked through the UI | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_28d/20210216183613_total_number_of_path_locks.yml) | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216183613_total_number_of_path_locks.yml) | ||||
| 
 | ||||
| Group: `` | ||||
| Group: `group::source code` | ||||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: `free` | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.users_using_lfs_locks` | ||||
| 
 | ||||
| Number of users that have used default branch locks through the UI | ||||
| Number of unique users who have locked files or directories using LFS via the command line | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182054_users_using_lfs_locks.yml) | ||||
| 
 | ||||
|  | @ -17350,11 +17374,11 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.create.users_using_path_locks` | ||||
| 
 | ||||
| Number of users that have used exclusive file locks through the CLI | ||||
| Number of users creating path_locks in last 28 days. | ||||
| 
 | ||||
| [YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/config/metrics/counts_28d/20210216182053_users_using_path_locks.yml) | ||||
| 
 | ||||
|  | @ -17362,7 +17386,7 @@ Group: `group::source code` | |||
| 
 | ||||
| Status: `data_available` | ||||
| 
 | ||||
| Tiers: | ||||
| Tiers: `premium`, `ultimate` | ||||
| 
 | ||||
| ### `usage_activity_by_stage_monthly.manage.bulk_imports.gitlab` | ||||
| 
 | ||||
|  |  | |||
|  | @ -9,7 +9,7 @@ type: reference | |||
| 
 | ||||
| You can set a maximum size for display of diff files (patches). | ||||
| 
 | ||||
| For details about diff files, [View changes between files](../project/merge_requests/reviews/index.md#view-changes-between-file-versions). | ||||
| For details about diff files, [view changes between files](../project/merge_requests/changes.md). | ||||
| 
 | ||||
| ## Maximum diff patch size | ||||
| 
 | ||||
|  | @ -23,10 +23,10 @@ This affects merge requests and branch comparison views. | |||
| 
 | ||||
| To set the maximum diff patch size: | ||||
| 
 | ||||
| 1. Go to **Admin Area > Settings > General**. | ||||
| 1. Go to the Admin Area (**{admin}**) and select **Settings > General**. | ||||
| 1. Expand **Diff limits**. | ||||
| 1. Enter a value for **Maximum diff patch size**, measured in bytes. | ||||
| 1. Click on **Save changes**. | ||||
| 1. Select **Save changes**. | ||||
| 
 | ||||
| WARNING: | ||||
| This setting is experimental. An increased maximum increases resource | ||||
|  |  | |||
| Before Width: | Height: | Size: 49 KiB | 
| Before Width: | Height: | Size: 45 KiB | 
| Before Width: | Height: | Size: 77 KiB | 
| Before Width: | Height: | Size: 28 KiB | 
|  | @ -91,7 +91,7 @@ current merge request. | |||
| 
 | ||||
| ### Marking a comment or thread as resolved | ||||
| 
 | ||||
| You can mark a thread as resolved by clicking the **Resolve thread** | ||||
| You can mark a thread as resolved by selecting the **Resolve thread** | ||||
| button at the bottom of the thread. | ||||
| 
 | ||||
|  | ||||
|  | @ -102,8 +102,8 @@ Alternatively, you can mark each comment as resolved individually. | |||
| 
 | ||||
| ### Move all unresolved threads in a merge request to an issue | ||||
| 
 | ||||
| To continue all open threads from a merge request in a new issue, click the | ||||
| **Resolve all threads in new issue** button. | ||||
| To continue all open threads from a merge request in a new issue, select | ||||
| **Resolve all threads in new issue**. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
|  | @ -283,85 +283,6 @@ To create a confidential comment, select the **Make this comment confidential** | |||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## Merge request reviews | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4213) in GitLab Premium 11.4. | ||||
| > - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/28154) to GitLab Free in 13.1. | ||||
| 
 | ||||
| When looking at a merge request diff, you are able to start a review. | ||||
| This allows you to create comments inside a merge request that are **only visible to you** until published, | ||||
| in order to allow you to submit them all as a single action. | ||||
| 
 | ||||
| ### Starting a review | ||||
| 
 | ||||
| To start a review, write a comment on a diff as normal under the **Changes** tab | ||||
| in a merge request, and then select **Start a review**. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| After a review is started, any comments that are part of this review are marked `Pending`. | ||||
| All comments that are part of a review show two buttons: | ||||
| 
 | ||||
| - **Finish review**: Submits all comments that are part of the review, making them visible to other users. | ||||
| - **Add comment now**: Submits the specific comment as a regular comment instead of as part of the review. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| You can use [quick actions](../project/quick_actions.md) inside review comments. The comment shows the actions to perform after publication. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| To add more comments to a review, start writing a comment as normal and click the **Add to review** button. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| This adds the comment to the review. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Resolving/Unresolving threads | ||||
| 
 | ||||
| Review comments can also resolve/unresolve [resolvable threads](#resolvable-comments-and-threads). | ||||
| When replying to a comment, a checkbox is displayed that you can click to resolve or unresolve | ||||
| the thread after publication. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| If a particular pending comment resolves or unresolves the thread, this is shown on the pending | ||||
| comment itself. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Adding a new comment | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/8225) in GitLab 13.10. | ||||
| 
 | ||||
| If you have a review in progress, you will be presented with the option to **Add to review**: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Submitting a review | ||||
| 
 | ||||
| If you have any comments that have not been submitted, a bar displays at the | ||||
| bottom of the screen with two buttons: | ||||
| 
 | ||||
| - **Pending comments**: Opens a list of comments ready to be submitted for review. | ||||
| - **Submit review**: Publishes all comments. Any quick actions submitted are performed at this time. | ||||
| 
 | ||||
| Alternatively, to finish the entire review from a pending comment: | ||||
| 
 | ||||
| - Click the **Submit review** button on the comment. | ||||
| - Use the `/submit_review` [quick action](../project/quick_actions.md) in the text of non-review comment. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| Submitting the review sends a single email to every notifiable user of the | ||||
| merge request with all the comments associated to it. | ||||
| 
 | ||||
| Replying to this email will, consequentially, create a new comment on the associated merge request. | ||||
| 
 | ||||
| ## Filtering notes | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/26723) in GitLab 11.5. | ||||
|  | @ -392,7 +313,7 @@ To reply to a standard (non-thread) comment, you can use the **Reply to comment* | |||
| 
 | ||||
| The **Reply to comment** button is only displayed if you have permissions to reply to an existing thread, or start a thread from a standard comment. | ||||
| 
 | ||||
| Clicking on the **Reply to comment** button brings the reply area into focus and you can type your reply. | ||||
| Selecting the **Reply to comment** button brings the reply area into focus and you can type your reply. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
|  | @ -409,9 +330,9 @@ not supported yet. | |||
| 
 | ||||
| You can assign an issue to a user who made a comment. | ||||
| 
 | ||||
| In the comment, click the **More Actions** menu and click **Assign to commenting user**. | ||||
| In the comment, select the **More Actions** menu, and then select **Assign to commenting user**. | ||||
| 
 | ||||
|   Click the button again to unassign the commenter. | ||||
| Select the button again to unassign the commenter. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
|  |  | |||
|  | @ -98,11 +98,12 @@ Any settings or feature limits not listed here are using the defaults listed in | |||
| | Artifacts maximum size (compressed) | 1G                | 100M          | | ||||
| | Artifacts [expiry time](../../ci/yaml/README.md#artifactsexpire_in)   | From June 22, 2020, deleted after 30 days unless otherwise specified (artifacts created before that date have no expiry).           | deleted after 30 days unless otherwise specified    | | ||||
| | Scheduled Pipeline Cron | `*/5 * * * *` | `3-59/10 * * * *` | | ||||
| | [Max jobs in active pipelines](../../administration/instance_limits.md#number-of-jobs-in-active-pipelines) | `500` for Free tier, unlimited otherwise | Unlimited | ||||
| | [Max jobs in active pipelines](../../administration/instance_limits.md#number-of-jobs-in-active-pipelines) | `500` for Free tier, unlimited otherwise | Unlimited | | ||||
| | [Max CI/CD subscriptions to a project](../../administration/instance_limits.md#number-of-cicd-subscriptions-to-a-project) | `2` | Unlimited | | ||||
| | [Max pipeline schedules in projects](../../administration/instance_limits.md#number-of-pipeline-schedules) | `10` for Free tier, `50` for all paid tiers | Unlimited | | ||||
| | [Scheduled Job Archival](../../user/admin_area/settings/continuous_integration.md#archive-jobs) | 3 months | Never | | ||||
| | Max test cases per [unit test report](../../ci/unit_test_reports.md) | `500_000` | Unlimited | | ||||
| | [Max registered runners](../../administration/instance_limits.md#number-of-registered-runners-per-scope) | `50` per-project and per-group for Free tier,<br/>`1_000` per-group for all paid tiers / `1_000` per-project for all paid tiers | `1_000` per-group / `1_000` per-project | | ||||
| 
 | ||||
| ## Account and limit settings | ||||
| 
 | ||||
|  |  | |||
|  | @ -0,0 +1,151 @@ | |||
| --- | ||||
| stage: Create | ||||
| group: Code Review | ||||
| info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments | ||||
| type: index, reference | ||||
| --- | ||||
| 
 | ||||
| # Changes tab in merge requests | ||||
| 
 | ||||
| The **Changes** tab on a [merge request](index.md), below the main merge request details and next to the discussion tab, | ||||
| shows the changes to files between branches or commits. This view of changes to a | ||||
| file is also known as a **diff**. By default, the diff view compares the file in the | ||||
| merge request branch and the file in the target branch. | ||||
| 
 | ||||
| The diff view includes the following: | ||||
| 
 | ||||
| - The file's name and path. | ||||
| - The number of lines added and deleted. | ||||
| - Buttons for the following options: | ||||
|   - Toggle comments for this file; useful for inline reviews. | ||||
|   - Edit the file in the merge request's branch. | ||||
|   - Show full file, in case you want to look at the changes in context with the rest of the file. | ||||
|   - View file at the current commit. | ||||
|   - Preview the changes with [Review Apps](../../../ci/review_apps/index.md). | ||||
| - The changed lines, with the specific changes highlighted. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## Merge request diff file navigation | ||||
| 
 | ||||
| When reviewing changes in the **Changes** tab, the diff can be navigated using | ||||
| the file tree or file list. As you scroll through large diffs with many | ||||
| changes, you can quickly jump to any changed file using the file tree or file | ||||
| list. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## Collapsed files in the Changes view | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232820) in GitLab 13.4. | ||||
| 
 | ||||
| When you review changes in the **Changes** tab, files with a large number of changes are collapsed | ||||
| to improve performance. When files are collapsed, a warning appears at the top of the changes. | ||||
| Select **Expand file** on any file to view the changes for that file. | ||||
| 
 | ||||
| ## File-by-file diff navigation | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222790) in GitLab 13.2. | ||||
| > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/229848) in GitLab 13.7. | ||||
| 
 | ||||
| For larger merge requests, consider reviewing one file at a time. To enable this feature: | ||||
| 
 | ||||
| 1. In the top-right corner, select your avatar. | ||||
| 1. Select **Preferences**. | ||||
| 1. Scroll to the **Behavior** section and select **Show one file at a time on merge request's Changes tab**. | ||||
| 1. Select **Save changes**. | ||||
| 
 | ||||
| After you enable this setting, GitLab displays only one file at a time in the **Changes** tab when you review merge requests. You can select **Prev** and **Next** to view other changed files. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| In [GitLab 13.7](https://gitlab.com/gitlab-org/gitlab/-/issues/233898) and later, if you want to change | ||||
| this behavior, you can do so from your **User preferences** (as explained above) or directly in a | ||||
| merge request: | ||||
| 
 | ||||
| 1. Go to the merge request's **Changes** tab. | ||||
| 1. Select the cog icon (**{settings}**) to reveal the merge request's settings dropdown. | ||||
| 1. Select or clear the checkbox **Show one file at a time** to change the setting accordingly. | ||||
| 
 | ||||
| This change overrides the choice you made in your user preferences and persists until you clear your | ||||
| browser's cookies or change this behavior again. | ||||
| 
 | ||||
| ## Merge requests commit navigation | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18140) in GitLab 13.0. | ||||
| 
 | ||||
| To seamlessly navigate among commits in a merge request: | ||||
| 
 | ||||
| 1. Select the **Commits** tab. | ||||
| 1. Select a commit to open it in the single-commit view. | ||||
| 1. Navigate through the commits by either: | ||||
| 
 | ||||
|    - Selecting **Prev** and **Next** buttons below the tab buttons. | ||||
|    - Using the <kbd>X</kbd> and <kbd>C</kbd> keyboard shortcuts. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## Incrementally expand merge request diffs | ||||
| 
 | ||||
| By default, the diff shows only the parts of a file which are changed. | ||||
| To view more unchanged lines above or below a change select the | ||||
| **Expand up** or **Expand down** icons. You can also select **Show unchanged lines** | ||||
| to expand the entire file. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| In GitLab [versions 13.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/205401), when viewing a | ||||
| merge request's **Changes** tab, if a certain file was only renamed, you can expand it to see the | ||||
| entire content by selecting **Show file contents**. | ||||
| 
 | ||||
| ## Ignore whitespace changes in Merge Request diff view | ||||
| 
 | ||||
| If you select the **Hide whitespace changes** button, you can see the diff | ||||
| without whitespace changes (if there are any). This is also working when on a | ||||
| specific commit page. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| NOTE: | ||||
| You can append `?w=1` while on the diffs page of a merge request to ignore any | ||||
| whitespace changes. | ||||
| 
 | ||||
| ## Mark files as viewed | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51513) in GitLab 13.9. | ||||
| > - Deployed behind a feature flag, enabled by default. | ||||
| > - Enabled on GitLab.com. | ||||
| > - Recommended for production use. | ||||
| > - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-file-views). **(FREE SELF)** | ||||
| 
 | ||||
| When reviewing a merge request with many files multiple times, it may be useful to the reviewer | ||||
| to focus on new changes and ignore the files that they have already reviewed and don't want to | ||||
| see anymore unless they are changed again. | ||||
| 
 | ||||
| To mark a file as viewed: | ||||
| 
 | ||||
| 1. Go to the merge request's **Diffs** tab. | ||||
| 1. On the right-top of the file, locate the **Viewed** checkbox. | ||||
| 1. Select it to mark the file as viewed. | ||||
| 
 | ||||
| Once checked, the file remains marked for that reviewer unless there are newly introduced | ||||
| changes to its content or the checkbox is unchecked. | ||||
| 
 | ||||
| ### Enable or disable file views **(FREE SELF)** | ||||
| 
 | ||||
| The file view feature is under development but ready for production use. | ||||
| It is deployed behind a feature flag that is **enabled by default**. | ||||
| [GitLab administrators with access to the GitLab Rails console](../../../administration/feature_flags.md) | ||||
| can opt to enable it for your instance. | ||||
| 
 | ||||
| To enable it: | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.enable(:local_file_reviews) | ||||
| ``` | ||||
| 
 | ||||
| To disable it: | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.disable(:local_file_reviews) | ||||
| ``` | ||||
|  | @ -70,7 +70,7 @@ After you have created the merge request, you can also: | |||
| - Preview continuous integration [pipelines on the merge request widget](reviews/index.md#pipeline-status-in-merge-requests-widgets). | ||||
| - Preview how your changes look directly on your deployed application with [Review Apps](reviews/index.md#live-preview-with-review-apps). | ||||
| - [Allow collaboration on merge requests across forks](allow_collaboration.md). | ||||
| - Perform a [Review](../../discussions/index.md#merge-request-reviews) to create multiple comments on a diff and publish them when you're ready. | ||||
| - Perform a [Review](reviews/index.md) to create multiple comments on a diff and publish them when you're ready. | ||||
| - Add [code suggestions](reviews/suggestions.md) to change the content of merge requests directly into merge request threads, and easily apply them to the codebase directly from the UI. | ||||
| - Add a time estimation and the time spent with that merge request with [Time Tracking](../time_tracking.md#time-tracking). | ||||
| 
 | ||||
|  |  | |||
| Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB | 
| Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB | 
| Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB | 
| Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB | 
| Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB | 
|  | @ -8,7 +8,6 @@ type: index, reference | |||
| # Merge requests **(FREE)** | ||||
| 
 | ||||
| Merge requests (MRs) are the way you check source code changes into a branch. | ||||
| 
 | ||||
| When you open a merge request, you can visualize and collaborate on the code changes before merge. | ||||
| Merge requests include: | ||||
| 
 | ||||
|  | @ -18,6 +17,11 @@ Merge requests include: | |||
| - A comment section for discussion threads. | ||||
| - The list of commits. | ||||
| 
 | ||||
| Merge requests contain tabs at the top of the page to help you navigate to | ||||
| important parts of the merge request: **Overview**, **Commits**, **Pipelines**, and **Changes**. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| To get started, read the [introduction to merge requests](getting_started.md). | ||||
| 
 | ||||
| ## Merge request workflows | ||||
|  | @ -47,28 +51,6 @@ For a web developer writing a webpage for your company's website: | |||
| 1. Once approved, your merge request is [squashed and merged](squash_and_merge.md), and [deployed to staging with GitLab Pages](https://about.gitlab.com/blog/2021/02/05/ci-deployment-and-environments/). | ||||
| 1. Your production team [cherry picks](cherry_pick_changes.md) the merge commit into production. | ||||
| 
 | ||||
| ## Merge request navigation tabs at the top | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33813) in GitLab 12.6. This positioning is experimental. | ||||
| 
 | ||||
| In GitLab 12.5 and earlier, navigation tabs in merge requests (**Discussion**, | ||||
| **Commits**, **Pipelines**, and **Changes**) were located after the merge request | ||||
| widget. | ||||
| 
 | ||||
| To facilitate navigation without scrolling, and based on user feedback, the tabs are | ||||
| now located at the top of the merge request tab. A new **Overview** tab was added, | ||||
| and next to **Overview** are **Commits**, **Pipelines**, and **Changes**. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| This change is behind a feature flag that is enabled by default. For | ||||
| self-managed instances, it can be disabled through the Rails console by a GitLab | ||||
| administrator with the following command: | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.disable(:mr_tabs_position) | ||||
| ``` | ||||
| 
 | ||||
| ## Related topics | ||||
| 
 | ||||
| - [Create a merge request](creating_merge_requests.md) | ||||
|  |  | |||
| Before Width: | Height: | Size: 88 KiB | 
| Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB | 
| Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB | 
| Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB | 
| Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB | 
| Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB | 
| Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB | 
|  | @ -5,61 +5,95 @@ info: To determine the technical writer assigned to the Stage/Group associated w | |||
| type: index, reference | ||||
| --- | ||||
| 
 | ||||
| # Reviewing and managing merge requests **(FREE)** | ||||
| # Review and manage merge requests **(FREE)** | ||||
| 
 | ||||
| Merge requests are the primary method of making changes to files in a GitLab project. | ||||
| Changes are proposed by [creating and submitting a merge request](../creating_merge_requests.md), | ||||
| which is then reviewed, and accepted (or rejected). | ||||
| [Merge requests](../index.md) are the primary method of making changes to files in a | ||||
| GitLab project. [Create and submit a merge request](../creating_merge_requests.md) | ||||
| to propose changes. Your team makes [suggestions](suggestions.md) and leaves | ||||
| [comments](../../../discussions/index.md). When your work is reviewed, your team | ||||
| members can choose to accept or reject it. | ||||
| 
 | ||||
| ## View project merge requests | ||||
| ## View merge requests | ||||
| 
 | ||||
| View all the merge requests in a project by navigating to **Project > Merge Requests**. | ||||
| You can view merge requests for a specific project, or for all projects in a group: | ||||
| 
 | ||||
| When you access your project's merge requests, GitLab displays them in a list. | ||||
| Use the tabs to quickly filter by open and closed. You can also [search and filter the results](../../../search/index.md#filtering-issue-and-merge-request-lists). | ||||
| - **Specific project**: Go to your project and select **Merge Requests**. | ||||
| - **All projects in a group**: Go to your group and select **Merge Requests**. | ||||
|   If your group contains subgroups, this view also displays merge requests from the subgroup projects. | ||||
|   GitLab displays a count of open merge requests in the left sidebar, but | ||||
|   [caches the value](#cached-merge-request-count) for groups with a large number of | ||||
|   open merge requests. | ||||
| 
 | ||||
| GitLab displays open merge requests, with tabs to filter the list by open and closed status: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## View merge requests for all projects in a group | ||||
| You can [search and filter](../../../search/index.md#filtering-issue-and-merge-request-lists), | ||||
| the results, or select a merge request to begin a review. | ||||
| 
 | ||||
| View merge requests in all projects in the group, including all projects of all descendant subgroups of the group. Navigate to **Group > Merge Requests** to view these merge requests. This view also has the open and closed merge requests tabs. | ||||
| ## Review a merge request | ||||
| 
 | ||||
| You can [search and filter the results](../../../search/index.md#filtering-issue-and-merge-request-lists) from here. | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/4213) in GitLab Premium 11.4. | ||||
| > - [Moved](https://gitlab.com/gitlab-org/gitlab/-/issues/28154) to GitLab Free in 13.1. | ||||
| 
 | ||||
|  | ||||
| When you review a merge request, you can create comments that are visible only | ||||
| to you. When you're ready, you can publish them together in a single action. | ||||
| To start your review: | ||||
| 
 | ||||
| ## Cached merge request count | ||||
| 1. Go to the merge request you want to review, and select the **Changes** tab. | ||||
|    To learn more about navigating the diffs displayed in this tab, read | ||||
|    [Changes tab in merge requests](../changes.md). | ||||
| 1. Select a line of code. In GitLab version 13.2 and later, you can [highlight a set of lines](#comment-on-multiple-lines). | ||||
| 1. Write your first comment, and select **Start a review** below your comment: | ||||
|     | ||||
| 1. Continue adding comments to lines of code, and select the appropriate button after | ||||
|    you write a comment: | ||||
|    - **Add to review**: Keep this comment private and add to the current review. | ||||
|      These review comments are marked **Pending** and are visible only to you. | ||||
|    - **Add comment now**: Submits the specific comment as a regular comment instead of as part of the review. | ||||
| 1. (Optional) You can use [quick actions](../../quick_actions.md) inside review comments. | ||||
|    The comment shows the actions to perform after publication, but does not perform them | ||||
|    until you submit your review. | ||||
| 1. When your review is complete, you can [submit the review](#submit-a-review). Your comments | ||||
|    are now visible, and any quick actions included your comments are performed. | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/299542) in GitLab 13.11. | ||||
| > - It's [deployed behind a feature flag](../../../feature_flags.md), enabled by default. | ||||
| > - It's enabled on GitLab.com. | ||||
| > - It's recommended for production use. | ||||
| > - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-cached-merge-request-count). | ||||
| ### Submit a review | ||||
| 
 | ||||
| WARNING: | ||||
| This feature might not be available to you. Check the **version history** note above for details. | ||||
| You can submit your completed review in multiple ways: | ||||
| 
 | ||||
| In a group, the sidebar displays the total count of open merge requests and this value is cached if higher | ||||
| than 1000. The cached value is rounded to thousands (or millions) and updated every 24 hours. | ||||
| - Use the `/submit_review` [quick action](../../quick_actions.md) in the text of a non-review comment. | ||||
| - When creating a review comment, select **Submit review**. | ||||
| - Scroll to the bottom of the screen and select **Submit review**. | ||||
| 
 | ||||
| ### Enable or disable cached merge request count **(FREE SELF)** | ||||
| When you submit your review, GitLab: | ||||
| 
 | ||||
| Cached merge request count in the left sidebar is under development but ready for production use. It is | ||||
| deployed behind a feature flag that is **enabled by default**. | ||||
| [GitLab administrators with access to the GitLab Rails console](../../../../administration/feature_flags.md) | ||||
| can disable it. | ||||
| - Publishes the comments in your review. | ||||
| - Sends a single email to every notifiable user of the merge request, with your | ||||
|   review comments attached. Replying to this email creates a new comment on the merge request. | ||||
| - Perform any quick actions you added to your review comments. | ||||
| 
 | ||||
| To disable it: | ||||
| ### Resolving/Unresolving threads | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.disable(:cached_sidebar_merge_requests_count) | ||||
| ``` | ||||
| Review comments can also resolve or unresolve [resolvable threads](../../../discussions/index.md#resolvable-comments-and-threads). | ||||
| When replying to a comment, a checkbox is displayed to resolve or unresolve | ||||
| the thread after publication. | ||||
| 
 | ||||
| To enable it: | ||||
|  | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.enable(:cached_sidebar_merge_requests_count) | ||||
| ``` | ||||
| If a particular pending comment resolves or unresolves the thread, this is shown on the pending | ||||
| comment itself. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Adding a new comment | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/8225) in GitLab 13.10. | ||||
| 
 | ||||
| If you have a review in progress, you will be presented with the option to **Add to review**: | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## Semi-linear history merge requests | ||||
| 
 | ||||
|  | @ -70,151 +104,6 @@ succeeded, the target branch build also succeeds after the merge. | |||
| Navigate to a project's settings, select the **Merge commit with semi-linear history** | ||||
| option under **Merge Requests: Merge method** and save your changes. | ||||
| 
 | ||||
| ## View changes between file versions | ||||
| 
 | ||||
| The **Changes** tab, below the main merge request details and next to the discussion tab, | ||||
| shows the changes to files between branches or commits. This view of changes to a | ||||
| file is also known as a **diff**. By default, the diff view compares the file in the | ||||
| merge request branch and the file in the target branch. | ||||
| 
 | ||||
| The diff view includes the following: | ||||
| 
 | ||||
| - The file's name and path. | ||||
| - The number of lines added and deleted. | ||||
| - Buttons for the following options: | ||||
|   - Toggle comments for this file; useful for inline reviews. | ||||
|   - Edit the file in the merge request's branch. | ||||
|   - Show full file, in case you want to look at the changes in context with the rest of the file. | ||||
|   - View file at the current commit. | ||||
|   - Preview the changes with [Review Apps](../../../../ci/review_apps/index.md). | ||||
| - The changed lines, with the specific changes highlighted. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Merge request diff file navigation | ||||
| 
 | ||||
| When reviewing changes in the **Changes** tab the diff can be navigated using | ||||
| the file tree or file list. As you scroll through large diffs with many | ||||
| changes, you can quickly jump to any changed file using the file tree or file | ||||
| list. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Collapsed files in the Changes view | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/232820) in GitLab 13.4. | ||||
| 
 | ||||
| When you review changes in the **Changes** tab, files with a large number of changes are collapsed | ||||
| to improve performance. When files are collapsed, a warning appears at the top of the changes. | ||||
| Click **Expand file** on any file to view the changes for that file. | ||||
| 
 | ||||
| ### File-by-file diff navigation | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/222790) in GitLab 13.2. | ||||
| > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/229848) in GitLab 13.7. | ||||
| 
 | ||||
| For larger merge requests, consider reviewing one file at a time. To enable this feature: | ||||
| 
 | ||||
| 1. In the top-right corner, select your avatar. | ||||
| 1. Select **Preferences**. | ||||
| 1. Scroll to the **Behavior** section and select **Show one file at a time on merge request's Changes tab**. | ||||
| 1. Select **Save changes**. | ||||
| 
 | ||||
| After you enable this setting, GitLab displays only one file at a time in the **Changes** tab when you review merge requests. You can click **Prev** and **Next** to view other changed files. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| In [GitLab 13.7](https://gitlab.com/gitlab-org/gitlab/-/issues/233898) and later, if you want to change | ||||
| this behavior, you can do so from your **User preferences** (as explained above) or directly in a | ||||
| merge request: | ||||
| 
 | ||||
| 1. Go to the merge request's **Changes** tab. | ||||
| 1. Select the cog icon (**{settings}**) to reveal the merge request's settings dropdown. | ||||
| 1. Select or deselect the checkbox **Show one file at a time** to change the setting accordingly. | ||||
| 
 | ||||
| This change overrides the choice you made in your user preferences and persists until you clear your | ||||
| browser's cookies or change this behavior again. | ||||
| 
 | ||||
| ### Merge requests commit navigation | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/18140) in GitLab 13.0. | ||||
| 
 | ||||
| To seamlessly navigate among commits in a merge request: | ||||
| 
 | ||||
| 1. Select the **Commits** tab. | ||||
| 1. Select a commit to open it in the single-commit view. | ||||
| 1. Navigate through the commits by either: | ||||
| 
 | ||||
|    - Selecting **Prev** and **Next** buttons below the tab buttons. | ||||
|    - Using the <kbd>X</kbd> and <kbd>C</kbd> keyboard shortcuts. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| ### Incrementally expand merge request diffs | ||||
| 
 | ||||
| By default, the diff shows only the parts of a file which are changed. | ||||
| To view more unchanged lines above or below a change click on the | ||||
| **Expand up** or **Expand down** icons. You can also click on **Show unchanged lines** | ||||
| to expand the entire file. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| In GitLab [versions 13.1 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/205401), when viewing a | ||||
| merge request's **Changes** tab, if a certain file was only renamed, you can expand it to see the | ||||
| entire content by clicking **Show file contents**. | ||||
| 
 | ||||
| ### Ignore whitespace changes in Merge Request diff view | ||||
| 
 | ||||
| If you click the **Hide whitespace changes** button, you can see the diff | ||||
| without whitespace changes (if there are any). This is also working when on a | ||||
| specific commit page. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| NOTE: | ||||
| You can append `?w=1` while on the diffs page of a merge request to ignore any | ||||
| whitespace changes. | ||||
| 
 | ||||
| ## Mark files as viewed | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/51513) in GitLab 13.9. | ||||
| > - It's deployed behind a feature flag, enabled by default. | ||||
| > - It's enabled on GitLab.com. | ||||
| > - It's recommended for production use. | ||||
| > - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-file-views). **(FREE SELF)** | ||||
| 
 | ||||
| When reviewing a merge request with many files multiple times, it may be useful to the reviewer | ||||
| to focus on new changes and ignore the files that they have already reviewed and don't want to | ||||
| see anymore unless they are changed again. | ||||
| 
 | ||||
| To mark a file as viewed: | ||||
| 
 | ||||
| 1. Go to the merge request's **Diffs** tab. | ||||
| 1. On the right-top of the file, locate the **Viewed** checkbox. | ||||
| 1. Check it to mark the file as viewed. | ||||
| 
 | ||||
| Once checked, the file remains marked for that reviewer unless there are newly introduced | ||||
| changes to its content or the checkbox is unchecked. | ||||
| 
 | ||||
| ### Enable or disable file views **(FREE SELF)** | ||||
| 
 | ||||
| The file view feature is under development but ready for production use. | ||||
| It is deployed behind a feature flag that is **enabled by default**. | ||||
| [GitLab administrators with access to the GitLab Rails console](../../../../administration/feature_flags.md) | ||||
| can opt to enable it for your instance. | ||||
| 
 | ||||
| To enable it: | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.enable(:local_file_reviews) | ||||
| ``` | ||||
| 
 | ||||
| To disable it: | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.disable(:local_file_reviews) | ||||
| ``` | ||||
| 
 | ||||
| ## Perform inline code reviews | ||||
| 
 | ||||
| > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/13950) in GitLab 11.5. | ||||
|  | @ -222,11 +111,11 @@ Feature.disable(:local_file_reviews) | |||
| In a merge request, you can leave comments in any part of the file being changed. | ||||
| In the Merge Request Diff UI, you can: | ||||
| 
 | ||||
| - **Comment on a single line**: Click the **{comment}** **comment** icon in the | ||||
| - **Comment on a single line**: Select the **{comment}** **comment** icon in the | ||||
|   gutter to expand the diff lines and display a comment box. | ||||
| - [**Comment on multiple lines**](#commenting-on-multiple-lines). | ||||
| - [**Comment on multiple lines**](#comment-on-multiple-lines). | ||||
| 
 | ||||
| ### Commenting on multiple lines | ||||
| ### Comment on multiple lines | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/ux-research/-/issues/870) in GitLab 13.2. | ||||
| > - [Added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49875) click-and-drag features in GitLab 13.8. | ||||
|  | @ -237,9 +126,9 @@ to by either: | |||
| 
 | ||||
|  | ||||
| 
 | ||||
| - Clicking and dragging the **{comment}** **comment** icon in the gutter to highlight | ||||
| - Dragging the **{comment}** **comment** icon in the gutter to highlight | ||||
|   lines in the diff. GitLab expands the diff lines and displays a comment box. | ||||
| - After starting a comment by clicking the **{comment}** **comment** icon in the | ||||
| - After starting a comment by selecting the **{comment}** **comment** icon in the | ||||
|   gutter, select the first line number your comment refers to in the **Commenting on lines** | ||||
|   select box. New comments default to single-line comments, unless you select | ||||
|   a different starting line. | ||||
|  | @ -305,7 +194,7 @@ These features are associated with merge requests: | |||
| - [Bulk editing merge requests](../../../project/bulk_editing.md): | ||||
|   Update the attributes of multiple merge requests simultaneously. | ||||
| - [Cherry-pick changes](../cherry_pick_changes.md): | ||||
|   Cherry-pick any commit in the UI by clicking the **Cherry-pick** button in a merged merge requests or a commit. | ||||
|   Cherry-pick any commit in the UI by selecting the **Cherry-pick** button in a merged merge requests or a commit. | ||||
| - [Fast-forward merge requests](../fast_forward_merge.md): | ||||
|   For a linear Git history and a way to accept merge requests without creating merge commits | ||||
| - [Find the merge request that introduced a change](../versions.md): | ||||
|  | @ -355,27 +244,27 @@ the command line. | |||
| The merge request sidebar contains the branch reference for the source branch | ||||
| used to contribute changes for this merge request. | ||||
| 
 | ||||
| To copy the branch reference into your clipboard, click the **Copy branch name** button | ||||
| To copy the branch reference into your clipboard, select the **Copy branch name** button | ||||
| (**{copy-to-clipboard}**) in the right sidebar. Use it to checkout the branch locally | ||||
| via command line by running `git checkout <branch-name>`. | ||||
| from the command line by running `git checkout <branch-name>`. | ||||
| 
 | ||||
| ### Checkout merge requests locally through the `head` ref | ||||
| 
 | ||||
| A merge request contains all the history from a repository, plus the additional | ||||
| commits added to the branch associated with the merge request. Here's a few | ||||
| ways to checkout a merge request locally. | ||||
| ways to check out a merge request locally. | ||||
| 
 | ||||
| You can checkout a merge request locally even if the source | ||||
| You can check out a merge request locally even if the source | ||||
| project is a fork (even a private fork) of the target project. | ||||
| 
 | ||||
| This relies on the merge request `head` ref (`refs/merge-requests/:iid/head`) | ||||
| that is available for each merge request. It allows checking out a merge | ||||
| request via its ID instead of its branch. | ||||
| request by using its ID instead of its branch. | ||||
| 
 | ||||
| [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/223156) in GitLab | ||||
| 13.4, 14 days after a merge request gets closed or merged, the merge request | ||||
| `head` ref is deleted. This means that the merge request is not available | ||||
| for local checkout via the merge request `head` ref anymore. The merge request | ||||
| `head` ref is deleted. This means that the merge request isn't available | ||||
| for local checkout from the merge request `head` ref anymore. The merge request | ||||
| can still be re-opened. If the merge request's branch | ||||
| exists, you can still check out the branch, as it isn't affected. | ||||
| 
 | ||||
|  | @ -450,3 +339,36 @@ git checkout origin/merge-requests/1 | |||
| ``` | ||||
| 
 | ||||
| All the above can be done with the [`git-mr`](https://gitlab.com/glensc/git-mr) script. | ||||
| 
 | ||||
| ## Cached merge request count | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/299542) in GitLab 13.11. | ||||
| > - It's [deployed behind a feature flag](../../../feature_flags.md), enabled by default. | ||||
| > - It's enabled on GitLab.com. | ||||
| > - It's recommended for production use. | ||||
| > - For GitLab self-managed instances, GitLab administrators can opt to [disable it](#enable-or-disable-cached-merge-request-count). | ||||
| 
 | ||||
| WARNING: | ||||
| This feature might not be available to you. Refer to the previous **version history** note for details. | ||||
| 
 | ||||
| In a group, the sidebar displays the total count of open merge requests. This value is cached if it's greater than | ||||
| than 1000. The cached value is rounded to thousands (or millions) and updated every 24 hours. | ||||
| 
 | ||||
| ### Enable or disable cached merge request count **(FREE SELF)** | ||||
| 
 | ||||
| Cached merge request count in the left sidebar is under development but ready for production use. It is | ||||
| deployed behind a feature flag that is **enabled by default**. | ||||
| [GitLab administrators with access to the GitLab Rails console](../../../../administration/feature_flags.md) | ||||
| can disable it. | ||||
| 
 | ||||
| To disable it: | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.disable(:cached_sidebar_merge_requests_count) | ||||
| ``` | ||||
| 
 | ||||
| To enable it: | ||||
| 
 | ||||
| ```ruby | ||||
| Feature.enable(:cached_sidebar_merge_requests_count) | ||||
| ``` | ||||
|  |  | |||
|  | @ -5,21 +5,19 @@ info: To determine the technical writer assigned to the Stage/Group associated w | |||
| type: index, reference | ||||
| --- | ||||
| 
 | ||||
| # Suggest Changes | ||||
| # Suggest changes **(FREE)** | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/18008) in GitLab 11.6. | ||||
| > - Custom commit messages for suggestions was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25381) in GitLab 13.9 behind a [feature flag](../../../feature_flags.md), disabled by default. | ||||
| > - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/297404) in GitLab 13.10. | ||||
| 
 | ||||
| As a reviewer, you're able to suggest code changes with a | ||||
| Markdown syntax in merge request diff threads. Then, the | ||||
| merge request author (or other users with appropriate | ||||
| [permission](../../../permissions.md)) is able to apply these | ||||
| Suggestions with a click, which generates a commit in | ||||
| the merge request authored by the user that applied them. | ||||
| As a reviewer, you're able to suggest code changes with a Markdown syntax in merge request | ||||
| diff threads. Then, the merge request author (or other users with appropriate | ||||
| [permission](../../../permissions.md)) is able to apply these suggestions with a click, | ||||
| which generates a commit in the merge request authored by the user that applied them. | ||||
| 
 | ||||
| 1. Choose a line of code to be changed, add a new comment, then click | ||||
|    on the **Insert suggestion** icon in the toolbar: | ||||
| 1. Choose a line of code to be changed, add a new comment, then select | ||||
|    the **Insert suggestion** icon in the toolbar: | ||||
| 
 | ||||
|     | ||||
| 
 | ||||
|  | @ -27,9 +25,10 @@ the merge request authored by the user that applied them. | |||
| 
 | ||||
|     | ||||
| 
 | ||||
| 1. Click either **Start a review** or **Add to review** to add your comment to a [review](index.md), or **Add comment now** to add the comment to the thread immediately. | ||||
| 1. Select either **Start a review** or **Add to review** to add your comment to a | ||||
|    [review](index.md), or **Add comment now** to add the comment to the thread immediately. | ||||
| 
 | ||||
|    The Suggestion in the comment can be applied by the merge request author | ||||
|    The suggestion in the comment can be applied by the merge request author | ||||
|    directly from the merge request: | ||||
| 
 | ||||
|     | ||||
|  | @ -40,34 +39,34 @@ the merge request authored by the user that applied them. | |||
| 
 | ||||
|     | ||||
| 
 | ||||
| After the author applies a Suggestion, it is marked with the **Applied** label, | ||||
| After the author applies a suggestion, it's marked with the **Applied** label, | ||||
| the thread is automatically resolved, and GitLab creates a new commit | ||||
| and push the suggested change directly into the codebase in the merge request's | ||||
| and pushes the suggested change directly into the codebase in the merge request's | ||||
| branch. [Developer permission](../../../permissions.md) is required to do so. | ||||
| 
 | ||||
| ## Multi-line Suggestions | ||||
| ## Multi-line suggestions | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/53310) in GitLab 11.10. | ||||
| 
 | ||||
| Reviewers can also suggest changes to multiple lines with a single Suggestion | ||||
| Reviewers can also suggest changes to multiple lines with a single suggestion | ||||
| within merge request diff threads by adjusting the range offsets. The | ||||
| offsets are relative to the position of the diff thread, and specify the | ||||
| range to be replaced by the suggestion when it is applied. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| In the example above, the Suggestion covers three lines above and four lines | ||||
| In the previous example, the suggestion covers three lines above and four lines | ||||
| below the commented line. When applied, it would replace from 3 lines _above_ | ||||
| to 4 lines _below_ the commented line, with the suggested change. | ||||
| 
 | ||||
|  | ||||
| 
 | ||||
| NOTE: | ||||
| Suggestions covering multiple lines are limited to 100 lines _above_ and 100 | ||||
| lines _below_ the commented diff line, allowing up to 200 changed lines per | ||||
| Suggestions for multiple lines are limited to 100 lines _above_ and 100 | ||||
| lines _below_ the commented diff line. This allows for up to 200 changed lines per | ||||
| suggestion. | ||||
| 
 | ||||
| ## Code block nested in Suggestions | ||||
| ## Code block nested in suggestions | ||||
| 
 | ||||
| If you need to make a suggestion that involves a | ||||
| [fenced code block](../../../markdown.md#code-spans-and-blocks), wrap your suggestion in four backticks | ||||
|  | @ -77,43 +76,44 @@ instead of the usual three. | |||
| 
 | ||||
|  | ||||
| 
 | ||||
| ## Configure the commit message for applied Suggestions | ||||
| ## Configure the commit message for applied suggestions | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13086) in GitLab 12.7. | ||||
| 
 | ||||
| GitLab uses a default commit message | ||||
| when applying Suggestions: `Apply %{suggestions_count} suggestion(s) to %{files_count} file(s)` | ||||
| when applying suggestions: `Apply %{suggestions_count} suggestion(s) to %{files_count} file(s)` | ||||
| 
 | ||||
| For example, consider that a user applied 3 suggestions to 2 different files, the default commit message is: **Apply 3 suggestion(s) to 2 file(s)** | ||||
| For example, consider that a user applied 3 suggestions to 2 different files, the | ||||
| default commit message is: **Apply 3 suggestion(s) to 2 file(s)** | ||||
| 
 | ||||
| These commit messages can be customized to follow any guidelines you might have. To do so, expand the **Merge requests** | ||||
| tab within your project's **General** settings and change the | ||||
| **Merge suggestions** text: | ||||
| These commit messages can be customized to follow any guidelines you might have. | ||||
| To do so, expand the **Merge requests** tab within your project's **General** | ||||
| settings and change the **Merge suggestions** text: | ||||
| 
 | ||||
|  | ||||
|  | ||||
| 
 | ||||
| You can also use following variables besides static text: | ||||
| 
 | ||||
| | Variable               | Description | Output example | | ||||
| |------------------------|-------------|----------------| | ||||
| | `%{branch_name}`       | The name of the branch the Suggestion(s) was(were) applied to. | `my-feature-branch` | | ||||
| | `%{files_count}`       | The number of file(s) to which Suggestion(s) was(were) applied.| **2** | | ||||
| | `%{file_paths}`        | The path(s) of the file(s) Suggestion(s) was(were) applied to. Paths are separated by commas.| `docs/index.md, docs/about.md` | | ||||
| | `%{branch_name}`       | The name of the branch the suggestion(s) was(were) applied to. | `my-feature-branch` | | ||||
| | `%{files_count}`       | The number of file(s) to which suggestion(s) was(were) applied.| **2** | | ||||
| | `%{file_paths}`        | The path(s) of the file(s) suggestion(s) was(were) applied to. Paths are separated by commas.| `docs/index.md, docs/about.md` | | ||||
| | `%{project_path}`      | The project path. | `my-group/my-project` | | ||||
| | `%{project_name}`      | The human-readable name of the project. | **My Project** | | ||||
| | `%{suggestions_count}` | The number of Suggestions applied.| **3** | | ||||
| | `%{username}`          | The username of the user applying Suggestion(s). | `user_1` | | ||||
| | `%{user_full_name}`    | The full name of the user applying Suggestion(s). | **User 1** | | ||||
| | `%{suggestions_count}` | The number of suggestions applied.| **3** | | ||||
| | `%{username}`          | The username of the user applying suggestion(s). | `user_1` | | ||||
| | `%{user_full_name}`    | The full name of the user applying suggestion(s). | **User 1** | | ||||
| 
 | ||||
| For example, to customize the commit message to output | ||||
| **Addresses user_1's review**, set the custom text to | ||||
| `Addresses %{username}'s review`. | ||||
| 
 | ||||
| NOTE: | ||||
| Custom commit messages for each applied Suggestion is | ||||
| Custom commit messages for each applied suggestion is | ||||
| introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381). | ||||
| 
 | ||||
| ## Batch Suggestions | ||||
| ## Batch suggestions | ||||
| 
 | ||||
| > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) in GitLab 13.1 as an [alpha feature](https://about.gitlab.com/handbook/product/gitlab-the-product/#alpha) behind a feature flag, disabled by default. | ||||
| > - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/227799) in GitLab 13.2. | ||||
|  | @ -122,7 +122,7 @@ introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381). | |||
| You can apply multiple suggestions at once to reduce the number of commits added | ||||
| to your branch to address your reviewers' requests. | ||||
| 
 | ||||
| 1. To start a batch of suggestions to apply with a single commit, click **Add suggestion to batch**: | ||||
| 1. To start a batch of suggestions to apply with a single commit, select **Add suggestion to batch**: | ||||
| 
 | ||||
|     | ||||
| 
 | ||||
|  | @ -130,11 +130,11 @@ to your branch to address your reviewers' requests. | |||
| 
 | ||||
|     | ||||
| 
 | ||||
| 1. To remove suggestions, click **Remove from batch**: | ||||
| 1. To remove suggestions, select **Remove from batch**: | ||||
| 
 | ||||
|     | ||||
| 
 | ||||
| 1. Having added all the suggestions to your liking, when ready, click **Apply suggestions**: | ||||
| 1. Having added all the suggestions to your liking, when ready, select **Apply suggestions**: | ||||
| 
 | ||||
|     | ||||
| 
 | ||||
|  |  | |||
|  | @ -14,6 +14,21 @@ module API | |||
|       def import_params | ||||
|         declared_params(include_missing: false) | ||||
|       end | ||||
| 
 | ||||
|       def namespace_from(params, current_user) | ||||
|         if params[:namespace] | ||||
|           find_namespace!(params[:namespace]) | ||||
|         else | ||||
|           current_user.namespace | ||||
|         end | ||||
|       end | ||||
| 
 | ||||
|       def filtered_override_params(params) | ||||
|         override_params = params.delete(:override_params) | ||||
|         filter_attributes_using_license!(override_params) if override_params | ||||
| 
 | ||||
|         override_params | ||||
|       end | ||||
|     end | ||||
| 
 | ||||
|     before do | ||||
|  | @ -67,34 +82,25 @@ module API | |||
| 
 | ||||
|         check_rate_limit! :project_import, [current_user, :project_import] | ||||
| 
 | ||||
|         Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20823') | ||||
|         Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/21041') | ||||
| 
 | ||||
|         validate_file! | ||||
| 
 | ||||
|         namespace = if import_params[:namespace] | ||||
|                       find_namespace!(import_params[:namespace]) | ||||
|                     else | ||||
|                       current_user.namespace | ||||
|                     end | ||||
| 
 | ||||
|         project_params = { | ||||
|             path: import_params[:path], | ||||
|             namespace_id: namespace.id, | ||||
|             name: import_params[:name], | ||||
|             file: import_params[:file], | ||||
|             overwrite: import_params[:overwrite] | ||||
|         } | ||||
| 
 | ||||
|         override_params = import_params.delete(:override_params) | ||||
|         filter_attributes_using_license!(override_params) if override_params | ||||
| 
 | ||||
|         project = ::Projects::GitlabProjectsImportService.new( | ||||
|           current_user, project_params, override_params | ||||
|         response = ::Import::GitlabProjects::CreateProjectFromUploadedFileService.new( | ||||
|           current_user, | ||||
|           path: import_params[:path], | ||||
|           namespace: namespace_from(import_params, current_user), | ||||
|           name: import_params[:name], | ||||
|           file: import_params[:file], | ||||
|           overwrite: import_params[:overwrite], | ||||
|           override: filtered_override_params(import_params) | ||||
|         ).execute | ||||
| 
 | ||||
|         render_api_error!(project.errors.full_messages&.first, 400) unless project.saved? | ||||
| 
 | ||||
|         present project, with: Entities::ProjectImportStatus | ||||
|         if response.success? | ||||
|           present(response.payload, with: Entities::ProjectImportStatus) | ||||
|         else | ||||
|           render_api_error!(response.message, response.http_status) | ||||
|         end | ||||
|       end | ||||
| 
 | ||||
|       params do | ||||
|  | @ -107,6 +113,44 @@ module API | |||
|       get ':id/import' do | ||||
|         present user_project, with: Entities::ProjectImportStatus | ||||
|       end | ||||
| 
 | ||||
|       params do | ||||
|         requires :url, type: String, desc: 'The URL for the file.' | ||||
|         requires :path, type: String, desc: 'The new project path and name' | ||||
|         optional :name, type: String, desc: 'The name of the project to be imported. Defaults to the path of the project if not provided.' | ||||
|         optional :namespace, type: String, desc: "The ID or name of the namespace that the project will be imported into. Defaults to the current user's namespace." | ||||
|         optional :overwrite, type: Boolean, default: false, desc: 'If there is a project in the same namespace and with the same name overwrite it' | ||||
|         optional :override_params, | ||||
|           type: Hash, | ||||
|           desc: 'New project params to override values in the export' do | ||||
|             use :optional_project_params | ||||
|           end | ||||
|       end | ||||
|       desc 'Create a new project import using a remote object storage path' do | ||||
|         detail 'This feature was introduced in GitLab 13.2.' | ||||
|         success Entities::ProjectImportStatus | ||||
|       end | ||||
|       post 'remote-import' do | ||||
|         not_found! unless ::Feature.enabled?(:import_project_from_remote_file) | ||||
| 
 | ||||
|         check_rate_limit! :project_import, [current_user, :project_import] | ||||
| 
 | ||||
|         response = ::Import::GitlabProjects::CreateProjectFromRemoteFileService.new( | ||||
|           current_user, | ||||
|           path: import_params[:path], | ||||
|           namespace: namespace_from(import_params, current_user), | ||||
|           name: import_params[:name], | ||||
|           remote_import_url: import_params[:url], | ||||
|           overwrite: import_params[:overwrite], | ||||
|           override: filtered_override_params(import_params) | ||||
|         ).execute | ||||
| 
 | ||||
|         if response.success? | ||||
|           present(response.payload, with: Entities::ProjectImportStatus) | ||||
|         else | ||||
|           render_api_error!(response.message, response.http_status) | ||||
|         end | ||||
|       end | ||||
|     end | ||||
|   end | ||||
| end | ||||
|  |  | |||