private void GoToChangeset(RepositoryIdentifier repo, string sha)
 {
     if (repo == null || string.IsNullOrEmpty(repo.Name) || string.IsNullOrEmpty(repo.Owner))
         return;
     ShowViewModel<ChangesetViewModel>(new ChangesetViewModel.NavObject
     {
         Username = repo.Owner,
         Repository = repo.Name,
         Node = sha
     });
 }
 private void GoToIssue(RepositoryIdentifier repo, long id)
 {
     if (repo == null || string.IsNullOrEmpty(repo.Name) || string.IsNullOrEmpty(repo.Owner))
         return;
     ShowViewModel<IssueViewModel>(new IssueViewModel.NavObject
     {
         Username = repo.Owner,
         Repository = repo.Name,
         Id = id
     });
 }
 private void GoToPullRequests(RepositoryIdentifier repo)
 {
     if (repo == null || string.IsNullOrEmpty(repo.Name) || string.IsNullOrEmpty(repo.Owner))
         return;
     ShowViewModel<PullRequestsViewModel>(new PullRequestsViewModel.NavObject
     {
         Username = repo.Owner,
         Repository = repo.Name
     });
 }
 private void GoToBranches(RepositoryIdentifier repoId)
 {
     ShowViewModel<BranchesAndTagsViewModel>(new BranchesAndTagsViewModel.NavObject
     {
         Username = repoId.Owner,
         Repository = repoId.Name,
         IsShowingBranches = true
     });
 }
Beispiel #5
0
 private void GoToSubmodule(ContentModel x)
 {
     var nameAndSlug = x.GitUrl.Substring(x.GitUrl.IndexOf("/repos/", System.StringComparison.Ordinal) + 7);
     var repoId = new RepositoryIdentifier(nameAndSlug.Substring(0, nameAndSlug.IndexOf("/git", System.StringComparison.Ordinal)));
     var sha = x.GitUrl.Substring(x.GitUrl.LastIndexOf("/", System.StringComparison.Ordinal) + 1);
     ShowViewModel<SourceTreeViewModel>(new NavObject {Username = repoId.Owner, Repository = repoId.Name, Branch = sha});
 }
Beispiel #6
0
 private void GoToTags(EventModel.RepoModel eventModel)
 {
     var repoId = new RepositoryIdentifier(eventModel.Name);
     ShowViewModel<BranchesAndTagsViewModel>(new BranchesAndTagsViewModel.NavObject
     {
         Username = repoId.Owner,
         Repository = repoId.Name,
         IsShowingBranches = false
     });
 }
Beispiel #7
0
 private void GoToRepository(EventModel.RepoModel eventModel)
 {
     var repoId = new RepositoryIdentifier(eventModel.Name);
     ShowViewModel<RepositoryViewModel>(new RepositoryViewModel.NavObject
     {
         Username = repoId.Owner,
         Repository = repoId.Name
     });
 }
Beispiel #8
0
 private void GoToCommits(EventModel.RepoModel repoModel, string branch)
 {
     var repoId = new RepositoryIdentifier(repoModel.Name);
     ShowViewModel<ChangesetsViewModel>(new ChangesetsViewModel.NavObject
     {
         Username = repoId.Owner,
         Repository = repoId.Name,
         Branch = branch
     });
 }