java.lang.Object
org.kohsuke.github.GHRepositoryStatistics
Statistics for a GitHub repository.
- Author:
- Martin van Zijl
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The type CodeFrequency.static class
The type CommitActivity.static class
The type ContributorStats.static class
The type Participation.static class
The type PunchCardItem. -
Constructor Summary
ConstructorDescriptionInstantiates a new Gh repository statistics. -
Method Summary
Modifier and TypeMethodDescriptionGet the number of additions and deletions per week.Get the last year of commit activity data.Get contributors list with additions, deletions, and commit count.getContributorStats
(boolean waitTillReady) Gets contributor stats.Get the weekly commit count for the repository owner and everyone else.Get the number of commits per hour in each day.
-
Constructor Details
-
GHRepositoryStatistics
Instantiates a new Gh repository statistics.- Parameters:
repo
- the repo
-
-
Method Details
-
getContributorStats
public PagedIterable<GHRepositoryStatistics.ContributorStats> getContributorStats() throws IOException, InterruptedExceptionGet contributors list with additions, deletions, and commit count. See https://developer.github.com/v3/repos/statistics/#get-contributors-list-with-additions-deletions-and-commit-counts- Returns:
- the contributor stats
- Throws:
IOException
- the io exceptionInterruptedException
- the interrupted exception
-
getContributorStats
@BetaApi public PagedIterable<GHRepositoryStatistics.ContributorStats> getContributorStats(boolean waitTillReady) throws IOException, InterruptedException Gets contributor stats.- Parameters:
waitTillReady
- Whether to sleep the thread if necessary until the statistics are ready. This is true by default.- Returns:
- the contributor stats
- Throws:
IOException
- the io exceptionInterruptedException
- the interrupted exception
-
getCommitActivity
Get the last year of commit activity data. See https://developer.github.com/v3/repos/statistics/#get-the-last-year-of-commit-activity-data- Returns:
- the commit activity
- Throws:
IOException
- the io exception
-
getCodeFrequency
Get the number of additions and deletions per week. See https://developer.github.com/v3/repos/statistics/#get-the-number-of-additions-and-deletions-per-week- Returns:
- the code frequency
- Throws:
IOException
- the io exception
-
getParticipation
Get the weekly commit count for the repository owner and everyone else. See https://developer.github.com/v3/repos/statistics/#get-the-weekly-commit-count-for-the-repository-owner-and-everyone-else- Returns:
- the participation
- Throws:
IOException
- the io exception
-
getPunchCard
Get the number of commits per hour in each day. See https://developer.github.com/v3/repos/statistics/#get-the-number-of-commits-per-hour-in-each-day- Returns:
- the punch card
- Throws:
IOException
- the io exception
-