예제 #1
0
        public Statistics(ICommitLog commits)
        {
            TicketNumbers   = new List <int>();
            NumberOfCommits = 0;
            Points          = 0;
            LastCommitSha   = commits.First().Sha;

            ProcessCommits(commits);
        }
예제 #2
0
        private Commit FindVersionSynchronizationEnabledCommit(ICommitLog commits)
        {
            var syncEnabledCommitMessage = "TeamCity change in '<Root project>' project: Synchronization with own VCS root is enabled";
            var syncEnabledCommit        = commits.First(c => c.Message == syncEnabledCommitMessage);

            if (syncEnabledCommit == null)
            {
                throw new Exception("Cannot find commit with \"{syncEnabledCommitMessage}\" message.");
            }

            return(syncEnabledCommit);
        }
예제 #3
0
 private static DateTime GetLastCommit(ICommitLog commitLog)
 {
     return(commitLog.First().Author.When.Date);
 }