gh

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRepo

func CreateRepo(ctx context.Context, opts CreateRepoOptions) (*github.Repository, error)

Create Repo

func DeleteRepo

func DeleteRepo(ctx context.Context, repo *github.Repository) error

For cleanup

func EnsureClient

func EnsureClient(ctx context.Context) (*github.Client, error)

func FromContext

func FromContext(ctx context.Context) (*github.Client, error)

FromContext returns the client or an error if missing.

func HasClient

func HasClient(ctx context.Context) bool

HasClient tells whether a client is present.

func NewClient

func NewClient(ctx context.Context, token string) *github.Client

func WithContext

func WithContext(ctx context.Context, c *github.Client) context.Context

WithContext stores the client in a derived context.

Types

type CreateRepoOptions

type CreateRepoOptions struct {
	Name        string
	Private     bool
	Description string
	Timeout     time.Duration
}

Jump to

Keyboard shortcuts

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