diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-03 11:46:53 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-03 11:46:53 +0300 |
commit | 1bbeafc3e1a0e4472a0d8124c9d4711356cde2d0 (patch) | |
tree | 1223af9ebd60b51e1903d0c27d716d1ff5bae639 /app/serializers | |
parent | 4477f7bb5925d8d720e3e8272bd882fffcc04b28 (diff) | |
parent | d51ad1ea6407d3cb9eafd9fc891c7348b10b108f (diff) |
Merge remote-tracking branch 'origin/master' into 38464-k8s-apps
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/issuable_entity.rb | 8 | ||||
-rw-r--r-- | app/serializers/issue_entity.rb | 4 | ||||
-rw-r--r-- | app/serializers/merge_request_entity.rb | 4 | ||||
-rw-r--r-- | app/serializers/time_trackable_entity.rb | 11 |
4 files changed, 19 insertions, 8 deletions
diff --git a/app/serializers/issuable_entity.rb b/app/serializers/issuable_entity.rb index 61c7a428745..3b5a4fd4f79 100644 --- a/app/serializers/issuable_entity.rb +++ b/app/serializers/issuable_entity.rb @@ -1,20 +1,16 @@ class IssuableEntity < Grape::Entity + include RequestAwareEntity + expose :id expose :iid expose :author_id expose :description expose :lock_version expose :milestone_id - expose :state expose :title expose :updated_by_id expose :created_at expose :updated_at - expose :deleted_at - expose :time_estimate - expose :total_time_spent - expose :human_time_estimate - expose :human_total_time_spent expose :milestone, using: API::Entities::Milestone expose :labels, using: LabelEntity end diff --git a/app/serializers/issue_entity.rb b/app/serializers/issue_entity.rb index 10d3ad0214b..5f47592e4ad 100644 --- a/app/serializers/issue_entity.rb +++ b/app/serializers/issue_entity.rb @@ -1,6 +1,8 @@ class IssueEntity < IssuableEntity - include RequestAwareEntity + include TimeTrackableEntity + expose :state + expose :deleted_at expose :branch_name expose :confidential expose :discussion_locked diff --git a/app/serializers/merge_request_entity.rb b/app/serializers/merge_request_entity.rb index 297a459e394..b53a49fe59e 100644 --- a/app/serializers/merge_request_entity.rb +++ b/app/serializers/merge_request_entity.rb @@ -1,6 +1,8 @@ class MergeRequestEntity < IssuableEntity - include RequestAwareEntity + include TimeTrackableEntity + expose :state + expose :deleted_at expose :in_progress_merge_commit_sha expose :merge_commit_sha expose :merge_error diff --git a/app/serializers/time_trackable_entity.rb b/app/serializers/time_trackable_entity.rb new file mode 100644 index 00000000000..e81cd7bec72 --- /dev/null +++ b/app/serializers/time_trackable_entity.rb @@ -0,0 +1,11 @@ +module TimeTrackableEntity + extend ActiveSupport::Concern + extend Grape + + included do + expose :time_estimate + expose :total_time_spent + expose :human_time_estimate + expose :human_total_time_spent + end +end |