Documentation
¶
Overview ¶
Package auth provides GitHub authentication utilities.
Index ¶
- Constants
- func GetAuthenticatedUser(ctx context.Context, gh *github.Client) (string, error)
- func GetUser(ctx context.Context, gh *github.Client, username string) (*github.User, error)
- func NewGitHubClient(ctx context.Context, token string) *github.Client
- func NewTokenClient(ctx context.Context, token string) *http.Client
- type AuthError
Constants ¶
View Source
const ( // UsernameDependabot is the username for GitHub's Dependabot. UsernameDependabot = "dependabot[bot]" // UserIDDependabot is the user ID for GitHub's Dependabot. UserIDDependabot = 49699333 )
Known bot users.
Variables ¶
This section is empty.
Functions ¶
func GetAuthenticatedUser ¶
GetAuthenticatedUser returns the authenticated user's login.
func NewGitHubClient ¶
NewGitHubClient creates a GitHub client authenticated with the given token.
Types ¶
Click to show internal directories.
Click to hide internal directories.