Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-11-12 18:12:20 +00:00
parent 76cbe9e688
commit 60aef5496e
63 changed files with 131 additions and 82 deletions

View File

@ -19,10 +19,17 @@ anything_to_post = status_report.values.any? { |data| data.any? }
return unless helper.ci?
if project_helper.labels_to_add.any?
def post_labels
gitlab.api.update_merge_request(gitlab.mr_json['project_id'],
gitlab.mr_json['iid'],
add_labels: project_helper.labels_to_add.join(','))
rescue Gitlab::Error::Forbidden
labels = project_helper.labels_to_add.map { |label| %Q(~"#{label}") }
warn("This Merge Request needs to be labelled with #{labels.join(' ')}. Please request a reviewer or maintainer to add them.")
end
if project_helper.labels_to_add.any?
post_labels
end
if anything_to_post

View File

@ -38,6 +38,7 @@ gem 'omniauth-auth0', '~> 2.0.0'
gem 'omniauth-azure-activedirectory-v2', '~> 1.0'
gem 'omniauth-azure-oauth2', '~> 0.0.9' # Deprecated v1 version
gem 'omniauth-cas3', '~> 1.1.4'
gem 'omniauth-dingtalk-oauth2', '~> 1.0'
gem 'omniauth-facebook', '~> 4.0.0'
gem 'omniauth-github', '~> 1.4'
gem 'omniauth-gitlab', '~> 1.0.2'

View File

@ -841,6 +841,8 @@ GEM
addressable (~> 2.3)
nokogiri (~> 1.7, >= 1.7.1)
omniauth (~> 1.2)
omniauth-dingtalk-oauth2 (1.0.0)
omniauth-oauth2 (~> 1.7.1)
omniauth-facebook (4.0.0)
omniauth-oauth2 (~> 1.2)
omniauth-github (1.4.0)
@ -1547,6 +1549,7 @@ DEPENDENCIES
omniauth-azure-activedirectory-v2 (~> 1.0)
omniauth-azure-oauth2 (~> 0.0.9)
omniauth-cas3 (~> 1.1.4)
omniauth-dingtalk-oauth2 (~> 1.0)
omniauth-facebook (~> 4.0.0)
omniauth-github (~> 1.4)
omniauth-gitlab (~> 1.0.2)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -10,6 +10,7 @@ class Projects::BlameController < Projects::ApplicationController
before_action :authorize_download_code!
feature_category :source_code_management
urgency :low, [:show]
def show
@blob = @repository.blob_at(@commit.id, @path)

View File

@ -40,6 +40,7 @@ class Projects::BlobController < Projects::ApplicationController
track_redis_hll_event :create, :update, name: 'g_edit_by_sfe'
feature_category :source_code_management
urgency :low, [:create, :show, :edit, :update, :diff]
before_action do
push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml)

View File

@ -14,6 +14,7 @@ class Projects::BranchesController < Projects::ApplicationController
before_action :limit_diverging_commit_counts!, only: [:diverging_commit_counts]
feature_category :source_code_management
urgency :low, [:index, :diverging_commit_counts, :create, :destroy]
def index
respond_to do |format|

View File

@ -24,6 +24,7 @@ class Projects::CommitController < Projects::ApplicationController
COMMIT_DIFFS_PER_PAGE = 20
feature_category :source_code_management
urgency :low, [:pipelines, :merge_requests, :show]
def show
apply_diff_view_cookie!

View File

@ -17,6 +17,7 @@ class Projects::CommitsController < Projects::ApplicationController
before_action :set_commits, except: :commits_root
feature_category :source_code_management
urgency :low, [:signatures, :show]
def commits_root
redirect_to project_commits_path(@project, @project.default_branch)

View File

@ -21,6 +21,7 @@ class Projects::CompareController < Projects::ApplicationController
before_action :validate_refs!
feature_category :source_code_management
urgency :low, [:show, :create, :signatures]
# Diffs may be pretty chunky, the less is better in this endpoint.
# Pagination design guides: https://design.gitlab.com/components/pagination/#behavior

View File

