diff options
author | Filipe Freire <livrofubia@gmail.com> | 2018-01-25 20:23:19 +0000 |
---|---|---|
committer | Filipe Freire <livrofubia@gmail.com> | 2018-01-25 20:23:19 +0000 |
commit | 03b87ec943ec9e48106a8d94350f6d5011e30519 (patch) | |
tree | 77bc2b00229c4d5598cb94db379f6beae240f792 /lib/api/entities.rb | |
parent | 350dbca41c2be6717d4c9f5800ef6dd60b06d932 (diff) | |
parent | 10d8026f69efe83a0f4759f91c5087effd676191 (diff) | |
download | gitlab-ce-03b87ec943ec9e48106a8d94350f6d5011e30519.tar.gz |
Merge branch 'master' of https://gitlab.com/filipefreire/gitlab-ce into filipefreire_155
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index c4ef2c74658..7b9a80a234b 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -65,12 +65,12 @@ module API end class Hook < Grape::Entity - expose :id, :url, :created_at, :push_events, :tag_push_events, :repository_update_events + expose :id, :url, :created_at, :push_events, :tag_push_events, :merge_requests_events, :repository_update_events expose :enable_ssl_verification end class ProjectHook < Hook - expose :project_id, :issues_events, :merge_requests_events + expose :project_id, :issues_events expose :note_events, :pipeline_events, :wiki_page_events expose :job_events end @@ -554,13 +554,18 @@ module API end class SSHKey < Grape::Entity - expose :id, :title, :key, :created_at, :can_push + expose :id, :title, :key, :created_at end class SSHKeyWithUser < SSHKey expose :user, using: Entities::UserPublic end + class DeployKeysProject < Grape::Entity + expose :deploy_key, merge: true, using: Entities::SSHKey + expose :can_push + end + class GPGKey < Grape::Entity expose :id, :key, :created_at end @@ -714,10 +719,7 @@ module API expose :job_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) + service.properties.slice(*service.api_field_names) end end @@ -1155,5 +1157,15 @@ module API pages_domain end end + + class Application < Grape::Entity + expose :uid, as: :application_id + expose :redirect_uri, as: :callback_url + end + + # Use with care, this exposes the secret + class ApplicationWithSecret < Application + expose :secret + end end end |