gh

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(client *github.Client) *Client

func NewClientWithAccessToken

func NewClientWithAccessToken(ctx context.Context, accessToken string) *Client

func (Client) ExistingPGOFileURL

func (c Client) ExistingPGOFileURL(ctx context.Context, opts Options) (string, error)

ExistingPGOFileURL searches for the Options.Filename in the repository. Returns a signed URL to download it.

func (Client) UpdatePGOFile

func (c Client) UpdatePGOFile(ctx context.Context, opts Options, fileContent []byte) (string, error)

UpdatePGOFile creates the blob, branch and a pull request with the new PGO file. Returns the pull request URL.

type Options

type Options struct {
	Repo       Repository
	Filename   string
	MainBranch string
}

type Repository

type Repository struct {
	Org  string
	Name string
}

func ParseRepoURL

func ParseRepoURL(repoURL string) Repository

ParseRepoURL from the format https://github.com/your-org/your-repo.

Jump to

Keyboard shortcuts

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