- Notifications
You must be signed in to change notification settings - Fork673
Add support for Project badges#507
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ae24fa9
to802b2d4
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for this patch!
It would be great to have some functional testing intools/python_test_v4.py
.
And extra points if you can add some documentation.
_path = '/projects/%(project_id)s/badges' | ||
_obj_cls = ProjectBadge | ||
_from_parent_attrs = {'project_id': 'id'} | ||
_create_attrs = (('link_url', 'image_url'), tuple()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It is also possible to update the badge objects, so could you define the_update_attrs
variable as well?
gitlab/v4/objects.py Outdated
@@ -2505,6 +2516,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject): | |||
('triggers', 'ProjectTriggerManager'), | |||
('variables', 'ProjectVariableManager'), | |||
('wikis', 'ProjectWikiManager'), | |||
('badges', 'ProjectBadgeManager'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Could you move this line to keep the list sorted?
@gpocentek thanks for the feedback. Can you review the latest commit, it should add tests, the update_attrs etc... ? |
Thanks! |
@gpocentek I would love to see this release in a v1.5.0 to start using it in production from PyPi |
Add support for project badgeshttps://docs.gitlab.com/ee/api/project_badges.html