Documentation ¶
Index ¶
Constants ¶
const AccessTokenDesc = "GitHub access token for authorized rate limits"
AccessTokenDesc describes usage.
const AdvancedReportingDesc = "Enable advanced long running reports: followers, cross-stars, commiters"
AdvancedReportingDesc describes AdvancedReporting usage
const CacheDirDesc = "directory for storing cached GitHub API responses"
CacheDirDesc describes usage.
const RepoDesc = "GitHub owner and repository, formatted as :owner/:repo"
RepoDesc describes usage.
const SpreadSheetIDDesc = "Google SpreadSheet id to update"
SpreadSheetIDDesc describes usage of folder-id.
Variables ¶
var AccessToken string
AccessToken is used to access repo stars and gain non-authorized rate limits.
var AdvancedReporting bool
AdvancedReporting enabled reports for followers, cross-stars, commiters
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.
var CacheDir string
CacheDir specifies where to store cached JSON responses.
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.
var ExportCmd = &cobra.Command{ Use: "export --repo=:owner/:repo", Short: "export previously analyzed reports to Google Sheets", Long: ` Exports generated reports as a SpreadSheet, with each report done as sheet `, Example: ` stargazers export --repo=cockroachdb/cockroach`, RunE: RunExportToSheets, }
ExportCmd analyzes previously fetched GitHub stargazer data.
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.
var Repo string
Repo specifies the the owner and repository in :owner/:repo format.
var SpreadSheetID string
SpreadSheetID Google drive of folder to move file (optional)
Functions ¶
func RunAnalyze ¶
RunAnalyze fetches saved stargazer info for the specified repo and runs the analysis reports.
func RunExportToSheets ¶
RunExportToSheets fetches saved stargazer info for the specified repo and runs the analysis reports.
Types ¶
This section is empty.