Commit 81a5fdac authored by Robert Speicher's avatar Robert Speicher

Merge branch 'refactoring-ee-entities-1' into 'master'

Separate 4 EE entities into own class files

See merge request gitlab-org/gitlab!25400
parents 238462be 068f5370
---
title: Separate 4 ee entities into own class file
merge_request: 25400
author: Rajendra Kadam
type: added
...@@ -118,11 +118,6 @@ module EE ...@@ -118,11 +118,6 @@ module EE
end end
end end
class ProtectedEnvironment < Grape::Entity
expose :name
expose :deploy_access_levels, using: ::API::Entities::ProtectedRefAccess
end
module IssueBasic module IssueBasic
extend ActiveSupport::Concern extend ActiveSupport::Concern
...@@ -269,25 +264,6 @@ module EE ...@@ -269,25 +264,6 @@ module EE
end end
end end
class ProjectPushRule < Grape::Entity
extend EntityHelpers
expose :id, :project_id, :created_at
expose :commit_message_regex, :commit_message_negative_regex, :branch_name_regex, :deny_delete_tag
expose :member_check, :prevent_secrets, :author_email_regex
expose :file_name_regex, :max_file_size
expose_restricted :commit_committer_check, &:project
expose_restricted :reject_unsigned_commits, &:project
end
class LdapGroupLink < Grape::Entity
expose :cn, :group_access, :provider
end
class RelatedIssue < ::API::Entities::Issue
expose :issue_link_id
expose :issue_link_type, as: :link_type
end
class LinkedEpic < Grape::Entity class LinkedEpic < Grape::Entity
expose :id expose :id
expose :iid expose :iid
......
# frozen_string_literal: true
module EE
module API
module Entities
class LdapGroupLink < Grape::Entity
expose :cn, :group_access, :provider
end
end
end
end
# frozen_string_literal: true
module EE
module API
module Entities
class ProjectPushRule < Grape::Entity
extend EntityHelpers
expose :id, :project_id, :created_at
expose :commit_message_regex, :commit_message_negative_regex, :branch_name_regex, :deny_delete_tag
expose :member_check, :prevent_secrets, :author_email_regex
expose :file_name_regex, :max_file_size
expose_restricted :commit_committer_check, &:project
expose_restricted :reject_unsigned_commits, &:project
end
end
end
end
# frozen_string_literal: true
module EE
module API
module Entities
class ProtectedEnvironment < Grape::Entity
expose :name
expose :deploy_access_levels, using: ::API::Entities::ProtectedRefAccess
end
end
end
end
# frozen_string_literal: true
module EE
module API
module Entities
class RelatedIssue < ::API::Entities::Issue
expose :issue_link_id
expose :issue_link_type, as: :link_type
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment