diff options
author | Micaël Bergeron <mbergeron@gitlab.com> | 2018-03-22 09:06:10 -0400 |
---|---|---|
committer | Micaël Bergeron <mbergeron@gitlab.com> | 2018-03-22 09:06:10 -0400 |
commit | 9c6663ea079128bb730ec2a168b43961cd9462ec (patch) | |
tree | 4f62c2e745c7f3e8571ee8c023abcce316c68275 /lib/api | |
parent | 6801a93e5e7447199b091e44f33c96d22a1a1960 (diff) | |
parent | c01697539c3da4e72b1812662ff35d1f709d1dcc (diff) | |
download | gitlab-ce-9c6663ea079128bb730ec2a168b43961cd9462ec.tar.gz |
Merge remote-tracking branch 'origin/master' into 40781-os-to-ce
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/helpers/internal_helpers.rb | 2 | ||||
-rw-r--r-- | lib/api/helpers/related_resources_helpers.rb | 2 | ||||
-rw-r--r-- | lib/api/project_export.rb | 7 | ||||
-rw-r--r-- | lib/api/search.rb | 4 | ||||
-rw-r--r-- | lib/api/services.rb | 2 |
5 files changed, 11 insertions, 6 deletions
diff --git a/lib/api/helpers/internal_helpers.rb b/lib/api/helpers/internal_helpers.rb index 4b564cfdef2..14648588dfd 100644 --- a/lib/api/helpers/internal_helpers.rb +++ b/lib/api/helpers/internal_helpers.rb @@ -109,7 +109,7 @@ module API # Return the Gitaly Address if it is enabled def gitaly_payload(action) - return unless %w[git-receive-pack git-upload-pack].include?(action) + return unless %w[git-receive-pack git-upload-pack git-upload-archive].include?(action) { repository: repository.gitaly_repository, diff --git a/lib/api/helpers/related_resources_helpers.rb b/lib/api/helpers/related_resources_helpers.rb index 1f677529b07..7f4d6e58b34 100644 --- a/lib/api/helpers/related_resources_helpers.rb +++ b/lib/api/helpers/related_resources_helpers.rb @@ -15,7 +15,7 @@ module API url_options = Gitlab::Application.routes.default_url_options protocol, host, port = url_options.slice(:protocol, :host, :port).values - URI::HTTP.build(scheme: protocol, host: host, port: port, path: path).to_s + URI::Generic.build(scheme: protocol, host: host, port: port, path: path).to_s end private diff --git a/lib/api/project_export.rb b/lib/api/project_export.rb index 03d5373312e..efc4a33ae1b 100644 --- a/lib/api/project_export.rb +++ b/lib/api/project_export.rb @@ -31,8 +31,13 @@ module API desc 'Start export' do detail 'This feature was introduced in GitLab 10.6.' end + params do + optional :description, type: String, desc: 'Override the project description' + end post ':id/export' do - user_project.add_export_job(current_user: current_user) + project_export_params = declared_params(include_missing: false) + + user_project.add_export_job(current_user: current_user, params: project_export_params) accepted! end diff --git a/lib/api/search.rb b/lib/api/search.rb index 3556ad98c52..5d9ec617cb7 100644 --- a/lib/api/search.rb +++ b/lib/api/search.rb @@ -84,7 +84,7 @@ module API values: %w(projects issues merge_requests milestones) use :pagination end - get ':id/-/search' do + get ':id/(-/)search' do present search(group_id: user_group.id), with: entity end end @@ -103,7 +103,7 @@ module API values: %w(issues merge_requests milestones notes wiki_blobs commits blobs) use :pagination end - get ':id/-/search' do + get ':id/(-/)search' do present search(project_id: user_project.id), with: entity end end diff --git a/lib/api/services.rb b/lib/api/services.rb index 6c97659166d..794fdab8f2b 100644 --- a/lib/api/services.rb +++ b/lib/api/services.rb @@ -735,7 +735,7 @@ module API required: false, name: event_name.to_sym, type: String, - desc: ServicesHelper.service_event_description(event_name) + desc: service.event_description(event_name) } end end |