Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b374b2

Browse files
nicoklausnejch
authored andcommitted
docs: add usage of pull mirror
1 parent3b31ade commit9b374b2

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

‎docs/api-objects.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

‎docs/gl_objects/pull_mirror.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp