Class: Gitlab::Git::RemoteMirror
- Inherits:
-
Object
- Object
- Gitlab::Git::RemoteMirror
- Includes:
- WrapsGitalyErrors
- Defined in:
- lib/gitlab/git/remote_mirror.rb
Instance Attribute Summary collapse
-
#keep_divergent_refs ⇒ Object
readonly
Returns the value of attribute keep_divergent_refs.
-
#known_hosts ⇒ Object
readonly
Returns the value of attribute known_hosts.
-
#only_branches_matching ⇒ Object
readonly
Returns the value of attribute only_branches_matching.
-
#remote_url ⇒ Object
readonly
Returns the value of attribute remote_url.
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
-
#ssh_key ⇒ Object
readonly
Returns the value of attribute ssh_key.
Instance Method Summary collapse
-
#initialize(repository, remote_url, only_branches_matching: [], ssh_key: nil, known_hosts: nil, keep_divergent_refs: false) ⇒ RemoteMirror
constructor
A new instance of RemoteMirror.
- #update ⇒ Object
Methods included from WrapsGitalyErrors
Constructor Details
#initialize(repository, remote_url, only_branches_matching: [], ssh_key: nil, known_hosts: nil, keep_divergent_refs: false) ⇒ RemoteMirror
Returns a new instance of RemoteMirror.
10 11 12 13 14 15 16 17 |
# File 'lib/gitlab/git/remote_mirror.rb', line 10 def initialize(repository, remote_url, only_branches_matching: [], ssh_key: nil, known_hosts: nil, keep_divergent_refs: false) @repository = repository @remote_url = remote_url @only_branches_matching = only_branches_matching @ssh_key = ssh_key @known_hosts = known_hosts @keep_divergent_refs = keep_divergent_refs end |
Instance Attribute Details
#keep_divergent_refs ⇒ Object (readonly)
Returns the value of attribute keep_divergent_refs.
8 9 10 |
# File 'lib/gitlab/git/remote_mirror.rb', line 8 def keep_divergent_refs @keep_divergent_refs end |
#known_hosts ⇒ Object (readonly)
Returns the value of attribute known_hosts.
8 9 10 |
# File 'lib/gitlab/git/remote_mirror.rb', line 8 def known_hosts @known_hosts end |
#only_branches_matching ⇒ Object (readonly)
Returns the value of attribute only_branches_matching.
8 9 10 |
# File 'lib/gitlab/git/remote_mirror.rb', line 8 def only_branches_matching @only_branches_matching end |
#remote_url ⇒ Object (readonly)
Returns the value of attribute remote_url.
8 9 10 |
# File 'lib/gitlab/git/remote_mirror.rb', line 8 def remote_url @remote_url end |
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
8 9 10 |
# File 'lib/gitlab/git/remote_mirror.rb', line 8 def repository @repository end |
#ssh_key ⇒ Object (readonly)
Returns the value of attribute ssh_key.
8 9 10 |
# File 'lib/gitlab/git/remote_mirror.rb', line 8 def ssh_key @ssh_key end |
Instance Method Details
#update ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/gitlab/git/remote_mirror.rb', line 19 def update wrapped_gitaly_errors do repository.gitaly_remote_client.update_remote_mirror( remote_url, only_branches_matching, ssh_key: ssh_key, known_hosts: known_hosts, keep_divergent_refs: keep_divergent_refs ) end end |