github

package
v0.0.0-...-3bf0021 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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(ctx context.Context, installation string, redis *redis.Client) (*Client, error)

NewClient creates a GitHub client using the installation workflow (https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation). installation corresponds to the numeric installation ID provided by the installation setup workflow. On its own, the installation ID does not provide access to any GitHub resources, but when paired with the app ID and private key, allows us to access a particular organization's entities.

func (*Client) CreateIssue

func (c *Client) CreateIssue(ctx context.Context, repo string, issueRequest *github.IssueRequest) (*github.Issue, error)

func (*Client) DeleteInstallation

func (c *Client) DeleteInstallation(ctx context.Context, installation string) error

func (*Client) GetInstallationOwner

func (c *Client) GetInstallationOwner(ctx context.Context) (*string, error)

func (*Client) GetLatestCommitHash

func (c *Client) GetLatestCommitHash(ctx context.Context, githubPath string) (string, *github.Response, error)

func (*Client) GetRepoBlob

func (c *Client) GetRepoBlob(ctx context.Context, githubPath string, blobSHA string) (*github.Blob, *github.Response, error)

func (*Client) GetRepoContent

func (c *Client) GetRepoContent(ctx context.Context, githubPath string, path string, version string) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)

func (*Client) ListLabels

func (c *Client) ListLabels(ctx context.Context, repo string) ([]*github.Label, error)

func (*Client) ListRepos

func (c *Client) ListRepos(ctx context.Context) (repos []*github.Repository, err error)

func (*Client) SearchIssues

func (c *Client) SearchIssues(ctx context.Context, rawQuery string) ([]*github.Issue, error)

type ClientInterface

type ClientInterface interface {
	CreateIssue(ctx context.Context, repo string, issueRequest *github.IssueRequest) (*github.Issue, error)
	ListLabels(ctx context.Context, repo string) ([]*github.Label, error)
	ListRepos(ctx context.Context) ([]*github.Repository, error)
	DeleteInstallation(ctx context.Context, installation string) error
	GetRepoContent(ctx context.Context, githubPath string, path string, version string) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)
	GetRepoBlob(ctx context.Context, githubPath string, blobSHA string) (*github.Blob, *github.Response, error)
	GetLatestCommitHash(ctx context.Context, githubPath string) (string, *github.Response, error)
	SearchIssues(ctx context.Context, rawQuery string) ([]*github.Issue, error)
}

Jump to

Keyboard shortcuts

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