@ -11,6 +11,7 @@ class Projects::FindFileController < Projects::ApplicationController
before_action :authorize_download_code!
feature_category :source_code_management
urgency :low, [:show, :list]
def show
return render_404 unless @repository.commit(@ref)

View File

@ -15,6 +15,7 @@ class Projects::ForksController < Projects::ApplicationController
before_action :authorize_fork_namespace!, only: [:create]
feature_category :source_code_management
urgency :low, [:index]
before_action do
push_frontend_feature_flag(:fork_project_form, @project, default_enabled: :yaml)

View File

@ -12,6 +12,7 @@ class Projects::GraphsController < Projects::ApplicationController
track_redis_hll_event :charts, name: 'p_analytics_repo'
feature_category :source_code_management
urgency :low, [:show]
def show
respond_to do |format|

View File

@ -11,6 +11,7 @@ class Projects::NetworkController < Projects::ApplicationController
before_action :assign_commit
feature_category :source_code_management
urgency :low, [:show]
def show
@url = project_network_path(@project, @ref, @options.merge(format: :json))

View File

@ -12,6 +12,7 @@ class Projects::RefsController < Projects::ApplicationController
before_action :authorize_download_code!
feature_category :source_code_management
urgency :low, [:switch, :logs_tree]
def switch
respond_to do |format|

View File

@ -12,6 +12,7 @@ module Projects
feature_category :source_code_management, [:show, :cleanup]
feature_category :continuous_delivery, [:create_deploy_token]
urgency :low, [:show]
def show
render_show

View File

@ -11,6 +11,7 @@ class Projects::TagsController < Projects::ApplicationController
before_action :authorize_admin_tag!, only: [:new, :create, :destroy]
feature_category :source_code_management
urgency :low, [:new, :show, :index]
# rubocop: disable CodeReuse/ActiveRecord
def index

View File

@ -6,6 +6,7 @@ class Projects::TemplatesController < Projects::ApplicationController
before_action :get_template_class
feature_category :source_code_management
urgency :low, [:names]
def index
templates = @template_type.template_subsets(project)

View File

@ -23,6 +23,7 @@ class Projects::TreeController < Projects::ApplicationController
end
feature_category :source_code_management
urgency :low, [:show]
def show
return render_404 unless @commit

View File

@ -52,6 +52,7 @@ class ProjectsController < Projects::ApplicationController
feature_category :team_planning, [:preview_markdown, :new_issuable_address]
feature_category :importers, [:export, :remove_export, :generate_new_export, :download_export]
feature_category :code_review, [:unfoldered_environment_names]
urgency :low, [:refs]
def index
redirect_to(current_user ? root_path : explore_root_path)

View File

@ -13,6 +13,7 @@ module Repositories
# added here as a part of the refactor, will be removed
# https://gitlab.com/gitlab-org/gitlab/-/issues/328692
delegate :deploy_token, :user, to: :authentication_result, allow_nil: true
urgency :medium, [:batch]
def batch
unless objects.present?

View File

@ -11,6 +11,8 @@ module Repositories
# added here as a part of the refactor, will be removed
# https://gitlab.com/gitlab-org/gitlab/-/issues/328692
delegate :deploy_token, :user, to: :authentication_result, allow_nil: true
urgency :medium, [:download, :upload_authorize]
urgency :low, [:upload_finalize]
def download
lfs_object = LfsObject.find_by_oid(oid)

View File

@ -8,6 +8,7 @@ module AuthHelper
azure_oauth2
bitbucket
facebook
dingtalk
github
gitlab
google_oauth2

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
module Integrations
module ReactivelyCached
extend ActiveSupport::Concern
included do
include ::ReactiveCaching
# Default cache key: class name + project_id
self.reactive_cache_key = ->(integration) { [integration.class.model_name.singular, integration.project_id] }
self.reactive_cache_work_type = :external_dependency
end
end
end

View File

@ -1,13 +0,0 @@
# frozen_string_literal: true
module ReactiveService
extend ActiveSupport::Concern
included do
include ReactiveCaching
# Default cache key: class name + project_id
self.reactive_cache_key = ->(service) { [service.class.model_name.singular, service.project_id] }
self.reactive_cache_work_type = :external_dependency
end
end

View File

