Module: Gitlab::Client::RemoteMirrors
- Included in:
- Gitlab::Client
- Defined in:
- lib/gitlab/client/remote_mirrors.rb
Overview
Defines methods related to remote mirrors.
Instance Method Summary collapse
-
#create_remote_mirror(project, url, options = {}) ⇒ Gitlab::ObjectifiedHash
Create a remote mirror.
-
#edit_remote_mirror(project, id, options = {}) ⇒ Gitlab::ObjectifiedHash
Update a remote mirror’s attributes.
-
#remote_mirrors(project) ⇒ Array<Gitlab::ObjectifiedHash>
List a project’s remote mirrors.
Instance Method Details
#create_remote_mirror(project, url, options = {}) ⇒ Gitlab::ObjectifiedHash
Create a remote mirror
31 32 33 |
# File 'lib/gitlab/client/remote_mirrors.rb', line 31 def create_remote_mirror(project, url, = {}) post("/projects/#{url_encode project}/remote_mirrors", body: .merge(url: url)) end |
#edit_remote_mirror(project, id, options = {}) ⇒ Gitlab::ObjectifiedHash
Update a remote mirror’s attributes
47 48 49 |
# File 'lib/gitlab/client/remote_mirrors.rb', line 47 def edit_remote_mirror(project, id, = {}) put("/projects/#{url_encode project}/remote_mirrors/#{id}", body: ) end |
#remote_mirrors(project) ⇒ Array<Gitlab::ObjectifiedHash>
List a project’s remote mirrors
15 16 17 |
# File 'lib/gitlab/client/remote_mirrors.rb', line 15 def remote_mirrors(project) get("/projects/#{url_encode project}/remote_mirrors") end |