summaryrefslogtreecommitdiff
path: root/lib/api/entities/ci/pipeline_basic.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/ci/pipeline_basic.rb')
-rw-r--r--lib/api/entities/ci/pipeline_basic.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/api/entities/ci/pipeline_basic.rb b/lib/api/entities/ci/pipeline_basic.rb
new file mode 100644
index 00000000000..dbb9b828757
--- /dev/null
+++ b/lib/api/entities/ci/pipeline_basic.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ module Ci
+ class PipelineBasic < Grape::Entity
+ expose :id, :sha, :ref, :status
+ expose :created_at, :updated_at
+
+ expose :web_url do |pipeline, _options|
+ Gitlab::Routing.url_helpers.project_pipeline_url(pipeline.project, pipeline)
+ end
+ end
+ end
+ end
+end