@@ -148,13 +148,13 @@ private set
148148 public ILocalRepositoryModel LocalRepository { get ; }
149149
150150 /// <summary>
151- /// Gets the remote repository that contains the pull request.
151+ /// Gets the owner of the remote repository that contains the pull request.
152152 /// </summary>
153153 /// <remarks>
154154 /// The remote repository may be different from the local repository if the local
155155 /// repository is a fork and the user is viewing pull requests from the parent repository.
156156 /// </remarks>
157- public IRemoteRepositoryModel RemoteRepository { get ; private set ; }
157+ public string RemoteRepositoryOwner { get ; private set ; }
158158
159159 /// <summary>
160160 /// Gets the session for the pull request.
@@ -326,13 +326,13 @@ public IReadOnlyList<IPullRequestChangeNode> ChangedFilesTree
326326 public override void Initialize ( ViewWithData data )
327327 {
328328 int number ;
329- var repo = RemoteRepository ;
329+ var repoOwner = RemoteRepositoryOwner ;
330330
331331 if ( data != null )
332332 {
333333 var arg = ( PullRequestDetailArgument ) data . Data ;
334334 number = arg . Number ;
335- repo = arg . Repository ;
335+ repoOwner = arg . RepositoryOwner ;
336336 }
337337 else
338338 {
@@ -349,7 +349,7 @@ public override void Initialize(ViewWithData data)
349349 }
350350
351351 ErrorMessage = OperationError = null ;
352- modelService . GetPullRequest ( repo , number )
352+ modelService . GetPullRequest ( repoOwner , LocalRepository . Name , number )
353353 . TakeLast ( 1 )
354354 . ObserveOn ( RxApp . MainThreadScheduler )
355355 . Catch < IPullRequestModel , Exception > ( ex =>
@@ -359,23 +359,23 @@ public override void Initialize(ViewWithData data)
359359 IsLoading = IsBusy = false ;
360360 return Observable . Empty < IPullRequestModel > ( ) ;
361361 } )
362- . Subscribe ( x => Load ( repo , x ) . Forget ( ) ) ;
362+ . Subscribe ( x => Load ( repoOwner , x ) . Forget ( ) ) ;
363363 }
364364
365365 /// <summary>
366366 /// Loads the view model from octokit models.
367367 /// </summary>
368- /// <param name="remoteRepository ">The remote repository.</param>
368+ /// <param name="remoteRepositoryOwner ">The owner of the remote repository.</param>
369369 /// <param name="pullRequest">The pull request model.</param>
370- public async Task Load ( IRemoteRepositoryModel remoteRepository , IPullRequestModel pullRequest )
370+ public async Task Load ( string remoteRepositoryOwner , IPullRequestModel pullRequest )
371371 {
372- Guard . ArgumentNotNull ( remoteRepository , nameof ( remoteRepository ) ) ;
372+ Guard . ArgumentNotNull ( remoteRepositoryOwner , nameof ( remoteRepositoryOwner ) ) ;
373373
374374 try
375375 {
376376 var firstLoad = ( Model == null ) ;
377377 Model = pullRequest ;
378- RemoteRepository = remoteRepository ;
378+ RemoteRepositoryOwner = remoteRepositoryOwner ;
379379 Session = await sessionManager . GetSession ( pullRequest ) ;
380380 Title = Resources . PullRequestNavigationItemText + " #" + pullRequest . Number ;
381381
0 commit comments