github

package
v1.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(
	repoURL string,
	opts *ClientOptions,
) (*github.Client, error)

NewClient creates a GitHub API client configured for the given repository URL. For github.com, a standard client is returned. For GitHub Enterprise hosts, the client is configured with the appropriate enterprise base URLs.

func ParseRepoURL

func ParseRepoURL(
	repoURL string,
) (string, string, string, string, error)

ParseRepoURL parses a Git repository URL and extracts the URL scheme, host, repository owner, and repository name. It handles standard HTTP(S) URLs and GitHub Enterprise URLs.

Types

type ClientOptions

type ClientOptions struct {
	// Token is an authentication token for the GitHub API. If empty, the
	// client will be unauthenticated.
	Token string
	// InsecureSkipTLSVerify controls whether the client skips TLS certificate
	// verification. Intended for GitHub Enterprise instances with self-signed
	// certificates.
	InsecureSkipTLSVerify bool
}

ClientOptions holds the configuration for creating a GitHub API client.

Jump to

Keyboard shortcuts

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