github

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileNotFound = errors.New("file not found")

Functions

This section is empty.

Types

type BranchClient

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

func (*BranchClient) CreateFile

func (c *BranchClient) CreateFile(ctx context.Context, commitMsg, path, content string) error

func (*BranchClient) DeleteBranch

func (c *BranchClient) DeleteBranch(ctx context.Context) error

func (*BranchClient) PullRequest

func (c *BranchClient) PullRequest(ctx context.Context, title, body string) (*github.PullRequest, error)

func (*BranchClient) UpdateFile

func (c *BranchClient) UpdateFile(ctx context.Context, commitMsg, path, sha, content string) error

func (*BranchClient) WaitAndMerge

func (c *BranchClient) WaitAndMerge(ctx context.Context, pr *github.PullRequest) error

type Client

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

func New

func New(ctx context.Context, githubToken, owner, repo string) (*Client, error)

func (*Client) GetContent

func (c *Client) GetContent(ctx context.Context, path string) (content string, sha string, err error)

Jump to

Keyboard shortcuts

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