@ -3,7 +3,7 @@
module Integrations
class Bamboo < BaseCi
include ActionView::Helpers::UrlHelper
include ReactiveService
include ReactivelyCached
prop_accessor :bamboo_url, :build_key, :username, :password

View File

@ -5,7 +5,7 @@ require "addressable/uri"
module Integrations
class Buildkite < BaseCi
include HasWebHook
include ReactiveService
include ReactivelyCached
extend Gitlab::Utils::Override
ENDPOINT = "https://buildkite.com"

View File

@ -3,7 +3,7 @@
module Integrations
class DroneCi < BaseCi
include HasWebHook
include ReactiveService
include ReactivelyCached
include ServicePushDataValidations
extend Gitlab::Utils::Override

View File

@ -2,7 +2,7 @@
module Integrations
class Teamcity < BaseCi
include ReactiveService
include ReactivelyCached
include ServicePushDataValidations
prop_accessor :teamcity_url, :build_type, :username, :password

View File

@ -7,10 +7,6 @@
= link_to _("New snippet"), new_snippet_path, class: "gl-button btn btn-confirm", title: _("New snippet")
.top-area
%ul.nav-links.nav.nav-tabs
= nav_link(page: dashboard_snippets_path, html_options: {class: 'home'}) do
= link_to dashboard_snippets_path, title: 'Your snippets', data: {placement: 'right'} do
Your snippets
= nav_link(page: explore_snippets_path) do
= link_to explore_snippets_path, title: 'Explore snippets', data: {placement: 'right'} do
Explore snippets
= gl_tabs_nav({ class: 'gl-border-0' }) do
= gl_tab_link_to _('Your snippets'), dashboard_snippets_path, { title: _('Your snippets') }
= gl_tab_link_to _('Explore snippets'), explore_snippets_path, { title: _('Explore snippets') }

View File

@ -14,8 +14,6 @@
= link_to s_('DashboardProjects|All'), dashboard_projects_path, class: params[:personal].present? ? inactive_class : active_class
= link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), class: params[:personal].present? ? active_class : inactive_class
- else
%ul.nav-links.mobile-separator.nav.nav-tabs
= nav_link(html_options: { class: ("active" unless params[:personal].present?) }) do
= link_to s_('DashboardProjects|All'), dashboard_projects_path
= nav_link(html_options: { class: ("active" if params[:personal].present?) }) do
= link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true)
= gl_tabs_nav do
= gl_tab_link_to s_('DashboardProjects|All'), dashboard_projects_path, { item_active: params[:personal].blank? }
= gl_tab_link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), { item_active: params[:personal].present? }

View File

@ -7,7 +7,7 @@
.gl-text-center.gl-bg-gray-10.gl-pb-2.gl-pt-6
.gl-pb-5.gl-align-items-center.gl-justify-content-center.gl-display-flex
.avatar-container.s60.gl-flex-shrink-0
.avatar-container.rect-avatar.s60.gl-flex-shrink-0
= topic_icon(@topic, alt: _('Topic avatar'), class: 'avatar topic-avatar s60')
- if @topic.name.length > max_topic_name_length
%h1.gl-mt-3.str-truncated.has-tooltip{ title: @topic.name }

View File

@ -1,14 +1,10 @@
- subscribed = params[:subscribed]
.top-area.adjust
%ul.nav-links.nav.nav-tabs
%li{ class: active_when(subscribed != 'true') }>
= link_to labels_filter_path do
= _('All')
= gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-0' }) do
= gl_tab_link_to _('All'), labels_filter_path, { item_active: subscribed != 'true' }
- if current_user
%li{ class: active_when(subscribed == 'true') }>
= link_to labels_filter_path(subscribed: 'true') do
= _('Subscribed')
= gl_tab_link_to _('Subscribed'), labels_filter_path(subscribed: 'true'), { item_active: subscribed == 'true' }
.nav-controls
= form_tag labels_filter_path, method: :get do
= hidden_field_tag :subscribed, params[:subscribed]

View File

@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/344216
milestone: '14.4'
type: development
group: group::package
default_enabled: false
default_enabled: true

View File

