Commit dba5f3ae authored by Alexandru Croitor's avatar Alexandru Croitor

Rename ProjectEntity to IssuableEntity

parent 630a8e80
......@@ -491,7 +491,7 @@ module API
end
end
class ProjectEntity < Grape::Entity
class IssuableEntity < Grape::Entity
expose :id, :iid
expose(:project_id) { |entity| entity&.project.try(:id) }
expose :title, :description
......@@ -544,7 +544,7 @@ module API
end
end
class IssueBasic < ProjectEntity
class IssueBasic < IssuableEntity
expose :closed_at
expose :closed_by, using: Entities::UserBasic
......@@ -650,14 +650,14 @@ module API
end
end
class MergeRequestSimple < ProjectEntity
class MergeRequestSimple < IssuableEntity
expose :title
expose :web_url do |merge_request, options|
Gitlab::UrlBuilder.build(merge_request)
end
end
class MergeRequestBasic < ProjectEntity
class MergeRequestBasic < IssuableEntity
expose :merged_by, using: Entities::UserBasic do |merge_request, _options|
merge_request.metrics&.merged_by
end
......
......@@ -28,7 +28,7 @@ module API
desc 'Import a GitHub project' do
detail 'This feature was introduced in GitLab 11.3.4.'
success Entities::ProjectEntity
success ::ProjectEntity
end
params do
requires :personal_access_token, type: String, desc: 'GitHub personal access token'
......
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