This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/GitHub.App/ViewModels/GitHubPane
test/GitHub.App.UnitTests/ViewModels/GitHubPane Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,8 @@ public PullRequestCreationViewModel(
8282 . Where ( _ => TargetBranch != null )
8383 . Subscribe ( x =>
8484 {
85- if ( ! x . Any ( t => t . Equals ( TargetBranch ) ) )
85+ // HACK: Why is `t` null?
86+ if ( ! x . Any ( t => t != null && t . Equals ( TargetBranch ) ) )
8687 {
8788 TargetBranch = GitHubRepository . IsFork ? GitHubRepository . Parent . DefaultBranch : GitHubRepository . DefaultBranch ;
8889 }
Original file line number Diff line number Diff line change @@ -81,12 +81,12 @@ static TestData PrepareTestData(
8181
8282 connection . HostAddress . Returns ( HostAddress . Create ( "https://github.com" ) ) ;
8383
84- // this is the local repo instance that is available via TeamExplorerServiceHolder and friends
85- var activeRepo = Substitute . For < LocalRepositoryModel > ( ) ;
86- activeRepo . LocalPath . Returns ( "" ) ;
87- activeRepo . Name . Returns ( repoName ) ;
88- activeRepo . CloneUrl . Returns ( new UriString ( "http://github.com/" + sourceRepoOwner + "/" + repoName ) ) ;
89- activeRepo . Owner . Returns ( sourceRepoOwner ) ;
84+ var activeRepo = new LocalRepositoryModel
85+ {
86+ LocalPath = "" ,
87+ Name = repoName ,
88+ CloneUrl = new UriString ( "http://github.com/" + sourceRepoOwner + "/" + repoName )
89+ } ;
9090
9191 Repository githubRepoParent = null ;
9292 if ( repoIsFork )
You can’t perform that action at this time.
0 commit comments