summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMathieu Parent <math.parent@gmail.com>2019-05-15 15:36:17 +0200
committerMathieu Parent <math.parent@gmail.com>2019-07-03 16:18:05 +0200
commit5f04d24934770e9aa366aac1400a302232eefd89 (patch)
treeb5d7f0fdce0cc9a925a7ee0c18164101d4b1b01b /lib
parenta7892e71714ad0f425547db12f205771dc270da5 (diff)
downloadgitlab-ce-5f04d24934770e9aa366aac1400a302232eefd89.tar.gz
Add build_coverage_regex to project API
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb1
-rw-r--r--lib/api/helpers/projects_helpers.rb2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 3bfaf63d912..3eb2d19c624 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -279,6 +279,7 @@ module API
project.build_allow_git_fetch ? 'fetch' : 'clone'
end
expose :build_timeout
+ expose :build_coverage_regex
expose :ci_config_path, if: -> (project, options) { Ability.allowed?(options[:current_user], :download_code, project) }
expose :shared_with_groups do |project, options|
SharedGroup.represent(project.project_group_links, options)
diff --git a/lib/api/helpers/projects_helpers.rb b/lib/api/helpers/projects_helpers.rb
index 7a806839856..956158b39a6 100644
--- a/lib/api/helpers/projects_helpers.rb
+++ b/lib/api/helpers/projects_helpers.rb
@@ -10,6 +10,7 @@ module API
optional :description, type: String, desc: 'The description of the project'
optional :build_git_strategy, type: String, values: %w(fetch clone), desc: 'The Git strategy. Defaults to `fetch`'
optional :build_timeout, type: Integer, desc: 'Build timeout'
+ optional :build_coverage_regex, type: String, desc: 'Test coverage parsing'
optional :ci_config_path, type: String, desc: 'The path to CI config file. Defaults to `.gitlab-ci.yml`'
# TODO: remove in API v5, replaced by *_access_level
@@ -60,6 +61,7 @@ module API
def self.update_params_at_least_one_of
[
+ :build_coverage_regex,
:build_git_strategy,
:build_timeout,
:builds_access_level,