Versions in this module Expand all Collapse all v1 v1.1.0 Jun 19, 2023 v1.0.0 Jun 19, 2023 Changes in this version + func GetScopes(ctx context.Context, client *github.Client) ([]string, error) + func ValidatePermissions(ctx context.Context, client *github.Client, cfg *conf.Config) error + type Client interface + GetFile func(ctx *context.Context, repo string, branch string, path string) (*CommitFile, error) + GetFiles func(ctx *context.Context, repo string, branch string, paths []string) ([]*CommitFile, error) + HandlePayload func(request *http.Request, secret []byte) (*WebhookPayload, error) + ListFiles func(ctx *context.Context, repo string, branch string, path string) ([]string, error) + SetWebhook func() error + UnsetWebhook func() error + func NewGitProviderClient(cfg *conf.Config) (Client, error) + func NewGithubClient(cfg *conf.Config) (Client, error) + type CommitFile struct + Content *string + Path *string + type GithubClientImpl struct + func (c *GithubClientImpl) GetFile(ctx *context.Context, repo string, branch string, path string) (*CommitFile, error) + func (c *GithubClientImpl) GetFiles(ctx *context.Context, repo string, branch string, paths []string) ([]*CommitFile, error) + func (c *GithubClientImpl) HandlePayload(request *http.Request, secret []byte) (*WebhookPayload, error) + func (c *GithubClientImpl) ListFiles(ctx *context.Context, repo string, branch string, path string) ([]string, error) + func (c *GithubClientImpl) SetWebhook() error + func (c *GithubClientImpl) UnsetWebhook() error + type WebhookPayload struct + Branch string + Commit string + DestBranch string + Event string + PullRequestTitle string + PullRequestURL string + Repo string + User string + UserEmail string