@@ -48,9 +48,11 @@ public function update(array $params)
4848
4949 public function remove ()
5050 {
51- return $ this ->api ('organization ' )->teams ()->remove (
51+ $ this ->api ('organization ' )->teams ()->remove (
5252 $ this ->id
5353 );
54+
55+ return true ;
5456 }
5557
5658 public function members ()
@@ -69,26 +71,32 @@ public function members()
6971
7072 public function check ($ login )
7173 {
72- return $ this ->api ('organization ' )->teams ()->check (
74+ $ this ->api ('organization ' )->teams ()->check (
7375 $ this ->id ,
7476 $ login
7577 );
78+
79+ return true ;
7680 }
7781
7882 public function addMember ($ login )
7983 {
80- return $ this ->api ('organization ' )->teams ()->addMember (
84+ $ this ->api ('organization ' )->teams ()->addMember (
8185 $ this ->id ,
8286 $ login
8387 );
88+
89+ return true ;
8490 }
8591
8692 public function removeMember ($ login )
8793 {
88- return $ this ->api ('organization ' )->teams ()->removeMember (
94+ $ this ->api ('organization ' )->teams ()->removeMember (
8995 $ this ->id ,
9096 $ login
9197 );
98+
99+ return true ;
92100 }
93101
94102 public function repositories ()
@@ -105,35 +113,49 @@ public function repositories()
105113 return $ repos ;
106114 }
107115
108- public function repository ($ login , $ repository )
116+ public function repository ($ repository )
109117 {
118+ if ($ repository instanceof Repo) {
119+ $ repository = $ repository ->name ;
120+ }
121+
110122 $ data = $ this ->api ('organization ' )->teams ()->repository (
111123 $ this ->id ,
112- $ login ,
124+ $ this -> org -> login ,
113125 $ repository
114126 );
115127
116128 return Repo::fromArray ($ data );
117129 }
118130
119- public function addRepository ($ login , $ repository )
131+ public function addRepository ($ repository )
120132 {
121- $ data = $ this ->api ('organization ' )->teams ()->addRepository (
133+ if ($ repository instanceof Repo) {
134+ $ repository = $ repository ->name ;
135+ }
136+
137+ $ this ->api ('organization ' )->teams ()->addRepository (
122138 $ this ->id ,
123- $ login ,
139+ $ this -> org -> login ,
124140 $ repository
125141 );
126142
127- return Repo:: fromArray ( $ data ) ;
143+ return true ;
128144 }
129145
130- public function removeRepository ($ login , $ repository )
146+ public function removeRepository ($ repository )
131147 {
132- return $ this ->api ('organization ' )->teams ()->removeRepository (
148+ if ($ repository instanceof Repo) {
149+ $ repository = $ repository ->name ;
150+ }
151+
152+ $ this ->api ('organization ' )->teams ()->removeRepository (
133153 $ this ->id ,
134- $ login ,
154+ $ this -> org -> login ,
135155 $ repository
136156 );
157+
158+ return true ;
137159 }
138160
139161}
0 commit comments