Documentation ¶
Index ¶
Constants ¶
View Source
const AccessTokenDesc = "GitHub access token for authorized rate limits"
AccessTokenDesc describes usage.
View Source
const CacheDirDesc = "directory for storing cached GitHub API responses"
CacheDirDesc describes usage.
View Source
const RepoDesc = "GitHub owner and repository, formatted as :owner/:repo"
RepoDesc describes usage.
Variables ¶
View Source
var AccessToken string
AccessToken is used to access repo stars and gain non-authorized rate limits.
View Source
var AnalyzeCmd = &cobra.Command{ Use: "analyze --repo=:owner/:repo", Short: "analyze previously fetched and saved GitHub stargazer data", Long: ` Analyzes the previously fetched and saved GitHub stargazer data. The following analyses are run: - Cumulative stars (week timestamp and star count) - Correlated repos (count of occurrences of other starred & subscribed repos) - Correlation histogram (50 bins of occurrence counts) - Stargazer report (name, email(?), date starred, correlation score, correlated repos, raw activity, raw activity repos, correlated activity, correlated activity repos `, Example: ` stargazers analyze --repo=cockroachdb/cockroach`, RunE: RunAnalyze, }
AnalyzeCmd analyzes previously fetched GitHub stargazer data.
View Source
var CacheDir string
CacheDir specifies where to store cached JSON responses.
View Source
var ClearCmd = &cobra.Command{ Use: "clear --repo=:owner/:repo", Short: "clear cached GitHub API responses", Long: ` Clears all GitHub API responses which have been cached in the repo-specific --cache subdirectory. `, Example: ` stargazers clear --repo=cockroachdb/cockroach`, RunE: RunClear, }
ClearCmd clears cached GitHub API responses.
View Source
var FetchCmd = &cobra.Command{ Use: "fetch --repo=:owner/:repo --token=:access_token", Short: "recursively fetch all stargazer github data", Long: ` Recursively fetch all stargazer github data starting with the list of stargazers for the specified :owner/:repo and then descending into each stargazer's followers, other starred repos, and subscribed repos. Each subscribed repo is further queried for that stargazer's contributions in terms of additions, deletions, and commits. All fetched data is cached by URL. `, Example: ` stargazers fetch --repo=cockroachdb/cockroach --token=f87456b1112dadb2d831a5792bf2ca9a6afca7bc`, RunE: RunFetch, }
FetchCmd recursively fetches stargazer github data.
View Source
var Repo string
Repo specifies the the owner and repository in :owner/:repo format.
Functions ¶
func RunAnalyze ¶
RunAnalyze fetches saved stargazer info for the specified repo and runs the analysis reports.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.