diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-10-01 16:09:41 +0900 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-02 17:08:14 +0200 |
commit | bc5d649a4c456aab4ec7eddc52d13d172a5adace (patch) | |
tree | addbb8d13cbe2e786a80c311532ea5734a017cb1 /app/serializers | |
parent | 7fc74818a32a713d971582f8730b163dade8df3d (diff) | |
download | gitlab-ce-bc5d649a4c456aab4ec7eddc52d13d172a5adace.tar.gz |
Add unschedule action to status build
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/build_action_entity.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/serializers/build_action_entity.rb b/app/serializers/build_action_entity.rb index 3e81f8f0218..0db7875aa87 100644 --- a/app/serializers/build_action_entity.rb +++ b/app/serializers/build_action_entity.rb @@ -12,7 +12,11 @@ class BuildActionEntity < Grape::Entity end expose :playable?, as: :playable - expose :scheduled_at + expose :scheduled_at, if: -> (build) { build.scheduled? } + + expose :unschedule_path, if: -> (build) { build.scheduled? } do |build| + unschedule_project_job_path(build.project, build) + end private |