diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2019-07-10 08:39:44 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2019-07-10 08:39:44 +0300 |
commit | 227d8b4445fa1257b525945a34a2e301369736a4 (patch) | |
tree | a7408f5c307870fe0b611f9780663cbe258d73ec /lib | |
parent | 713cc99abc96e395bb498a3de072f1d748bf1cee (diff) | |
parent | dba5f3aeeac6e6891ed58bdb0e66df68b152bb4a (diff) |
Merge branch '58275-rename-project-entity' into 'master'
Rename ProjectEntity to IssuableEntity
Closes #58275
See merge request gitlab-org/gitlab-ce!30217
Diffstat (limited to 'lib')
-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 5eae87fea02..765819e6bf1 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -511,7 +511,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 @@ -564,7 +564,7 @@ module API end end - class IssueBasic < ProjectEntity + class IssueBasic < IssuableEntity expose :closed_at expose :closed_by, using: Entities::UserBasic @@ -670,14 +670,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' |