summaryrefslogtreecommitdiff
path: root/lib/api/entities
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /lib/api/entities
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
downloadgitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'lib/api/entities')
-rw-r--r--lib/api/entities/ci/pipeline_basic.rb2
-rw-r--r--lib/api/entities/job_request/response.rb2
-rw-r--r--lib/api/entities/plan_limit.rb14
-rw-r--r--lib/api/entities/project.rb2
-rw-r--r--lib/api/entities/project_repository_storage_move.rb9
-rw-r--r--lib/api/entities/projects/repository_storage_move.rb11
-rw-r--r--lib/api/entities/protected_branch.rb1
-rw-r--r--lib/api/entities/public_group_details.rb12
-rw-r--r--lib/api/entities/snippets/repository_storage_move.rb11
9 files changed, 53 insertions, 11 deletions
diff --git a/lib/api/entities/ci/pipeline_basic.rb b/lib/api/entities/ci/pipeline_basic.rb
index dbb9b828757..f4f2356c812 100644
--- a/lib/api/entities/ci/pipeline_basic.rb
+++ b/lib/api/entities/ci/pipeline_basic.rb
@@ -4,7 +4,7 @@ module API
module Entities
module Ci
class PipelineBasic < Grape::Entity
- expose :id, :sha, :ref, :status
+ expose :id, :project_id, :sha, :ref, :status
expose :created_at, :updated_at
expose :web_url do |pipeline, _options|
diff --git a/lib/api/entities/job_request/response.rb b/lib/api/entities/job_request/response.rb
index 8db9aff3dc9..bf22ea1e6e2 100644
--- a/lib/api/entities/job_request/response.rb
+++ b/lib/api/entities/job_request/response.rb
@@ -20,7 +20,7 @@ module API
model
end
- expose :variables
+ expose :runner_variables, as: :variables
expose :steps, using: Entities::JobRequest::Step
expose :image, using: Entities::JobRequest::Image
expose :services, using: Entities::JobRequest::Service
diff --git a/lib/api/entities/plan_limit.rb b/lib/api/entities/plan_limit.rb
new file mode 100644
index 00000000000..40e8b348c18
--- /dev/null
+++ b/lib/api/entities/plan_limit.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class PlanLimit < Grape::Entity
+ expose :conan_max_file_size
+ expose :generic_packages_max_file_size
+ expose :maven_max_file_size
+ expose :npm_max_file_size
+ expose :nuget_max_file_size
+ expose :pypi_max_file_size
+ end
+ end
+end
diff --git a/lib/api/entities/project.rb b/lib/api/entities/project.rb
index 6ad6123a20e..e332e5e40fa 100644
--- a/lib/api/entities/project.rb
+++ b/lib/api/entities/project.rb
@@ -5,6 +5,8 @@ module API
class Project < BasicProjectDetails
include ::API::Helpers::RelatedResourcesHelpers
+ expose :container_registry_url, as: :container_registry_image_prefix, if: -> (_, _) { Gitlab.config.registry.enabled }
+
expose :_links do
expose :self do |project|
expose_url(api_v4_projects_path(id: project.id))
diff --git a/lib/api/entities/project_repository_storage_move.rb b/lib/api/entities/project_repository_storage_move.rb
deleted file mode 100644
index 191bbaf19d7..00000000000
--- a/lib/api/entities/project_repository_storage_move.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-module API
- module Entities
- class ProjectRepositoryStorageMove < BasicRepositoryStorageMove
- expose :project, using: Entities::ProjectIdentity
- end
- end
-end
diff --git a/lib/api/entities/projects/repository_storage_move.rb b/lib/api/entities/projects/repository_storage_move.rb
new file mode 100644
index 00000000000..7844cd36e02
--- /dev/null
+++ b/lib/api/entities/projects/repository_storage_move.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ module Projects
+ class RepositoryStorageMove < BasicRepositoryStorageMove
+ expose :project, using: Entities::ProjectIdentity
+ end
+ end
+ end
+end
diff --git a/lib/api/entities/protected_branch.rb b/lib/api/entities/protected_branch.rb
index 80c8a791053..e5dbaffb591 100644
--- a/lib/api/entities/protected_branch.rb
+++ b/lib/api/entities/protected_branch.rb
@@ -7,6 +7,7 @@ module API
expose :name
expose :push_access_levels, using: Entities::ProtectedRefAccess
expose :merge_access_levels, using: Entities::ProtectedRefAccess
+ expose :allow_force_push
end
end
end
diff --git a/lib/api/entities/public_group_details.rb b/lib/api/entities/public_group_details.rb
new file mode 100644
index 00000000000..0dfe28d251a
--- /dev/null
+++ b/lib/api/entities/public_group_details.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class PublicGroupDetails < BasicGroupDetails
+ expose :avatar_url do |group, options|
+ group.avatar_url(only_path: false)
+ end
+ expose :full_name, :full_path
+ end
+ end
+end
diff --git a/lib/api/entities/snippets/repository_storage_move.rb b/lib/api/entities/snippets/repository_storage_move.rb
new file mode 100644
index 00000000000..4e14d1dfba2
--- /dev/null
+++ b/lib/api/entities/snippets/repository_storage_move.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ module Snippets
+ class RepositoryStorageMove < BasicRepositoryStorageMove
+ expose :snippet, using: Entities::BasicSnippet
+ end
+ end
+ end
+end