github

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package github provides a client to interact with GitHub Enterprise.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTokenRequired is returned when a GitHub Enterprise token is not provided.
	ErrTokenRequired = fmt.Errorf("GitHub Enterprise token is required")
	// ErrAPIBaseURLRequired is returned when a GitHub Enterprise API base URL is not provided.
	ErrAPIBaseURLRequired = fmt.Errorf("GitHub Enterprise API base URL is required")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a GitHub client wrapper.

func NewClient

func NewClient(ctx context.Context, logger *slog.Logger, m *metrics.Client, cfg config.GHEConfig) (*Client, error)

NewClient creates a new GitHub Enterprise client.

func (*Client) Organizations

func (c *Client) Organizations() ([]string, error)

Organizations returns the list of all GitHub Enterprise organizations.

func (*Client) Repositories

func (c *Client) Repositories(targetOrg string) ([]string, error)

Repositories returns the list of selected repositories from the targetOrg or all GitHub Enterprise organizations if targetOrg is not provided.

Jump to

Keyboard shortcuts

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