diff options
author | Alexandru Croitor <acroitor@gitlab.com> | 2019-07-01 11:19:48 +0300 |
---|---|---|
committer | Alexandru Croitor <acroitor@gitlab.com> | 2019-07-09 15:41:45 +0300 |
commit | dba5f3aeeac6e6891ed58bdb0e66df68b152bb4a (patch) | |
tree | e6da4485db6f14d573309558e78d18fcaf9e345b | |
parent | 630a8e80501aff46526086e8f2c72bb846780390 (diff) | |
download | gitlab-ce-dba5f3aeeac6e6891ed58bdb0e66df68b152bb4a.tar.gz |
Rename ProjectEntity to IssuableEntity58275-rename-project-entity
-rw-r--r-- | lib/api/entities.rb | 8 | ||||
-rw-r--r-- | lib/api/import_github.rb | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index b9aa387ba61..55d38530c01 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -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 diff --git a/lib/api/import_github.rb b/lib/api/import_github.rb index e7504051808..21d4928193e 100644 --- a/lib/api/import_github.rb +++ b/lib/api/import_github.rb @@ -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' |