Documentation ¶
Index ¶
- func CheckAndPrintRateLimit()
- func GetActiveForkersPercentage(contributors int, forkers int) float64
- func GetClosedIssuesPercentage(openIssues int, closedIssues int) float64
- func GetCommitsByDay(totalCommits int, repositoryAge int) float64
- func GetIssueByDay(totalIssues int, age int) float64
- func GetRepositoryClosedIssues(repoKey string, tmpFolder string, debug bool) int
- func GetRepositoryCommitsData(repoKey string, tmpFolder string, debug bool) (string, time.Time)
- func GetRepositoryContributors(repoKey string, tmpFolder string, debug bool) (int, int)
- func GetRepositoryLanguages(RepoKey string, tmpFolder string, debug bool) (string, int)
- func GetRepositoryTagsNumber(repoKey string, tmpFolder string, debug bool) int
- func GetUserFollowers(username string, tmpFolder string, debug bool) int
- type Commit
- type ContributionStatistics
- type Contributor
- type Language
- type LanguageList
- type Repository
- type StatsContributor
- type Tag
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAndPrintRateLimit ¶
func CheckAndPrintRateLimit()
CheckAndPrintRateLimit accesses Github's API to check current limits
func GetActiveForkersPercentage ¶
GetActiveForkersPercentage calculates the percentage of active forkers of the repository
func GetClosedIssuesPercentage ¶
GetClosedIssuesPercentage calculates the percentage of closed issues of the repository
func GetCommitsByDay ¶
GetCommitsByDay calculates the rate of commits by day of the repository
func GetIssueByDay ¶
GetIssueByDay calculates the rate of issues by day of the repository
func GetRepositoryClosedIssues ¶
GetRepositoryClosedIssues gets number of closed issues of a repository
func GetRepositoryCommitsData ¶
GetRepositoryCommitsData gets information about commits of a repository. Currerntly used for author login and last commit date
func GetRepositoryContributors ¶
GetRepositoryContributors gets information about contributors of the repository
func GetRepositoryLanguages ¶
GetRepositoryLanguages gets repository language statistics
func GetRepositoryTagsNumber ¶
GetRepositoryTagsNumber gets information about tags of the repository
Types ¶
type Commit ¶
type Commit struct { Author struct { Login string `json:"login"` Date string `json:"date"` } `json:"author"` Commit struct { Author struct { Name string `json:"name"` Email string `json:"email"` Date time.Time `json:"date"` } `json:"author"` } `json:"commit"` }
Commit structure with selcted data keys for JSON processing
type ContributionStatistics ¶
type ContributionStatistics struct { TotalCommits int TotalAdditions int TotalDeletions int TotalCodeChanges int MediumCommitSize int AverageContributionPeriod int ReturningContributors int }
ContributionStatistics contains multiple statistics about contribution into the repository
func GetContributionStatistics ¶
func GetContributionStatistics(repoKey string, tmpFolder string, debug bool) ContributionStatistics
GetContributionStatistics gets detailsed statistics about contributors of the repository
type Contributor ¶
type Contributor struct {
Login string `json:"login"`
}
Contributor structure with selcted data keys for JSON processing
type LanguageList ¶
type LanguageList []Language
LanguageList contains all languages
func (LanguageList) Len ¶
func (l LanguageList) Len() int
func (LanguageList) Less ¶
func (l LanguageList) Less(i, j int) bool
func (LanguageList) Swap ¶
func (l LanguageList) Swap(i, j int)
type Repository ¶
type Repository struct { Name string `json:"name"` FullName string `json:"full_name"` Language string `json:"language"` Description string `json:"description"` Watchers int `json:"watchers"` Forks int `json:"forks"` OpenIssues int `json:"open_issues"` CreatedAt time.Time `json:"created_at"` HasIssues bool `json:"has_issues"` License struct { SPDXID string `json:"spdx_id"` } `json:"license"` }
Repository structure with selcted data keys for JSON processing
func GetRepositoryStatistics ¶
func GetRepositoryStatistics(RepoKey string, tmpFolder string, debug bool) *Repository
GetRepositoryStatistics gets repository common statistics
func ParseRepositoryData ¶
func ParseRepositoryData(jsonResponse []byte) *Repository
ParseRepositoryData is used to parse repository common statistics
type StatsContributor ¶
type StatsContributor struct { Author struct { Login string `json:"login"` } `json:"author"` TotalCommits int `json:"total"` Weeks []struct { Week int `json:"w"` Additions int `json:"a"` Deletions int `json:"d"` Commits int `json:"c"` } `json:"weeks"` }
StatsContributor contains statistical data for contribution
type Tag ¶
type Tag struct {
Name string `json:"name"`
}
Tag structure with selcted data keys for JSON processing