gh

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseOwnerRepo added in v0.2.14

func ParseOwnerRepo(githubURL string) (string, string, error)

Types

type GithubClient

type GithubClient struct {
	*github.Client
}

A simple wrapper around the github client, exposing additional functionality relevant to lekko.

func NewGithubClient

func NewGithubClient(h *http.Client) *GithubClient

func NewGithubClientFromToken

func NewGithubClientFromToken(ctx context.Context, token string) *GithubClient

func (*GithubClient) GetUser

func (gc *GithubClient) GetUser(ctx context.Context) (*github.User, error)

func (*GithubClient) GetUserOrganizations added in v0.2.16

func (gc *GithubClient) GetUserOrganizations(ctx context.Context) ([]string, error)

GetUserOrganizations uses an authenticated call to get the users private and public organizations

func (*GithubClient) Init

func (gc *GithubClient) Init(ctx context.Context, owner, repoName string, private bool) (string, error)

Init will create a new github repo based off of lekko's config repo template.

Jump to

Keyboard shortcuts

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