auth

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 7 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 returns 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