debian-mirror-gitlab/lib/gitlab/git/remote_mirror.rb

19 lines
429 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
module Gitlab
module Git
class RemoteMirror
2018-12-13 13:39:08 +05:30
include Gitlab::Git::WrapsGitalyErrors
2019-01-03 12:48:30 +05:30
def initialize(repository, ref_name)
2018-03-17 18:26:18 +05:30
@repository = repository
@ref_name = ref_name
end
2019-01-03 12:48:30 +05:30
def update(only_branches_matching: [])
2018-12-13 13:39:08 +05:30
wrapped_gitaly_errors do
2019-01-03 12:48:30 +05:30
@repository.gitaly_remote_client.update_remote_mirror(@ref_name, only_branches_matching)
2018-03-17 18:26:18 +05:30
end
end
end
end
end