public List <GitCommitRef> GetAllCommits() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria()).Result); }
public List <GitCommitRef> GetCommitsByCommitter() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria() { Committer = "*****@*****.**" }).Result); }
public List <GitCommitRef> GetCommitsReachableFromACommit() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria() { // Earliest commit in the graph to search. CompareVersion = m_oldestDescriptor }).Result); }
public List <GitCommitRef> GetCommitsInDateRange() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria() { FromDate = new DateTime(2018, 6, 14).ToString(), ToDate = new DateTime(2018, 6, 16).ToString() }).Result); }
public List <GitCommitRef> GetCommitsReachableFromACommitAndInPath() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria() { CompareVersion = m_tipCommitDescriptor, ItemVersion = m_oldestDescriptor, ItemPath = "/README.md", }).Result); }
public List <GitCommitRef> GetCommitsOnABranch() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria() { ItemVersion = new GitVersionDescriptor() { VersionType = GitVersionType.Branch, VersionOptions = GitVersionOptions.None, Version = "master" } }).Result); }
public List <GitCommitRef> GetCommitsOnABranch() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); string branchName = repo.DefaultBranch; string branchNameWithoutRefsHeads = branchName.Remove(0, "refs/heads/".Length); return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria() { ItemVersion = new GitVersionDescriptor() { VersionType = GitVersionType.Branch, VersionOptions = GitVersionOptions.None, Version = branchNameWithoutRefsHeads } }).Result); }
public List <GitCommitRef> GetCommitsReachableFromACommitAndInPath() { GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context); string branchName = repo.DefaultBranch; string branchNameWithoutRefsHeads = branchName.Remove(0, "refs/heads/".Length); GitVersionDescriptor tipCommitDescriptor = new GitVersionDescriptor() { VersionType = GitVersionType.Branch, VersionOptions = GitVersionOptions.None, Version = branchNameWithoutRefsHeads }; return(this.Context.Connection.GetClient <GitHttpClient>() .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria() { CompareVersion = tipCommitDescriptor, ItemVersion = m_oldestDescriptor, ItemPath = "/README.md", }).Result); }