github_client

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const MaxCommentLength = 64 * 1024

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*github.Client
	// contains filtered or unexported fields
}

func CreateGithubClient

func CreateGithubClient() (*Client, error)

CreateGithubClient creates a new GitHub client using the auth token provided. We can't validate the token at this point, so if it exists we assume it works

func (*Client) CommitStatus

func (c *Client) CommitStatus(ctx context.Context, repo *repo.Repo, status pkg.CommitState) error

func (*Client) CreateHook

func (c *Client) CreateHook(ctx context.Context, ownerAndRepoName, webhookUrl, webhookSecret string) error

func (*Client) Email

func (c *Client) Email() string

func (*Client) GetHookByUrl

func (c *Client) GetHookByUrl(ctx context.Context, ownerAndRepoName, webhookUrl string) (*vcs.WebHookConfig, error)

func (*Client) GetName

func (c *Client) GetName() string

func (*Client) LoadHook

func (c *Client) LoadHook(ctx context.Context, id string) (*repo.Repo, error)

func (*Client) ParseHook

func (c *Client) ParseHook(r *http.Request, request []byte) (*repo.Repo, error)

func (*Client) PostMessage

func (c *Client) PostMessage(ctx context.Context, repo *repo.Repo, prID int, msg string) *pkg.Message

func (*Client) TidyOutdatedComments

func (c *Client) TidyOutdatedComments(ctx context.Context, repo *repo.Repo) error

func (*Client) UpdateMessage

func (c *Client) UpdateMessage(ctx context.Context, m *pkg.Message, msg string) error

func (*Client) Username

func (c *Client) Username() string

func (*Client) VerifyHook

func (c *Client) VerifyHook(r *http.Request, secret string) ([]byte, error)

Jump to

Keyboard shortcuts

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