JGithubPackageRepositoriesStatistics
class JGithubPackageRepositoriesStatistics extends JGithubPackage
GitHub API class for the Joomla Platform.
The Repository Statistics API allows you to fetch the data that GitHub uses for visualizing different types of repository activity.
Methods
Get contributors list with additions, deletions, and commit counts.
Get the last year of commit activity data.
Get the number of additions and deletions per week.
Get the weekly commit count for the repo owner and everyone else.
Get the number of commits per hour in each day.
Details
object
getListContributors(
string $owner,
string $repo)
Get contributors list with additions, deletions, and commit counts.
Response include: total - The Total number of commits authored by the contributor.
Weekly Hash
w - Start of the week a - Number of additions d - Number of deletions c - Number of commits
object
getActivityData(
string $owner,
string $repo)
Get the last year of commit activity data.
Returns the last year of commit activity grouped by week. The days array is a group of commits per day, starting on Sunday.
object
getCodeFrequency(
string $owner,
string $repo)
Get the number of additions and deletions per week.
Response returns a weekly aggregate of the number of additions and deletions pushed to a repository.
object
getParticipation(
string $owner,
string $repo)
Get the weekly commit count for the repo owner and everyone else.
Returns the total commit counts for the "owner" and total commit counts in "all". "all" is everyone combined, including the owner in the last 52 weeks. If you’d like to get the commit counts for non-owners, you can subtract all from owner.
The array order is oldest week (index 0) to most recent week.
object
getPunchCard(
string $owner,
string $repo)
Get the number of commits per hour in each day.
Response Each array contains the day number, hour number, and number of commits:
0-6: Sunday - Saturday 0-23: Hour of day Number of commits
For example, [2, 14, 25] indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.