diff options
author | Han Loong Liauw <hanloongliauw@gmail.com> | 2015-10-17 09:32:31 +1100 |
---|---|---|
committer | Han Loong Liauw <hanloongliauw@gmail.com> | 2015-10-17 09:32:31 +1100 |
commit | 02e8beaa0b83a343752ebf60e4fca4482c17f9e3 (patch) | |
tree | e00847b274daa7fa03fd7a4647154cc2e4d98e85 /lib/api/entities.rb | |
parent | 0bea5ced8bf4c9306f8f8e912313731a43d16f4c (diff) | |
parent | c856a7a5934fba13598be09507c2090888f57a39 (diff) | |
download | gitlab-ce-02e8beaa0b83a343752ebf60e4fca4482c17f9e3.tar.gz |
Merge branch 'master' into remove-forks-from-projects-settings
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 9620d36ac41..883a5e14b17 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -149,6 +149,7 @@ module API class RepoCommitDetail < RepoCommit expose :parent_ids, :committed_date, :authored_date + expose :status end class ProjectSnippet < Grape::Entity @@ -228,6 +229,12 @@ module API expose :created_at end + class CommitStatus < Grape::Entity + expose :id, :sha, :ref, :status, :name, :target_url, :description, + :created_at, :started_at, :finished_at + expose :author, using: Entities::UserBasic + end + class Event < Grape::Entity expose :title, :project_id, :action_name expose :target_id, :target_type, :author_id @@ -255,6 +262,18 @@ module API expose :notification_level end + class ProjectService < Grape::Entity + expose :id, :title, :created_at, :updated_at, :active + expose :push_events, :issues_events, :merge_requests_events, :tag_push_events, :note_events + # Expose serialized properties + expose :properties do |service, options| + field_names = service.fields. + select { |field| options[:include_passwords] || field[:type] != 'password' }. + map { |field| field[:name] } + service.properties.slice(*field_names) + end + end + class ProjectWithAccess < Project expose :permissions do expose :project_access, using: Entities::ProjectAccess do |project, options| |