Skip to content

feat(api): added support in the GroupManager to upload Group avatars #1077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

Flor1an-dev
Copy link
Contributor

Similar to the UserManager and ProjectManager the GroupManager now supports uploading avatar images. The GroupManager object was missing the ImageAttribute type.

The feature to upload avatars to groups was introduced in Gitlab 12.9.
See also https://docs.gitlab.com/ce/api/groups.html#new-group (Attribute "avatar")

@Flor1an-dev Flor1an-dev changed the title feat(api): Added support in the GroupManager to upload Group avatars. feat(api): added support in the GroupManager to upload Group avatars Apr 16, 2020
Copy link
Member

@nejch nejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Flor1an-dev nice catch, thanks! Hard to keep up with the little details in the API sometimes it seems 😄

If you don't mind, we could also add this to the docs for Groups API like we do for Projects and users API (see example below)?

Set the avatar image for a project::
# the avatar image can be passed as data (content of the file) or as a file
# object opened in binary mode
project.avatar = open('path/to/file.png', 'rb')
project.save()

@Flor1an-dev
Copy link
Contributor Author

@nejch I've added the documentation as well :)

@nejch nejch merged commit 7907e5a into python-gitlab:master Apr 17, 2020
@nejch
Copy link
Member

nejch commented Apr 17, 2020

@nejch I've added the documentation as well :)

Thanks again! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants