Package com.gitblit.models

Examples of com.gitblit.models.Metric


    for (RefLogEntry change : recentChanges) {

      // aggregate repository metrics
      String repository = StringUtils.stripDotGit(change.repository);
      if (!repositoryMetrics.containsKey(repository)) {
        repositoryMetrics.put(repository, new Metric(repository));
      }
      repositoryMetrics.get(repository).count += 1;

      for (RepositoryCommit commit : change.getCommits()) {
        totalCommits++;
        String author = StringUtils.removeNewlines(commit.getAuthorIdent().getName());
        String authorName = author.toLowerCase();
        String authorEmail = StringUtils.removeNewlines(commit.getAuthorIdent().getEmailAddress()).toLowerCase();
        if (!authorExclusions.contains(authorName) && !authorExclusions.contains(authorEmail)) {
          if (!authorMetrics.containsKey(author)) {
            authorMetrics.put(author, new Metric(author));
          }
          authorMetrics.get(author).count += 1;
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.gitblit.models.Metric

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.