Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-15 12:25:26 +0300
committerRémy Coutable <remy@rymai.me>2017-02-15 12:25:26 +0300
commitfea03a73cfa46afa7973e38222110e12674f78cf (patch)
treebfc9826b7d464b16c55b712974586928ecc02c4e /lib/api
parent1452729304393978ec93b712130dff6687db01b9 (diff)
parent0f206980d770826d887674e5182fa2bef232cde2 (diff)
Merge branch 'pass_coverage_value_to_commit_status_api' into 'master'
Make it possible to pass coverage value to commit status API Closes #27807 See merge request !9214
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/commit_statuses.rb4
-rw-r--r--lib/api/entities.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/api/commit_statuses.rb b/lib/api/commit_statuses.rb
index b6e6820c3f4..0b6076bd28c 100644
--- a/lib/api/commit_statuses.rb
+++ b/lib/api/commit_statuses.rb
@@ -46,6 +46,7 @@ module API
optional :description, type: String, desc: 'A short description of the status'
optional :name, type: String, desc: 'A string label to differentiate this status from the status of other systems. Default: "default"'
optional :context, type: String, desc: 'A string label to differentiate this status from the status of other systems. Default: "default"'
+ optional :coverage, type: Float, desc: 'The total code coverage'
end
post ':id/statuses/:sha' do
authorize! :create_commit_status, user_project
@@ -75,7 +76,8 @@ module API
name: name,
ref: ref,
target_url: params[:target_url],
- description: params[:description]
+ description: params[:description],
+ coverage: params[:coverage]
)
render_validation_error!(status) if status.invalid?
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 2a071e649fa..d4234ffe818 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -367,7 +367,7 @@ module API
class CommitStatus < Grape::Entity
expose :id, :sha, :ref, :status, :name, :target_url, :description,
- :created_at, :started_at, :finished_at, :allow_failure
+ :created_at, :started_at, :finished_at, :allow_failure, :coverage
expose :author, using: Entities::UserBasic
end