auth

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 6 Imported by: 4

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 return the configured Github client

func NewClient

func NewClient(client *github.Client) GithubClient

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL