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

Commit28eb7ea

Browse files
Flor1an-devFlorian Hartmann
authored and
Florian Hartmann
committed
feat(api): added support in the GroupManager to upload Group avatars
1 parent70cefe4 commit28eb7ea

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

‎docs/gl_objects/groups.rst‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ Update a group::
6161
group.description = 'My awesome group'
6262
group.save()
6363

64+
Set the avatar image for a group::
65+
66+
# the avatar image can be passed as data (content of the file) or as a file
67+
# object opened in binary mode
68+
group.avatar = open('path/to/file.png', 'rb')
69+
group.save()
70+
6471
Remove a group::
6572

6673
gl.groups.delete(group_id)

‎gitlab/v4/objects.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,6 +1513,7 @@ class GroupManager(CRUDMixin, RESTManager):
15131513
"default_branch_protection",
15141514
),
15151515
)
1516+
_types= {"avatar":types.ImageAttribute}
15161517

15171518
@exc.on_http_error(exc.GitlabImportError)
15181519
defimport_group(self,file,path,name,parent_id=None,**kwargs):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp