2018-09-29 18:34:47 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-04-03 13:57:55 -04:00
|
|
|
module API
|
2020-10-14 20:08:42 -04:00
|
|
|
class ProjectSnapshots < ::API::Base
|
2018-04-03 13:57:55 -04:00
|
|
|
helpers ::API::Helpers::ProjectSnapshotsHelpers
|
|
|
|
|
|
|
|
before { authorize_read_git_snapshot! }
|
|
|
|
|
2020-10-30 14:08:56 -04:00
|
|
|
feature_category :source_code_management
|
|
|
|
|
2018-04-03 13:57:55 -04:00
|
|
|
resource :projects do
|
|
|
|
desc 'Download a (possibly inconsistent) snapshot of a repository' do
|
|
|
|
detail 'This feature was introduced in GitLab 10.7'
|
|
|
|
end
|
|
|
|
params do
|
|
|
|
optional :wiki, type: Boolean, desc: 'Set to true to receive the wiki repository'
|
|
|
|
end
|
|
|
|
get ':id/snapshot' do
|
|
|
|
send_git_snapshot(snapshot_repository)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|