This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,16 @@ public string LocalRepositoryName
3939 IApiClient apiClient )
4040 {
4141 return Observable . Defer ( ( ) => apiClient . CreateRepository ( newRepository , account . Login , account . IsUser )
42- . Select ( remoteRepo => new { RemoteRepo = remoteRepo , LocalRepo = activeRepository } ) )
43- . SelectMany ( repo => gitClient . SetRemote ( repo . LocalRepo , "origin" , new Uri ( repo . RemoteRepo . CloneUrl ) ) . ToObservable ( ) . Select ( _ => repo ) )
44- . SelectMany ( repo => gitClient . Push ( repo . LocalRepo , "master" , "origin" ) . ToObservable ( ) . Select ( _ => repo ) )
45- . SelectMany ( repo => gitClient . Fetch ( repo . LocalRepo , "origin" ) . ToObservable ( ) . Select ( _ => repo ) )
46- . SelectMany ( repo => gitClient . SetTrackingBranch ( repo . LocalRepo , "master" , "origin" ) . ToObservable ( ) . Select ( _ => repo . RemoteRepo ) ) ;
42+ . Select ( remoteRepo => new { RemoteRepo = remoteRepo , LocalRepo = activeRepository } ) )
43+ . Select ( async repo =>
44+ {
45+ await gitClient . SetRemote ( repo . LocalRepo , "origin" , new Uri ( repo . RemoteRepo . CloneUrl ) ) ;
46+ await gitClient . Push ( repo . LocalRepo , "master" , "origin" ) ;
47+ await gitClient . Fetch ( repo . LocalRepo , "origin" ) ;
48+ await gitClient . SetTrackingBranch ( repo . LocalRepo , "master" , "origin" ) ;
49+ return repo . RemoteRepo ;
50+ } )
51+ . Select ( t => t . Result ) ;
4752 }
4853 }
4954}
You can’t perform that action at this time.
0 commit comments