Documentation
¶
Overview ¶
Package github provides GitHub API client functionality.
Index ¶
- type Client
- func (c *Client) CreateBlob(ctx context.Context, org, repo, contents string) (string, error)
- func (c *Client) CreateBranch(ctx context.Context, org, repo, branchName, sha string) error
- func (c *Client) CreateCommit(ctx context.Context, org, repo, message, treeSha, parentSha string) (string, error)
- func (c *Client) CreateFile(ctx context.Context, org, repo, branch, path, contents string) error
- func (c *Client) CreateTree(ctx context.Context, org, repo, baseTreeSha string, ...) (string, error)
- func (c *Client) DeleteBranch(ctx context.Context, org, repo, branchName string) error
- func (c *Client) DeleteRef(ctx context.Context, org, repo, ref string) error
- func (c *Client) DeleteSecret(ctx context.Context, org, repo, secretName string) error
- func (c *Client) GetCommitSha(ctx context.Context, org, repo, branch string) (string, error)
- func (c *Client) GetDefaultBranch(ctx context.Context, org, repo string) (string, error)
- func (c *Client) GetTreeSha(ctx context.Context, org, repo, commitSha string) (string, error)
- func (c *Client) ListRepoSecrets(ctx context.Context, org, repo string) ([]string, error)
- func (c *Client) UpdateRef(ctx context.Context, org, repo, ref, sha string) error
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
}
Client provides methods to interact with the GitHub API.
func (*Client) CreateBlob ¶
CreateBlob creates a blob and returns its SHA.
func (*Client) CreateBranch ¶
CreateBranch creates a new branch in the repository.
func (*Client) CreateCommit ¶
func (c *Client) CreateCommit(ctx context.Context, org, repo, message, treeSha, parentSha string) (string, error)
CreateCommit creates a commit with the given tree and parent.
func (*Client) CreateFile ¶
CreateFile creates or updates a file in the repository.
func (*Client) CreateTree ¶
func (c *Client) CreateTree(ctx context.Context, org, repo, baseTreeSha string, entries []*github.TreeEntry) (string, error)
CreateTree creates a tree with the given entries.
func (*Client) DeleteBranch ¶
DeleteBranch deletes a branch from the repository.
func (*Client) DeleteSecret ¶
DeleteSecret deletes a secret from the repository.
func (*Client) GetCommitSha ¶
GetCommitSha retrieves the commit SHA for a given branch.
func (*Client) GetDefaultBranch ¶
GetDefaultBranch retrieves the default branch of a repository.
func (*Client) GetTreeSha ¶
GetTreeSha retrieves the tree SHA for a commit.
func (*Client) ListRepoSecrets ¶
ListRepoSecrets retrieves all secrets in the repository.