File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,11 @@ async function setUpTravis (pkg, info) {
8888  log . info ( 'Syncing repositories...' ) 
8989  await  syncTravis ( travis ) 
9090
91-   const  { repo}  =  await  promisify ( travis . repos ( info . ghrepo . slug [ 0 ] ,  info . ghrepo . slug [ 1 ] ) . get . bind ( travis ) ) ( ) 
92-   travis . repoid  =  repo . id 
91+   travis . repoid  =  _ . get ( await  promisify ( travis . repos ( info . ghrepo . slug [ 0 ] ,  info . ghrepo . slug [ 1 ] ) . get . bind ( travis ) ) ( ) ,  'repo.id' ) 
9392
94-   const  { result}  =  await  promisify ( travis . hooks ( repo . id ) . put . bind ( travis ) ) ( { 
93+   if  ( ! travis . repoid )  throw  new  Error ( 'Could not get repo id' ) 
94+ 
95+   const  { result}  =  await  promisify ( travis . hooks ( travis . repoid ) . put . bind ( travis ) ) ( { 
9596    hook : { active : true } 
9697  } ) 
9798  if  ( ! result )  throw  new  Error ( 'Could not enable hook on Travis CI' ) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments