File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ API examples
5252 gl_objects/protected_container_repositories
5353 gl_objects/protected_environments
5454 gl_objects/protected_packages
55+ gl_objects/pull_mirror
5556 gl_objects/releases
5657 gl_objects/runners
5758 gl_objects/remote_mirrors
Original file line number Diff line number Diff line change 1+ ######################
2+ Project Pull Mirror
3+ ######################
4+
5+ Pull Mirror allow you to set up pull mirroring for a project.
6+
7+ References
8+ ==========
9+
10+ * v4 API:
11+
12+ + :class: `gitlab.v4.objects.ProjectPullMirror `
13+ + :class: `gitlab.v4.objects.ProjectPullMirrorManager `
14+ + :attr: `gitlab.v4.objects.Project.pull_mirror `
15+
16+ * GitLab API: https://docs.gitlab.com/ce/api/pull_mirror.html
17+
18+ Examples
19+ --------
20+
21+ Get the current pull mirror of a project::
22+
23+ mirrors = project.pull_mirror.get()
24+
25+ Create (and enable) a remote mirror for a project::
26+
27+ mirror = project.pull_mirror.create({'url': 'https://gitlab.com/example.git',
28+ 'enabled': True})
29+
30+ Update an existing remote mirror's attributes::
31+
32+ mirror.enabled = False
33+ mirror.only_protected_branches = True
34+ mirror.save()
35+
36+ Start an sync of the pull mirror::
37+
38+ mirror.start()
You can’t perform that action at this time.
0 commit comments