@@ -420,7 +420,6 @@ def delete_hook(self, auth, username, repo_name, hook_id):
420
420
"""
421
421
path = "/repos/{u}/{r}/hooks/{i}" .format (u = username , r = repo_name , i = hook_id )
422
422
response = self ._check_ok (self ._delete (path , auth = auth ))
423
- return response
424
423
425
424
def create_organization (self , auth , username , org_name , full_name = None , avatar_url = None , description = None , website = None , location = None ):
426
425
"""
@@ -457,7 +456,7 @@ def create_organization_team(self, auth, org_name, name, description=None, permi
457
456
458
457
:param auth.Authentication auth: authentication object, must be admin-level
459
458
:param str org_name: [Required] Organization user name
460
- :param str team_name : Full name of the team
459
+ :param str name : Full name of the team
461
460
:param str description: Description to the team
462
461
:param str permission: Team permission, can be read, write or admin, default is read
463
462
:return: a representation of the created team
@@ -484,14 +483,11 @@ def add_team_membership(self, auth, team_id, username):
484
483
:param auth.Authentication auth: authentication object, must be admin-level
485
484
:param str team_id: [Required] Id of the team
486
485
:param str username: Username of the user to be added to team
487
- :return: status code of the request
488
- :rtype: str
489
486
:raises NetworkFailure: if there is an error communicating with the server
490
487
:raises ApiFailure: if the request cannot be serviced
491
488
"""
492
489
url = "/admin/teams/{t}/members/{u}" .format (t = team_id , u = username )
493
- response = self ._put (url , auth = auth )
494
- return self ._check_ok (response )
490
+ response = self ._check_ok (self ._put (url , auth = auth ))
495
491
496
492
def remove_team_membership (self , auth , team_id , username ):
497
493
"""
@@ -500,14 +496,11 @@ def remove_team_membership(self, auth, team_id, username):
500
496
:param auth.Authentication auth: authentication object, must be admin-level
501
497
:param str team_id: [Required] Id of the team
502
498
:param str username: Username of the user to be removed from the team
503
- :return: status code of the request
504
- :rtype: str
505
499
:raises NetworkFailure: if there is an error communicating with the server
506
500
:raises ApiFailure: if the request cannot be serviced
507
501
"""
508
502
url = "/admin/teams/{t}/members/{u}" .format (t = team_id , u = username )
509
- response = self ._delete (url , auth = auth )
510
- return self ._check_ok (response )
503
+ response = self ._check_ok (self ._delete (url , auth = auth ))
511
504
512
505
def add_repo_to_team (self , auth , team_id , repo_name ):
513
506
"""
@@ -516,15 +509,11 @@ def add_repo_to_team(self, auth, team_id, repo_name):
516
509
:param auth.Authentication auth: authentication object, must be admin-level
517
510
:param str team_id: [Required] Id of the team
518
511
:param str repo_name: Name of the repo to be added to the team
519
- :return: status code of the request
520
- :rtype: str
521
512
:raises NetworkFailure: if there is an error communicating with the server
522
513
:raises ApiFailure: if the request cannot be serviced
523
514
"""
524
515
url = "/admin/teams/{t}/repos/{r}" .format (t = team_id , r = repo_name )
525
- response = self ._put (url , auth = auth )
526
- return self ._check_ok (response )
527
-
516
+ response = self ._check_ok (self ._put (url , auth = auth ))
528
517
529
518
def remove_repo_from_team (self , auth , team_id , repo_name ):
530
519
"""
@@ -533,14 +522,11 @@ def remove_repo_from_team(self, auth, team_id, repo_name):
533
522
:param auth.Authentication auth: authentication object, must be admin-level
534
523
:param str team_id: [Required] Id of the team
535
524
:param str repo_name: Name of the repo to be removed from the team
536
- :return: status code of the request
537
- :rtype: str
538
525
:raises NetworkFailure: if there is an error communicating with the server
539
526
:raises ApiFailure: if the request cannot be serviced
540
527
"""
541
528
url = "/admin/teams/{t}/repos/{r}" .format (t = team_id , r = repo_name )
542
- response = self ._delete (url , auth = auth )
543
- return self ._check_ok (response )
529
+ response = self ._check_ok (self ._delete (url , auth = auth ))
544
530
545
531
def list_deploy_keys (self , auth , username , repo_name ):
546
532
"""
0 commit comments