Version: v0.0.0-...-c597efc Latest Latest

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 14 Imported by: 0




This section is empty.


This section is empty.


func MaskOptions

func MaskOptions(opts *Options) string


type APIEndpoint

type APIEndpoint *url.URL

func ValidateAPIEndpoint

func ValidateAPIEndpoint(unsafeAPIEndpoint string) (APIEndpoint, error)

type HttpFunc

type HttpFunc func(request *http.Request) (*http.Response, error)

func NewHttp

func NewHttp() HttpFunc

type Options

type Options struct {
	Tmpl          *l10n.Template
	SendIfSuccess bool
	Token         Token
	APIEndpoint   APIEndpoint
	Owner         Owner
	Repo          Repo
	PullNumber    PullNumber

type Owner

type Owner string

func ValidateOwner

func ValidateOwner(unsafeOwner string) (Owner, error)

type PullNumber

type PullNumber int

func ValidatePullNumber

func ValidatePullNumber(unsafePullNumber int) (PullNumber, error)

type PullRequestComment

type PullRequestComment struct {
	Body string `json:"body"`

type PullRequestCommentSender

type PullRequestCommentSender func(githubEndpoint APIEndpoint, token Token, owner Owner, repo Repo, pullNumber PullNumber, comment string) error

func NewPullRequestCommentSender

func NewPullRequestCommentSender(send HttpFunc, logger logging.Logger) PullRequestCommentSender

type Repo

type Repo string

func ValidateRepo

func ValidateRepo(unsafeRepo string) (Repo, error)

type SendFunc

type SendFunc func(result *checker.CheckResult, opts *Options) error

func NewSendFunc

func NewSendFunc(postComment PullRequestCommentSender) SendFunc

func SpySendFunc

func SpySendFunc(inherited SendFunc, callArgs *[]SendFuncCallArgs) SendFunc

func StubSendFunc

func StubSendFunc(err error) SendFunc

type SendFuncCallArgs

type SendFuncCallArgs struct {
	Result  *checker.CheckResult
	Options *Options

type Token

type Token string

func ValidateToken

func ValidateToken(unsafeToken string) (Token, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL