Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

@jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Nov 6, 2018

TODO: This PR should target refactor/repository-model-part3 (set this after first commit).

Depends on #2008
Depends on #2025
Depends on #2028

Still to do

Possible bugs

Refactor the constructor that took IGitService into
LocalRepositoryModel where it was used.
Move GenerateUrl from LocalRepositoryModel to LinkCommandBase.
Move LocalRepositoryModel construction tests to new home.
This property wasn't being used.
We Now only need the CreateLocalRepositoryModel(localPath) overload.
Previously the current branch was being read when CurrentBranch was
fetched. This changes it to be read when the LocalRepositoryModel is
created.
Remove redundant code and usings.
Previously CurrentBranch was created as the property was read. We now
need a way to refresh it.
It appears VSGitExt.ActiveRepositoriesChanged is fired before the local
repository has actually changed its branch. This means we can't read
the branch information immediately!
Remove the ILocalRepositoryModel.CurrentBranch property and explicitly
call IGitService.CreateCurrentBranchModel instead.
Fix all the broken tests.
Convert GetPullRequestForCurrentBranch to return (string owner, int
number). This allows the tuple to be compared directly.
We can now use GitService as a LocalRepositoryMode factory.
Be explicit about what it does.
Make ITeamExplorerServiceHolder responsible for holding references to
services, but not watching for and marshaling repository change events.
Delegate to ITeamExplorerContext for this.
This is no longer called by TeamExplorerServiceHolder.
Contains a call chain that results in a call to a virtual method
defined by the class.
Make log message a bit less bit yoda-y.
Removed dead and buggy code from BranchModel constructorer. We
construct BranchModel from the HEAD branch, which isn't a remote
branch. No need to construct a RepositoryModel from a URL.
BranchModel is now a pure model. 🎉
RepositoryModel and RemoteRepositoryModel are now pure models without
interfaces.
Convert them from using NSubstitute to creating the model object.
Not sure why branch in PullRequestCreationViewModel.Branches is coming
up null in unit test. Need to investigate.
Tests started throwing null reference exceptions when we stopped using
an interface for BranchModel. This makes PrepareTestData default to
return no branches.
Remove Octokit.Repository dependency from RemoteRepositoryModel.
Fix warnings in LocalRepositoryModelDesigner and
RemoteRepositoryModelDesigner.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fails to check out PR branch.

3 participants