summaryrefslogtreecommitdiff
path: root/docs/gl_objects
diff options
context:
space:
mode:
Diffstat (limited to 'docs/gl_objects')
-rw-r--r--docs/gl_objects/remote_mirrors.rst34
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/gl_objects/remote_mirrors.rst b/docs/gl_objects/remote_mirrors.rst
new file mode 100644
index 0000000..ea4f72c
--- /dev/null
+++ b/docs/gl_objects/remote_mirrors.rst
@@ -0,0 +1,34 @@
+##########
+Project Remote Mirrors
+##########
+
+Remote Mirrors allow you to set up push mirroring for a project.
+
+References
+==========
+
+* v4 API:
+
+ + :class:`gitlab.v4.objects.ProjectRemoteMirror`
+ + :class:`gitlab.v4.objects.ProjectRemoteMirrorManager`
+ + :attr:`gitlab.v4.objects.Project.remote_mirrors`
+
+* GitLab API: https://docs.gitlab.com/ce/api/remote_mirrors.html
+
+Examples
+--------
+
+Get the list of a project's remote mirrors::
+
+ mirrors = project.remote_mirrors.list()
+
+Create (and enable) a remote mirror for a project::
+
+ mirror = project.wikis.create({'url': 'https://gitlab.com/example.git',
+ 'enabled': True})
+
+Update an existing remote mirror's attributes::
+
+ mirror.enabled = False
+ mirror.only_protected_branches = True
+ mirror.save()