@ -1024,6 +1024,9 @@ production: &base
# - { name: 'bitbucket',
# app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET' }
# - { name: 'dingtalk',
# app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET' }
# - { name: 'gitlab',
# app_id: 'YOUR_APP_ID',
# app_secret: 'YOUR_APP_SECRET',
@ -1515,6 +1518,9 @@ test:
- { name: 'bitbucket',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
- { name: 'dingtalk',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' }
- { name: 'gitlab',
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',

View File

@ -0,0 +1,9 @@
# frozen_string_literal: true
class AddHasShimoToProjectSettings < Gitlab::Database::Migration[1.0]
enable_lock_retries!
def change
add_column :project_settings, :has_shimo, :boolean, default: false, null: false
end
end

View File

@ -0,0 +1 @@
54b83ba1f8e8aa8a23f230664bcd6cc068a2df2d669e395713f0805d0f054f9c

View File

@ -18302,6 +18302,7 @@ CREATE TABLE project_settings (
previous_default_branch text,
warn_about_potentially_unwanted_characters boolean DEFAULT true NOT NULL,
merge_commit_template text,
has_shimo boolean DEFAULT false NOT NULL,
CONSTRAINT check_3a03e7557a CHECK ((char_length(previous_default_branch) <= 4096)),
CONSTRAINT check_bde223416c CHECK ((show_default_award_emojis IS NOT NULL)),
CONSTRAINT check_eaf7cfb6a7 CHECK ((char_length(merge_commit_template) <= 500))

View File

@ -74,7 +74,7 @@ For more information, read the internal issue
### In models and integrations
The ReactiveCaching concern can be used in models as well as `integrations`
The ReactiveCaching concern can be used in models as well as integrations
(`app/models/integrations`).
1. Include the concern in your model or integration.
@ -88,7 +88,7 @@ The ReactiveCaching concern can be used in models as well as `integrations`
To include the concern in an integration:
```ruby
include ReactiveService
include Integrations::ReactivelyCached
```
1. Implement the `calculate_reactive_cache` method in your model or integration.
@ -201,15 +201,15 @@ There are some `class_attribute` options which can be tweaked.
and `"ExampleModel:1:arg1:arg2:alive"` respectively, where `ExampleModel` is the
name of the model, `1` is the ID of the record, `arg1` and `arg2` are parameters
passed to `with_reactive_cache`.
- If you're including this concern in a service instead, you must override
the default by adding the following to your service:
- If you're including this concern in an integration (`app/models/integrations/`) instead, you must override
the default by adding the following to your integration:
```ruby
self.reactive_cache_key = ->(service) { [service.class.model_name.singular, service.project_id] }
self.reactive_cache_key = ->(integration) { [integration.class.model_name.singular, integration.project_id] }
```
If your reactive_cache_key is exactly like the above, you can use the existing
`ReactiveService` concern instead.
`Integrations::ReactivelyCached` concern instead.
#### `self.reactive_cache_lease_timeout`

View File

@ -4,7 +4,7 @@ group: Container Security
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
---
# Install AppArmor with a cluster management project
# Install AppArmor with a cluster management project **(FREE)**
> [Introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/5) in GitLab 14.0.

View File

@ -4,7 +4,7 @@ group: Container Security
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
---
# Install Cilium with a cluster management project
# Install Cilium with a cluster management project **(FREE)**
> [Introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/5) in GitLab 14.0.

View File

@ -4,7 +4,7 @@ group: Container Security
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
---
# Install Falco with a cluster management project
# Install Falco with a cluster management project **(FREE)**
> [Introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/5) in GitLab 14.0.

View File

@ -4,7 +4,7 @@ group: Container Security
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
---
# Install Fluentd with a cluster management project
# Install Fluentd with a cluster management project **(FREE)**
> [Introduced](https://gitlab.com/gitlab-org/project-templates/cluster-management/-/merge_requests/5) in GitLab 14.0.

View File

@ -41,7 +41,7 @@ module API
optional :page_token, type: String, desc: 'Name of branch to start the paginaition from'
end
get ':id/repository/branches' do
get ':id/repository/branches', urgency: :low do
ff_enabled = Feature.enabled?(:api_caching_rate_limit_branches, user_project, default_enabled: :yaml)
cache_action_if(ff_enabled, [user_project, :branches, current_user, declared_params], expires_in: 30.seconds) do
@ -86,7 +86,7 @@ module API
head do
user_project.repository.branch_exists?(params[:branch]) ? no_content! : not_found!
end
get do
get '/', urgency: :low do
branch = find_branch!(params[:branch])
present branch, with: Entities::Branch, current_user: current_user, project: user_project

View File

@ -27,7 +27,7 @@ module API
params do
requires :id, type: String, desc: 'The ID of a project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS, urgency: :low do
desc 'Get a project repository commits' do
success Entities::Commit
end
@ -43,7 +43,7 @@ module API
optional :trailers, type: Boolean, desc: 'Parse and include Git trailers for every commit', default: false
use :pagination
end
get ':id/repository/commits' do
get ':id/repository/commits', urgency: :low do
path = params[:path]
before = params[:until]
after = params[:since]
@ -169,7 +169,7 @@ module API
requires :sha, type: String, desc: 'A commit sha, or the name of a branch or tag'
use :pagination
end
get ':id/repository/commits/:sha/diff', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS do
get ':id/repository/commits/:sha/diff', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS, urgency: :low do
commit = user_project.commit(params[:sha])
not_found! 'Commit' unless commit
@ -295,7 +295,7 @@ module API
optional :type, type: String, values: %w[branch tag all], default: 'all', desc: 'Scope'
use :pagination
end
get ':id/repository/commits/:sha/refs', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS do
get ':id/repository/commits/:sha/refs', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS, urgency: :low do
commit = user_project.commit(params[:sha])
not_found!('Commit') unless commit
@ -363,7 +363,7 @@ module API
requires :sha, type: String, desc: 'A commit sha, or the name of a branch or tag on which to find Merge Requests'
use :pagination
end
get ':id/repository/commits/:sha/merge_requests', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS do
get ':id/repository/commits/:sha/merge_requests', requirements: API::COMMIT_ENDPOINT_REQUIREMENTS, urgency: :low do
authorize! :read_merge_request, user_project
commit = user_project.commit(params[:sha])

View File

@ -122,7 +122,7 @@ module API
requires :file_path, type: String, file_path: true, desc: 'The url encoded path to the file. Ex. lib%2Fclass%2Erb'
optional :ref, type: String, desc: 'The name of branch, tag or commit', allow_blank: false
end
head ":id/repository/files/:file_path/raw", requirements: FILE_ENDPOINT_REQUIREMENTS do
head ":id/repository/files/:file_path/raw", requirements: FILE_ENDPOINT_REQUIREMENTS, urgency: :low do
assign_file_vars!
set_http_headers(blob_data)
@ -133,7 +133,7 @@ module API
requires :file_path, type: String, file_path: true, desc: 'The url encoded path to the file. Ex. lib%2Fclass%2Erb'
optional :ref, type: String, desc: 'The name of branch, tag or commit', allow_blank: false
end
get ":id/repository/files/:file_path/raw", requirements: FILE_ENDPOINT_REQUIREMENTS do
get ":id/repository/files/:file_path/raw", requirements: FILE_ENDPOINT_REQUIREMENTS, urgency: :low do
assign_file_vars!
no_cache_headers
@ -147,7 +147,7 @@ module API
requires :file_path, type: String, file_path: true, desc: 'The url encoded path to the file. Ex. lib%2Fclass%2Erb'
requires :ref, type: String, desc: 'The name of branch, tag or commit', allow_blank: false
end
head ":id/repository/files/:file_path", requirements: FILE_ENDPOINT_REQUIREMENTS do
head ":id/repository/files/:file_path", requirements: FILE_ENDPOINT_REQUIREMENTS, urgency: :low do
assign_file_vars!
set_http_headers(blob_data)
@ -174,7 +174,7 @@ module API
params do
use :extended_file_params
end
post ":id/repository/files/:file_path", requirements: FILE_ENDPOINT_REQUIREMENTS do
post ":id/repository/files/:file_path", requirements: FILE_ENDPOINT_REQUIREMENTS, urgency: :low do
authorize! :push_code, user_project
file_params = declared_params(include_missing: false)
@ -192,7 +192,7 @@ module API
params do
use :extended_file_params
end
put ":id/repository/files/:file_path", requirements: FILE_ENDPOINT_REQUIREMENTS do
put ":id/repository/files/:file_path", requirements: FILE_ENDPOINT_REQUIREMENTS, urgency: :low do
authorize! :push_code, user_project
file_params = declared_params(include_missing: false)

View File

@ -145,7 +145,7 @@ module API
check_allowed(params)
end
post "/lfs_authenticate", feature_category: :source_code_management do
post "/lfs_authenticate", feature_category: :source_code_management, urgency: :high do
not_found! unless container&.lfs_enabled?
status 200

View File

@ -24,7 +24,7 @@ module API
requires :oid, type: String, desc: 'The object ID to query'
requires :gl_repository, type: String, desc: "Project identifier (e.g. project-1)"
end
get "/" do
get "/", urgency: :high do
lfs_object = find_lfs_object(params[:oid])
not_found! unless lfs_object

View File

@ -25,7 +25,7 @@ module API
# Examples:
# GET /projects/:id/merge_requests/:merge_request_iid/approvals
desc 'List approvals for merge request'
get 'approvals' do
get 'approvals', urgency: :low do
not_found!("Merge Request") unless can?(current_user, :read_merge_request, user_project)
merge_request = find_merge_request_with_access(params[:merge_request_iid])
@ -47,7 +47,7 @@ module API
use :ee_approval_params
end
post 'approve' do
post 'approve', urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid], :approve_merge_request)
check_sha_param!(params, merge_request)
@ -63,7 +63,7 @@ module API
end
desc 'Remove an approval from a merge request'
post 'unapprove' do
post 'unapprove', urgency: :low do
merge_request = find_merge_request_with_access(params[:merge_request_iid], :approve_merge_request)
success = ::MergeRequests::RemoveApprovalService

View File

@ -404,7 +404,7 @@ module API
use :collection_params
use :with_custom_attributes
end
get ':id/forks', feature_category: :source_code_management do
get ':id/forks', feature_category: :source_code_management, urgency: :low do
forks = ForkProjectsFinder.new(user_project, params: project_finder_params, current_user: current_user).execute
present_projects forks, request_scope: user_project
@ -514,7 +514,7 @@ module API
end
desc 'Get languages in project repository'
get ':id/languages', feature_category: :source_code_management do
get ':id/languages', feature_category: :source_code_management, urgency: :medium do
::Projects::RepositoryLanguagesService
.new(user_project, current_user)
.execute.to_h { |lang| [lang.name, lang.share] }

View File

@ -91,7 +91,7 @@ module API
requires :name, type: String, desc: 'The name of the protected branch'
end
# rubocop: disable CodeReuse/ActiveRecord
delete ':id/protected_branches/:name', requirements: BRANCH_ENDPOINT_REQUIREMENTS do
delete ':id/protected_branches/:name', requirements: BRANCH_ENDPOINT_REQUIREMENTS, urgency: :low do
protected_branch = user_project.protected_branches.find_by!(name: params[:name])
destroy_conditionally!(protected_branch) do

View File

@ -79,7 +79,7 @@ module API
optional :page_token, type: String, desc: 'Record from which to start the keyset pagination'
end
end
get ':id/repository/tree' do
get ':id/repository/tree', urgency: :low do
tree_finder = ::Repositories::TreeFinder.new(user_project, declared_params(include_missing: false))
not_found!("Tree") unless tree_finder.commit_exists?
@ -144,7 +144,7 @@ module API
optional :from_project_id, type: String, desc: 'The project to compare from'
optional :straight, type: Boolean, desc: 'Comparison method, `true` for direct comparison between `from` and `to` (`from`..`to`), `false` to compare using merge base (`from`...`to`)', default: false
end
get ':id/repository/compare' do
get ':id/repository/compare', urgency: :low do
ff_enabled = Feature.enabled?(:api_caching_rate_limit_repository_compare, user_project, default_enabled: :yaml)
target_project = fetch_target_project(current_user, user_project, params)

View File

@ -23,7 +23,7 @@ module API
optional :search, type: String, desc: 'Return list of tags matching the search criteria'
use :pagination
end
get ':id/repository/tags', feature_category: :source_code_management do
get ':id/repository/tags', feature_category: :source_code_management, urgency: :low do
tags = ::TagsFinder.new(user_project.repository,
sort: "#{params[:order_by]}_#{params[:sort]}",
search: params[:search]).execute

View File

@ -5,6 +5,7 @@ module Gitlab
module OAuth
class Provider
LABELS = {
"dingtalk" => "DingTalk",
"github" => "GitHub",
"gitlab" => "GitLab.com",
"google_oauth2" => "Google",

View File

@ -14044,6 +14044,9 @@ msgstr ""
msgid "Explore public groups"
msgstr ""
msgid "Explore snippets"
msgstr ""
msgid "Explore topics"
msgstr ""
@ -40082,6 +40085,9 @@ msgstr ""
msgid "Your sign-in page is %{url}."
msgstr ""
msgid "Your snippets"
msgstr ""
msgid "Your subscription expired!"
msgstr ""

View File

@ -31,7 +31,7 @@ RSpec.describe Profiles::AccountsController do
end
end
[:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0, :authentiq].each do |provider|
[:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0, :authentiq, :dingtalk].each do |provider|
describe "#{provider} provider" do
let(:user) { create(:omniauth_user, provider: provider.to_s) }

View File

@ -1410,12 +1410,12 @@ RSpec.describe Projects::IssuesController do
context 'when the endpoint receives requests above the limit', :freeze_time, :clean_gitlab_redis_rate_limiting do
before do
stub_application_setting(issues_create_limit: 5)
stub_application_setting(issues_create_limit: 1)
end
context 'when issue creation limits imposed' do
it 'prevents from creating more issues', :request_store do
5.times { post_new_issue }
post_new_issue
expect { post_new_issue }
.to change { Gitlab::GitalyClient.get_request_count }.by(1) # creates 1 projects and 0 issues
@ -1442,7 +1442,7 @@ RSpec.describe Projects::IssuesController do
project.add_developer(user)
sign_in(user)
6.times do
2.times do
post :create, params: {
namespace_id: project.namespace.to_param,
project_id: project,

View File

@ -71,7 +71,7 @@ RSpec.describe 'Labels subscription' do
end
it 'does not show subscribed tab' do
page.within('.nav-tabs') do
page.within('.gl-tabs-nav') do
expect(page).not_to have_link 'Subscribed'
end
end
@ -86,7 +86,7 @@ RSpec.describe 'Labels subscription' do
end
def click_subscribed_tab
page.within('.nav-tabs') do
page.within('.gl-tabs-nav') do
click_link 'Subscribed'
end
end

View File

@ -16,7 +16,7 @@ RSpec.describe 'OAuth Login', :js, :allow_forgery_protection do
end
providers = [:github, :twitter, :bitbucket, :gitlab, :google_oauth2,
:facebook, :cas3, :auth0, :authentiq, :salesforce]
:facebook, :cas3, :auth0, :authentiq, :salesforce, :dingtalk]
around do |example|
with_omniauth_full_host { example.run }

View File

@ -309,7 +309,7 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler do
context 'when limit is higher than sent emails' do
before do
stub_application_setting(issues_create_limit: 3)
stub_application_setting(issues_create_limit: 2)
end
it 'creates 2 issues' do

View File

@ -693,6 +693,7 @@ ProjectCiCdSetting:
ProjectSetting:
- allow_merge_on_skipped_pipeline
- has_confluence
- has_shimo
- has_vulnerabilities
ProtectedEnvironment:
- id

View File

@ -137,6 +137,7 @@ project_setting:
unexposed_attributes:
- created_at
- has_confluence
- has_shimo
- has_vulnerabilities
- prevent_merge_without_jira_issue
- warn_about_potentially_unwanted_characters

View File

@ -329,9 +329,9 @@ RSpec.describe Issues::CreateService do
end
end
context 'when limit is higher than counf of issues being created' do
context 'when limit is higher than count of issues being created' do
before do
stub_application_setting(issues_create_limit: 3)
stub_application_setting(issues_create_limit: 2)
end
it 'creates 2 issues' do