Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) CommitStatus(ctx context.Context, pr vcs.PullRequest, status pkg.CommitState) error
- func (c *Client) CreateHook(ctx context.Context, ownerAndRepoName, webhookUrl, webhookSecret string) error
- func (c *Client) Email() string
- func (c *Client) GetHookByUrl(ctx context.Context, ownerAndRepoName, webhookUrl string) (*vcs.WebHookConfig, error)
- func (c *Client) GetName() string
- func (c *Client) LoadHook(ctx context.Context, id string) (vcs.PullRequest, error)
- func (c *Client) ParseHook(r *http.Request, request []byte) (vcs.PullRequest, error)
- func (c *Client) PostMessage(ctx context.Context, pr vcs.PullRequest, message string) *msg.Message
- func (c *Client) TidyOutdatedComments(ctx context.Context, pr vcs.PullRequest) error
- func (c *Client) ToEmoji(s pkg.CommitState) string
- func (c *Client) UpdateMessage(ctx context.Context, m *msg.Message, msg string) error
- func (c *Client) Username() string
- func (c *Client) VerifyHook(r *http.Request, secret string) ([]byte, error)
Constants ¶
View Source
const MaxCommentLength = 64 * 1024
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func CreateGithubClient ¶
func CreateGithubClient(cfg config.ServerConfig) (*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, pr vcs.PullRequest, status pkg.CommitState) error
func (*Client) CreateHook ¶
func (*Client) GetHookByUrl ¶
func (*Client) PostMessage ¶
func (*Client) TidyOutdatedComments ¶
func (*Client) ToEmoji ¶ added in v1.4.3
func (c *Client) ToEmoji(s pkg.CommitState) string
ToEmoji returns a string representation of this state for use in the request
func (*Client) UpdateMessage ¶
Click to show internal directories.
Click to hide internal directories.