diff options
author | Fabio Pitino <fpitino@gitlab.com> | 2019-06-07 12:51:42 +0100 |
---|---|---|
committer | Fabio Pitino <fpitino@gitlab.com> | 2019-06-12 09:51:45 +0100 |
commit | 3ac527b4889b9465b2d55ca0c9317a3e8479a625 (patch) | |
tree | 2cf311b5a19d9c1d4a2f25922fa55ec2a29351ab /app/services | |
parent | 641d332351907b77b53b0cb23ff51ccea2489824 (diff) | |
download | gitlab-ce-3ac527b4889b9465b2d55ca0c9317a3e8479a625.tar.gz |
Expose ci_default_git_depth via project APIexpose-project-git-depth-via-api
Enable Get and Update of ci_default_git_depth for
Project API.
Renaming Project#default_git_depth to :ci_default_git_depth
to give more context through the API usage.
Add API documentation
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/fork_service.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/services/projects/fork_service.rb b/app/services/projects/fork_service.rb index 0b4ab7b8e4d..d8fa9d37359 100644 --- a/app/services/projects/fork_service.rb +++ b/app/services/projects/fork_service.rb @@ -43,10 +43,10 @@ module Projects shared_runners_enabled: @project.shared_runners_enabled, namespace_id: target_namespace.id, fork_network: fork_network, - # We need to set default_git_depth to 0 for the forked project when - # @project.default_git_depth is nil in order to keep the same behaviour + # We need to set ci_default_git_depth to 0 for the forked project when + # @project.ci_default_git_depth is nil in order to keep the same behaviour # and not get ProjectCiCdSetting::DEFAULT_GIT_DEPTH set on create - ci_cd_settings_attributes: { default_git_depth: @project.default_git_depth || 0 }, + ci_cd_settings_attributes: { default_git_depth: @project.ci_default_git_depth || 0 }, # We need to assign the fork network membership after the project has # been instantiated to avoid ActiveRecord trying to create it when # initializing the project, as that would cause a foreign key constraint |