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

Commitcda2d59

Browse files
author
Gauvain Pocentek
committed
[v4] Fix the CLI for project files
1 parentf00562c commitcda2d59

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

‎gitlab/v4/objects.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,6 +1374,7 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin,
13741374
_update_attrs= (('file_path','branch','content','commit_message'),
13751375
('encoding','author_email','author_name'))
13761376

1377+
@cli.register_custom_action('ProjectFileManager', ('file_path','ref'))
13771378
defget(self,file_path,ref,**kwargs):
13781379
"""Retrieve a single file.
13791380
@@ -1392,6 +1393,10 @@ def get(self, file_path, ref, **kwargs):
13921393
file_path=file_path.replace('/','%2F')
13931394
returnGetMixin.get(self,file_path,ref=ref,**kwargs)
13941395

1396+
@cli.register_custom_action('ProjectFileManager',
1397+
('file_path','branch','content',
1398+
'commit_message'),
1399+
('encoding','author_email','author_name'))
13951400
@exc.on_http_error(exc.GitlabCreateError)
13961401
defcreate(self,data,**kwargs):
13971402
"""Create a new object.
@@ -1416,6 +1421,8 @@ def create(self, data, **kwargs):
14161421
server_data=self.gitlab.http_post(path,post_data=data,**kwargs)
14171422
returnself._obj_cls(self,server_data)
14181423

1424+
@cli.register_custom_action('ProjectFileManager', ('file_path','branch',
1425+
'commit_message'))
14191426
@exc.on_http_error(exc.GitlabDeleteError)
14201427
defdelete(self,file_path,branch,commit_message,**kwargs):
14211428
"""Delete a file on the server.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp