| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3b31ade commit 9b374b2
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,6 +52,7 @@ API examples | |||
| 52 | 52 | gl_objects/protected_container_repositories | |
| 53 | 53 | gl_objects/protected_environments | |
| 54 | 54 | gl_objects/protected_packages | |
| 55 | + gl_objects/pull_mirror | ||
| 55 | 56 | gl_objects/releases | |
| 56 | 57 | gl_objects/runners | |
| 57 | 58 | gl_objects/remote_mirrors | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,38 @@ | |||
| 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() | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments