diff options
author | Mart Sõmermaa <mart.somermaa@cgi.com> | 2014-04-09 18:24:12 +0300 |
---|---|---|
committer | Mart Sõmermaa <mart.somermaa@cgi.com> | 2014-04-10 20:24:20 +0300 |
commit | 0da8428f8efb7af188deb3e85ca911efbfb0e59e (patch) | |
tree | 5f15f2449210c7c89ec8687d5706856022aa603b /lib | |
parent | 731c009a80748aa6dc3f9d6460d9d6f7e3d27c18 (diff) | |
download | gitlab-ce-0da8428f8efb7af188deb3e85ca911efbfb0e59e.tar.gz |
Expose event and and mergerequest timestamps in API, make code more DRY.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/entities.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 9fa8506926c..abe6fceff14 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -117,22 +117,22 @@ module API class ProjectEntity < Grape::Entity expose :id, :iid expose (:project_id) { |entity| entity.project.id } + expose :title, :description + expose :state, :created_at, :updated_at end class Milestone < ProjectEntity - expose :title, :description, :due_date, :state, :updated_at, :created_at + expose :due_date end class Issue < ProjectEntity - expose :title, :description expose :label_list, as: :labels expose :milestone, using: Entities::Milestone expose :assignee, :author, using: Entities::UserBasic - expose :state, :updated_at, :created_at end class MergeRequest < ProjectEntity - expose :target_branch, :source_branch, :title, :state, :upvotes, :downvotes, :description + expose :target_branch, :source_branch, :upvotes, :downvotes expose :author, :assignee, using: Entities::UserBasic expose :source_project_id, :target_project_id end @@ -158,6 +158,7 @@ module API expose :title, :project_id, :action_name expose :target_id, :target_type, :author_id expose :data, :target_title + expose :created_at end class Namespace < Grape::Entity |