Beispiel #1
0
        public List <GitCommitRef> GetAllCommits()
        {
            GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context);

            return(this.Context.Connection.GetClient <GitHttpClient>()
                   .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria()).Result);
        }
Beispiel #2
0
        public List <GitCommitRef> GetCommitsByCommitter()
        {
            GitRepository repo = GitSampleHelpers.FindAnyRepositoryOnAnyProject(this.Context);

            return(this.Context.Connection.GetClient <GitHttpClient>()
                   .GetCommitsAsync(repo.Id, new GitQueryCommitsCriteria()
            {
                Committer = "*****@*****.**"
            }).Result);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }