Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureGithubOauthTokenSet ¶
func EnsureGithubOauthTokenSet() error
EnsureGithubOauthTokenSet is a sanity check that a value is exported for GITHUB_OAUTH_TOKEN
Types ¶
type GithubClient ¶
type GithubClient struct { PullRequests githubPullRequestService Repositories githubRepositoriesService }
GithubClient is the data structure that is common between production code and test code. In production code, go-github satisfies the PullRequests and Repositories service interfaces, whereas in test the concrete implementations for these same services are mocks that return a static slice of pointers to GitHub repositories, or a single pointer to a GitHub repository, as appropriate. This allows us to test the workflow of git-xargs without actually making API calls to GitHub when running tests
func ConfigureGithubClient ¶
func ConfigureGithubClient() GithubClient
ConfigureGithubClient creates a GitHub API client using the user-supplied GITHUB_OAUTH_TOKEN and returns the configured GitHub client
func NewClient ¶
func NewClient(client *github.Client) GithubClient