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

Commitebd6217

Browse files
author
Gauvain Pocentek
committed
Add support for Project.pull_mirror (EE)
1 parentf4c4e52 commitebd6217

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

‎docs/gl_objects/projects.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ Get a list of users for the repository::
193193
# search for users
194194
users = p.users.list(search='pattern')
195195

196+
Start the pull mirroring process (EE edition)::
197+
198+
project.mirror_pull()
199+
196200
Import / Export
197201
===============
198202

@@ -331,7 +335,7 @@ Update a file. The entire content must be uploaded, as plain text or as base64
331335
encoded text::
332336

333337
f.content = 'new content'
334-
f.save(branch='master', commit_message='Update testfile')
338+
f.save(branch='master', commit_message='Update testfile')
335339

336340
# or for binary data
337341
# Note: decode() is required with python 3 for data serialization. You can omit

‎gitlab/v4/objects.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3357,6 +3357,21 @@ def search(self, scope, search, **kwargs):
33573357
path='/projects/%d/search'%self.get_id()
33583358
returnself.manager.gitlab.http_list(path,query_data=data,**kwargs)
33593359

3360+
@cli.register_custom_action('Project')
3361+
@exc.on_http_error(exc.GitlabCreateError)
3362+
defmirror_pull(self,**kwargs):
3363+
"""Start the pull mirroring process for the project.
3364+
3365+
Args:
3366+
**kwargs: Extra options to send to the server (e.g. sudo)
3367+
3368+
Raises:
3369+
GitlabAuthenticationError: If authentication is not correct
3370+
GitlabCreateError: If the server failed to perform the request
3371+
"""
3372+
path='/projects/%d/mirror/pull'%self.get_id()
3373+
returnself.manager.gitlab.http_post(path,**kwargs)
3374+
33603375

33613376
classProjectManager(CRUDMixin,RESTManager):
33623377
_path='/projects'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp