Documentation
¶
Index ¶
- Constants
- func Execute()
- func GetRepos(ctx context.Context) ([]*github.Repository, error)
- func GetRepositoryActivityScore(repo *Repo) int
- func NewClient() *github.Client
- func NewClientWithToken(token string) (*github.Client, error)
- func NewEnterpriseClient(baseURL, uploadURL string) (*github.Client, error)
- func NewEnterpriseClientWithToken(baseURL, uploadURL, token string) (*github.Client, error)
- type InnerSourceMetadata
- type Options
- type Repo
Constants ¶
View Source
const ( // TokenEnvKey is the default GitHub token environemt variable key TokenEnvKey = "GITHUB_TOKEN" // GitHubURL Prefix for github URLs GitHubURL = "https://github.com/" )
Variables ¶
This section is empty.
Functions ¶
func GetRepositoryActivityScore ¶
GetRepositoryActivityScore (From https://patterns.innersourcecommons.org/p/repository-activity-score) Calculate a virtual InnerSource score from stars, watches, commits, and issues.
func NewClient ¶
New creates a new default GitHub client. Tokens set via the $GITHUB_TOKEN environment variable will result in an authenticated client. If the $GITHUB_TOKEN is not set, then the client will do unauthenticated GitHub requests.
func NewClientWithToken ¶
NewClientWithToken can be used to specify a GitHub token through parameters. Empty string will result in unauthenticated client, which makes unauthenticated requests.
func NewEnterpriseClient ¶
Types ¶
type InnerSourceMetadata ¶
type Repo ¶
type Repo struct {
GH *github.Repository
Metadata *InnerSourceMetadata
}
Click to show internal directories.
Click to hide internal directories.