Skip to content
Snippets Groups Projects
Commit dba5f3ae authored by Alexandru Croitor's avatar Alexandru Croitor
Browse files

Rename ProjectEntity to IssuableEntity

parent 630a8e80
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -544,7 +544,7 @@ module API
end
end
 
class IssueBasic < ProjectEntity
class IssueBasic < IssuableEntity
expose :closed_at
expose :closed_by, using: Entities::UserBasic
 
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment