summaryrefslogtreecommitdiff
path: root/lib/api/entities/ci
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/ci')
-rw-r--r--lib/api/entities/ci/pipeline_basic.rb4
-rw-r--r--lib/api/entities/ci/reset_registration_token_result.rb11
2 files changed, 12 insertions, 3 deletions
diff --git a/lib/api/entities/ci/pipeline_basic.rb b/lib/api/entities/ci/pipeline_basic.rb
index 8086062dc9b..4d56176bdb3 100644
--- a/lib/api/entities/ci/pipeline_basic.rb
+++ b/lib/api/entities/ci/pipeline_basic.rb
@@ -4,11 +4,9 @@ module API
module Entities
module Ci
class PipelineBasic < Grape::Entity
- expose :id, :project_id, :sha, :ref, :status
+ expose :id, :project_id, :sha, :ref, :status, :source
expose :created_at, :updated_at
- expose :source, if: ->(pipeline, options) { ::Feature.enabled?(:pipeline_source_filter, options[:project], default_enabled: :yaml) }
-
expose :web_url do |pipeline, _options|
Gitlab::Routing.url_helpers.project_pipeline_url(pipeline.project, pipeline)
end
diff --git a/lib/api/entities/ci/reset_registration_token_result.rb b/lib/api/entities/ci/reset_registration_token_result.rb
new file mode 100644
index 00000000000..23426432f68
--- /dev/null
+++ b/lib/api/entities/ci/reset_registration_token_result.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ module Ci
+ class ResetRegistrationTokenResult < Grape::Entity
+ expose(:token) {|object| object}
+ end
+ end
+ end
+end