summaryrefslogtreecommitdiff
path: root/app/serializers/build_entity.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-04-03 17:22:18 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-04-03 17:22:18 +0100
commit1b85c5a73fb4e7b466d3d871be7d7eb4b889b3ce (patch)
tree7fd8628974752a279cbe27c61983f8755d92cc51 /app/serializers/build_entity.rb
parent16cca3a0ea7f4b95e99d7b3e8d4953334fa7bec7 (diff)
parentb2700e64cce7c9b258e117a995eda8de00a8a988 (diff)
downloadgitlab-ce-1b85c5a73fb4e7b466d3d871be7d7eb4b889b3ce.tar.gz
Merge branch 'master' into tc-fix-unplayable-build-action-404
* master: (525 commits) Introduce "polling_interval_multiplier" as application setting fix spelling CI_REPOSITORY_URL (line:355) gitab-ci-token to gitlab-ci-token. Pass Gitaly Repository messages to workhorse Use gitaly 0.5.0 Fix specs Improve specs examples Minor refactor Fix BrachFormatter for removed users Changelog Fix specs One more change to the branch names to preserve metadata Prefixes source branch name with short SHA to avoid collision Fix GitHub importer for PRs of deleted forked repositories Change order of specs Clean history after every test that changes history Clean history state after each test Fixes method not replacing URL parameters correctly Fix a transient failure caused by FFaker Remove unnecessary ORDER BY clause when updating todos Add a wait_for_ajax call to ensure Todos page cleans up properly ...
Diffstat (limited to 'app/serializers/build_entity.rb')
-rw-r--r--app/serializers/build_entity.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/build_entity.rb b/app/serializers/build_entity.rb
index 2c116102888..b804d6d0e8a 100644
--- a/app/serializers/build_entity.rb
+++ b/app/serializers/build_entity.rb
@@ -19,10 +19,17 @@ class BuildEntity < Grape::Entity
expose :playable?, as: :playable
expose :created_at
expose :updated_at
+ expose :detailed_status, as: :status, with: StatusEntity
private
+ alias_method :build, :object
+
def path_to(route, build)
send("#{route}_path", build.project.namespace, build.project, build)
end
+
+ def detailed_status
+ build.detailed_status(request.user)
+ end
end