summaryrefslogtreecommitdiff
path: root/app/serializers/pipeline_action_entity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/pipeline_action_entity.rb')
-rw-r--r--app/serializers/pipeline_action_entity.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/serializers/pipeline_action_entity.rb b/app/serializers/pipeline_action_entity.rb
new file mode 100644
index 00000000000..475b5a55316
--- /dev/null
+++ b/app/serializers/pipeline_action_entity.rb
@@ -0,0 +1,14 @@
+class PipelineActionEntity < Grape::Entity
+ include RequestAwareEntity
+
+ expose :name do |build|
+ build.name.humanize
+ end
+
+ expose :url do |build|
+ play_namespace_project_build_path(
+ build.project.namespace,
+ build.project,
+ build)
+ end
+end