File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,13 @@ class owner extends Base {
3636 */
3737 getGroup ( ) {
3838 return new Promise ( ( resolve , reject ) => {
39- this . get ( `groups/?search=${ encodeURIComponent ( this . config . get ( 'project' ) ) } ` )
40- . then ( group => {
41- if ( group . body . length === 0 ) return reject ( 'Group not found' ) ;
42- let filtered = group . body . filter ( u => u . path === this . config . get ( 'project' ) ) ;
43- if ( filtered . length === 0 ) return reject ( ) ;
39+ this . get ( `groups` )
40+ . then ( groups => {
41+ if ( groups . body . length === 0 ) return reject ( 'Group not found' ) ;
42+ groups = groups . body ;
43+
44+ let filtered = groups . filter ( group => group . full_path === this . config . get ( 'project' ) ) ;
45+ if ( filtered . length === 0 ) return reject ( 'Group not found' ) ;
4446 this . groups = this . groups . concat ( filtered ) ;
4547 resolve ( ) ;
4648 } )
You can’t perform that action at this time.
0 commit comments