diff options
author | Marcia Ramos <virtua.creative@gmail.com> | 2018-08-16 10:17:22 +0100 |
---|---|---|
committer | Marcia Ramos <virtua.creative@gmail.com> | 2018-08-16 10:17:22 +0100 |
commit | bfc0c602072bd5b9bf73e117d0808043adc9465e (patch) | |
tree | ea55f6e86fdfdcccca9c593d5441c9d2c3efd441 /lib/api/entities.rb | |
parent | 1e23577417b3e4eb06b9aba1ec174dbe78b6b9be (diff) | |
parent | 0a666b2cb1020df4b8f7b71041b6bd109b49656a (diff) | |
download | gitlab-ce-docs-processes.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into docs-processesdocs-processes
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 27f28e1df93..b6393fdef19 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -856,7 +856,7 @@ module API class NotificationSetting < Grape::Entity expose :level expose :events, if: ->(notification_setting, _) { notification_setting.custom? } do - ::NotificationSetting::EMAIL_EVENTS.each do |event| + ::NotificationSetting.email_events.each do |event| expose event end end @@ -1080,6 +1080,10 @@ module API expose :filename, :size end + class JobArtifact < Grape::Entity + expose :file_type, :size, :filename, :file_format + end + class JobBasic < Grape::Entity expose :id, :status, :stage, :name, :ref, :tag, :coverage expose :created_at, :started_at, :finished_at @@ -1094,7 +1098,9 @@ module API end class Job < JobBasic + # artifacts_file is included in job_artifacts, but kept for backward compatibility (remove in api/v5) expose :artifacts_file, using: JobArtifactFile, if: -> (job, opts) { job.artifacts? } + expose :job_artifacts, as: :artifacts, using: JobArtifact expose :runner, with: Runner expose :artifacts_expire_at end @@ -1153,7 +1159,7 @@ module API class License < Grape::Entity expose :key, :name, :nickname - expose :featured, as: :popular + expose :popular?, as: :popular expose :url, as: :html_url expose(:source_url) { |license| license.meta['source'] } expose(:description) { |license| license.meta['description'] } |